-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conan build fails with segv on gcc 9.1.0 #897
Comments
I have similar problem. Conan version is 1.21.2 |
@Croydon who did the conan integration... any ideas? it looks a bit like a missing pthread reference (pure guess). |
I am currently facing this issue with conan 1.24. I have tried with clang-10, gcc-9.3 and gcc-7.5, all face the same issue. The problem can be reproduced by using this conan recipe and the below: https://conan.io/center/benchmark/1.5.0/?user=_&channel=_&revision=&os=Linux&tab=recipe conanfile.txt
CMakeLists.txt
test.cpp
The issue is caused inside here:
The
But when we get inside
|
I have found the culprit, when building with Conan for reasons unbeknownst to me it is adding the compile defintion: If I build benchmark manually everything is fine, if I add this flag like Conan I get the segfault occuring above (when the executable doesn't use the same define) |
And the fix is to use |
@maddisoj Thanks for figuring this out! According to the readme Benchmark indeed requires a C++11 compatible standard library, so the Conan recipe should disallow other builds. I will create PRs here and on CCI |
For what it's worth benchmark compiles perfectly fine with From what I've been reading that define exists so that you can compile a C++11 binary to be compatible with a C++03 or earlier binary. https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html Conan page on the issue: https://docs.conan.io/en/latest/howtos/manage_gcc_abi.html |
conan removed :) |
I had this problem with libavrocpp on Conan. Seems like c++11 should be the default for new projects. We shouldn't have to do something special. If you are targeting older gcc versions, then force the special setup. Thanks for this thread!! |
Found when trying to use conan and google benchmark on a brand new repository. Minimum reproducible example is here, which tries to compile the example usage of benchmark and compile/link it to conan library
The text was updated successfully, but these errors were encountered: