-
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
Fixed build error on gcc 12 #311
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>
hungrymonkey
force-pushed
the
fixbuilderror
branch
from
November 26, 2022 03:36
2473ab7
to
9eac80f
Compare
I did not touch any of the example cmake config files These examples fetches an old kompute version. |
Ok I've been able to reproduce, thank you for the contribution. |
axsaucedo
approved these changes
Nov 26, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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_ptrvk::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 copyFromTensor);
| ^~~~~~~~~~
/home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:108:40: error: expected ‘,’ or ‘...’ before ‘<’ token
108 | std::shared_ptr 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_ptrvk::PhysicalDevice mPhysicalDevice;
| ^~~~~~~~~~
/home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:6:1: note: ‘std::shared_ptr’ is defined in header ‘’; did you forget to ‘#include ’?
5 | #include "logger/Logger.hpp"
+++ |+#include
6 | #include
/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_ptrvk::Device mDevice;
| ^~~~~~~~~~
/home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:257:5: note: ‘std::shared_ptr’ is defined in header ‘’; did you forget to ‘#include ’?
257 | std::shared_ptrvk::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_ptrvk::Buffer mPrimaryBuffer;
| ^~~~~~~~~~
/home/doof/gitrepo/kompute/src/include/kompute/Tensor.hpp:260:5: note: ‘std::shared_ptr’ is defined in header ‘’; did you forget to ‘#include ’?
260 | std::shared_ptrvk::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_ptrvk::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 #310