-
Notifications
You must be signed in to change notification settings - Fork 94
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
Linking CUDA executable exception_helpers fails #579
Comments
Thanks for letting us know! I don't think we ever used a version of GCC that recent, that might contribute to the issue (I didn't even know CUDA 10.2 supports such recent GCC versions). For completeness, can you post your |
Yeah, for CUDA 10.2 only gcc <= 8 is supported. I'll try clang or an older version of gcc. Here is my CMakeCache.txt and i am working on 74f47ac. |
From afar, these look like the code isn't compiled with What if you do something like: nm build/third_party/gtest/build/googlemock/gtest/./libgtest.a | grep "basic_stringstream" I guess you will have a reference to std::__cxx11::...? And what is the command used for compiling this cuda example, by using |
Weird, shouldn't gcc default to c++ 14? To me it looks like a problem propagating the Here are the relevant outputs:
|
The last output is for the linking command, what about the compiling one? You would need to do Also, my opinion is not that |
After recompiling, can you also try to run: |
As a side comment, I tried to reproduce the issue in a container based on Ubuntu but failed. Everything compiles successfully. I had to explicitly give as a host compiler One can use the image I think the root of the issue is not really in GCC 10.1 then but rather in the compiler that you use as CUDA host compiler. Either |
@tcojean sorry, i missed the building step.
As you can see there is no -std=c++11 flag, does nvcc default to pre c++ 11? I tried compiling it using clang 10.0.0 which had ended with the same linker error, which rules gcc out. As for the nm output:
I am running on arch linux and will try to reproduce it in a clean container, to rule out my machine setup as the root cause. |
Thanks for the new details. @thoasm also looked a bit into it on his own Arch Linux setup and seems to be having the same issue. It is intriguing that no mention of |
Ok, the build output line was wrong, it got truncated at the line break. So the full output was
|
So i found a similar issue on the arch linux bug tracker. |
Yes, it is the same for me. For some reason, an |
Yes, setting |
Thanks for checking and solving this! |
Hi,
when building ginkgo I get the following linker error:
[ 28%] Linking CUDA executable exception_helpers /usr/bin/ld: ../../../third_party/gtest/build/googlemock/gtest/./libgtest.a(gtest-all.cc.o): in function
testing::internal::JsonUnitTestResultPrinter::PrintJsonTestCase(std::ostream*, testing::TestCase const&)':
gtest-all.cc:(.text+0x2008c): undefined reference to
std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()' /usr/bin/ld: ../../../third_party/gtest/build/googlemock/gtest/./libgtest.a(gtest-all.cc.o): in function
testing::internal::JsonUnitTestResultPrinter::PrintJsonUnitTest(std::ostream*, testing::UnitTest const&)':
gtest-all.cc:(.text+0x20f1b): undefined reference to
std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()' /usr/bin/ld: ../../../third_party/gtest/build/googlemock/gtest/./libgtest.a(gtest-all.cc.o): in function
testing::internal::edit_distance::CreateUnifiedDiff(std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::alloca
tor > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, st
d::char_traits, std::allocator > > > const&, unsigned long)':
gtest-all.cc:(.text+0x233e3): undefined reference to
std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()' /usr/bin/ld: ../../../third_party/gtest/build/googlemock/gtest/./libgtest.a(gtest-all.cc.o): in function
testing::AssertionResult testing::internal::FloatingPointLE(char const*, char const*, float, float)':gtest-all.cc:(.text.ZN7testing8internal15FloatingPointLEIfEENS_15AssertionResultEPKcS4_T_S5[ZN7testing8internal15FloatingPointLEIfEENS_15AssertionResultEPKcS4_T_S5
]+0xfc): undefined reference to
std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()' /usr/bin/ld: gtest-all.cc:(.text._ZN7testing8internal15FloatingPointLEIfEENS_15AssertionResultEPKcS4_T_S5_[_ZN7testing8internal15FloatingPointLEIfEENS_15AssertionResul tEPKcS4_T_S5_]+0x13a): undefined reference to
std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >::basic_stringstream()'/usr/bin/ld: ../../../third_party/gtest/build/googlemock/gtest/./libgtest.a(gtest-all.cc.o):gtest-all.cc:(.text.ZN7testing8internal15FloatingPointLEIdEENS_15Assertion
ResultEPKcS4_T_S5[ZN7testing8internal15FloatingPointLEIdEENS_15AssertionResultEPKcS4_T_S5]+0x124): more undefined references to
std::__cxx11::basic_stringstream<ch ar, std::char_traits<char>, std::allocator<char> >::basic_stringstream()' follow /usr/bin/ld: ../../../core/libginkgo.so.1.1.1: undefined reference to
std::__cxx11::basic_ostringstream<char, std::char_traits, std::allocator >::basic_ostringstream()@GLIBCXX_3.4.26'
collect2: error: ld returned 1 exit status
make[2]: *** [cuda/test/base/CMakeFiles/cuda_test_base_exception_helpers.dir/build.make:111: cuda/test/base/exception_helpers] Error 1
make[1]: *** [CMakeFiles/Makefile2:2908: cuda/test/base/CMakeFiles/cuda_test_base_exception_helpers.dir/all] Error 2
`
I use the following tools with given version
The text was updated successfully, but these errors were encountered: