-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Example fails to run (std::system_error) #67
Comments
I believe this is also fixed along with the fix for #65. If you are still seeing it, please let me know the platform and compiler, and if you can attach a debugger for a stack trace, even better :) |
Problem is still happening. I'm also using gtest library in exactly same setup and works without any problems. If you need more information please let me know. Compiled with CLANG 3.5 in C++11 mode, 64bit, ubuntu 14.04 Stack trace:
BTW: libbenchmark was compiled using cmake, so most likely G++ was used for that part |
Let me know if it will be tracked here or new issue is required |
Tracking here is fine. Thanks so much for the detailed stack. Interestingly I'm on exactly the same system and compiler and don't see the same issue. |
As I checked code it looks to be some problem in sysinfo.cc or related calls - so might be related to my library building and/or environment. Here's output from cmake:
Here's output from make:
If you have some idea about info you need, let me know. Reverting back to previous question - now it's confirmed that example was compiled with clang, but library itself with gnu |
I also tried compiling library with export CXX=/usr/bin/clang++; export CC=/usr/bin/clang but result is exactly the same (i mean error during runtime) |
Are you using the stock Ubuntu 14.04 libc? |
If this is what you are asking for :) I did not do any standard library variations, except of installing libc++ but AFAIK it's not being used by default |
If the example is compiled with clang and the library with g++ you're going to have issues. If you change the compiler, you may have to reconfigure (rerun cmake) from a clean setup. Can you try that please? |
That's exactly what I did when I mentioned exporting CXX with clang value (make clean, removed cmake files, run cmake, make) Unfortunately result is the same. Have no idea what can be the problem, gtest works just fine so it looks to be specific to some library which benchmark depends on |
I've tested this in Debug and Release on the following system:
cmake output (from clean):
and ninja (i don't use make, though i doubt it would matter) doesn't have any output really. then:
where 67_test is:
I don't know what else to suggest. What version of g++ do you have installed? Just in case it's using the std lib from there and it's old (pre 4.6 or something)?
|
I had the same problem, running Ubuntu 14.04 and using g++ 4.8.2: What did the trick, at least for me, was linking against lpthread: |
Ah yes, the std::thread needs pthread issue. I will add something to the documentation. |
|
@odeits you should use GCC's |
Tried to run first example (master @ d750144) and got following result:
As I checked any of following lines (even when run alone) cause that problem:
Full file for reference:
The text was updated successfully, but these errors were encountered: