Skip to content
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

compilation error . missing g++ flag -std=c++11 #47

Open
pescobar opened this issue Oct 7, 2019 · 0 comments
Open

compilation error . missing g++ flag -std=c++11 #47

pescobar opened this issue Oct 7, 2019 · 0 comments

Comments

@pescobar
Copy link

pescobar commented Oct 7, 2019

I have built a LibBI singularity container for a user in our cluster and she was hitting this error when using it:

$> libbi sample --model-file SIS.bi                                                                                                                                 
Error: make failed with return code 2, see opt/libbifile/.SIS/build_assert_openmp_sm_30/make.log for details

and in the log file I found this:

src/sample_cpu.cpp:713:77:   required from here
/usr/local/cuda/include/thrust/system/detail/generic/extrema.inl:221:89: error: 'lowest' is not a member of 'std::numeric_limits<double>'
Makefile:1016: recipe for target 'src/sample_cpu.o' failed
make: *** [src/sample_cpu.o] Error 1
make: *** Waiting for unfinished jobs....

The error is described here:
https://stackoverflow.com/questions/30663869/lowest-is-not-a-member-of-stdnumeric-limits

And the solution is described here ( enable the -std=c++11 compiler flag)
https://stackoverflow.com/a/30663908

I could workaround the issue executing libbi like this:

$> CXX="g++ -std=c++11" libbi sample --model-file SIS.bi

I guess the gcc flag -std=c++11 should be used by default? Or is there any better solution?

@pescobar pescobar changed the title compilation error . missing gcc flag -std=c++11 compilation error . missing g++ flag -std=c++11 Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant