-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gcc12 build fails because std:shared_ptr requires explicit declation of <memory> #310
Comments
Steps to reproduce $git clone https://github.com/KomputeProject/kompute.git $cmake -Bbuild $cd build $make $gcc (SUSE Linux) 12.2.1 20221020 [revision 0aaef83351473e8f4eb774f8f999bbe87a4866d7] Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $lsb_release -a LSB Version: n/a Distributor ID: openSUSE Description: openSUSE Tumbleweed Release: 20221124 Codename: n/a Error log In file included from /home/doof/gitrepo/kompute/src/include/kompute/operations/OpTensorCopy.hpp:6, from /home/doof/gitrepo/kompute/src/OpTensorCopy.cpp:3: /home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:55:27: error: expected ‘)’ before ‘<’ token 55 | Tensor(std::shared_ptr<vk::PhysicalDevice> physicalDevice, | ~ ^ | ) /home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:108:30: error: ‘std::shared_ptr’ has not been declared 108 | std::shared_ptr<Tensor> copyFromTensor); | ^~~~~~~~~~ /home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:108:40: error: expected ‘,’ or ‘...’ before ‘<’ token 108 | std::shared_ptr<Tensor> copyFromTensor); | ^ /home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:256:10: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type 256 | std::shared_ptr<vk::PhysicalDevice> mPhysicalDevice; | ^~~~~~~~~~ /home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:6:1: note: ‘std::shared_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’? 5 | #include "logger/Logger.hpp" +++ |+#include <memory> 6 | #include <string> /home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:257:10: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type 257 | std::shared_ptr<vk::Device> mDevice; | ^~~~~~~~~~ /home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:257:5: note: ‘std::shared_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’? 257 | std::shared_ptr<vk::Device> mDevice; | ^~~ /home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:260:10: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type 260 | std::shared_ptr<vk::Buffer> mPrimaryBuffer; | ^~~~~~~~~~ /home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:260:5: note: ‘std::shared_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’? 260 | std::shared_ptr<vk::Buffer> mPrimaryBuffer; | ^~~ /home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:262:10: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type 262 | std::shared_ptr<vk::Buffer> mStagingBuffer; Final result $make [ 16%] Built target fmt [ 27%] Built target kp_shader [ 38%] Built target kp_logger [ 44%] Building CXX object src/CMakeFiles/kompute.dir/Algorithm.cpp.o [ 50%] Building CXX object src/CMakeFiles/kompute.dir/Manager.cpp.o [ 55%] Building CXX object src/CMakeFiles/kompute.dir/OpAlgoDispatch.cpp.o [ 61%] Building CXX object src/CMakeFiles/kompute.dir/OpMemoryBarrier.cpp.o [ 66%] Building CXX object src/CMakeFiles/kompute.dir/OpTensorCopy.cpp.o [ 72%] Building CXX object src/CMakeFiles/kompute.dir/OpTensorSyncDevice.cpp.o [ 77%] Building CXX object src/CMakeFiles/kompute.dir/OpTensorSyncLocal.cpp.o [ 83%] Building CXX object src/CMakeFiles/kompute.dir/Sequence.cpp.o [ 88%] Building CXX object src/CMakeFiles/kompute.dir/Tensor.cpp.o [ 94%] Building CXX object src/CMakeFiles/kompute.dir/Core.cpp.o [100%] Linking CXX static library ../lib/libkompute.a [100%] Built target kompute Fixes Issue KomputeProject#310
Steps to reproduce $git clone https://github.com/KomputeProject/kompute.git $cmake -Bbuild $cd build $make $gcc (SUSE Linux) 12.2.1 20221020 [revision 0aaef83351473e8f4eb774f8f999bbe87a4866d7] Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $lsb_release -a LSB Version: n/a Distributor ID: openSUSE Description: openSUSE Tumbleweed Release: 20221124 Codename: n/a Error log In file included from /home/doof/gitrepo/kompute/src/include/kompute/operations/OpTensorCopy.hpp:6, from /home/doof/gitrepo/kompute/src/OpTensorCopy.cpp:3: /home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:55:27: error: expected ‘)’ before ‘<’ token 55 | Tensor(std::shared_ptr<vk::PhysicalDevice> physicalDevice, | ~ ^ | ) /home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:108:30: error: ‘std::shared_ptr’ has not been declared 108 | std::shared_ptr<Tensor> copyFromTensor); | ^~~~~~~~~~ /home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:108:40: error: expected ‘,’ or ‘...’ before ‘<’ token 108 | std::shared_ptr<Tensor> copyFromTensor); | ^ /home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:256:10: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type 256 | std::shared_ptr<vk::PhysicalDevice> mPhysicalDevice; | ^~~~~~~~~~ /home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:6:1: note: ‘std::shared_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’? 5 | #include "logger/Logger.hpp" +++ |+#include <memory> 6 | #include <string> /home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:257:10: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type 257 | std::shared_ptr<vk::Device> mDevice; | ^~~~~~~~~~ /home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:257:5: note: ‘std::shared_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’? 257 | std::shared_ptr<vk::Device> mDevice; | ^~~ /home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:260:10: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type 260 | std::shared_ptr<vk::Buffer> mPrimaryBuffer; | ^~~~~~~~~~ /home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:260:5: note: ‘std::shared_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’? 260 | std::shared_ptr<vk::Buffer> mPrimaryBuffer; | ^~~ /home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:262:10: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type 262 | std::shared_ptr<vk::Buffer> mStagingBuffer; Final result $make [ 16%] Built target fmt [ 27%] Built target kp_shader [ 38%] Built target kp_logger [ 44%] Building CXX object src/CMakeFiles/kompute.dir/Algorithm.cpp.o [ 50%] Building CXX object src/CMakeFiles/kompute.dir/Manager.cpp.o [ 55%] Building CXX object src/CMakeFiles/kompute.dir/OpAlgoDispatch.cpp.o [ 61%] Building CXX object src/CMakeFiles/kompute.dir/OpMemoryBarrier.cpp.o [ 66%] Building CXX object src/CMakeFiles/kompute.dir/OpTensorCopy.cpp.o [ 72%] Building CXX object src/CMakeFiles/kompute.dir/OpTensorSyncDevice.cpp.o [ 77%] Building CXX object src/CMakeFiles/kompute.dir/OpTensorSyncLocal.cpp.o [ 83%] Building CXX object src/CMakeFiles/kompute.dir/Sequence.cpp.o [ 88%] Building CXX object src/CMakeFiles/kompute.dir/Tensor.cpp.o [ 94%] Building CXX object src/CMakeFiles/kompute.dir/Core.cpp.o [100%] Linking CXX static library ../lib/libkompute.a [100%] Built target kompute Fixes Issue KomputeProject#310 Signed-off-by: hungrymonkey <tedchang2010@gmail.com>
https://gcc.gnu.org/gcc-12/porting_to.html There may be more issues related to gcc 12
|
My commit may be incomplete cmake -Bbuild I could not build the example code
|
ahh, Cmake fetches the old version I made a quick and dirty change and it compiles. I guess I will not include this change in my commit and let the maintainer deal with Cmake.
|
|
@hungrymonkey not sure I understand your last few comments - are you saying that you managed to get it to work with the fixes in the PR or without the fixes in the PR? |
I've reproduced and merged - thanks for the update |
I am saying there are two separate issues. The way you manage cmake seems like a build and release issue, so I will not handle it. |
I don't understand what you mean, what do you mean by build and release issue? Or what do you mean by handling it? |
The array_multiplication example code will fail to compile because the cmake fetches an old version of kompute on github instead of my local machine. |
I will write a separate bug report. |
@hungrymonkey got it, thanks for the context, I'll have a look at adding an option to allow this built from local repo |
Build fails on opensuse tumbleweed
The text was updated successfully, but these errors were encountered: