Closed vlebedev closed 10 years ago
Thanks, I fixed missing itoa.h reference. Now, for g++ you need to add std=c++11 so g++ can understand auto keyword. I do not test on a Linux box, but I think if you change Makefile line nvcc = /usr/local/cuda/bin/nvcc --machine 64 -O3 -arch=sm_20 -c to nvcc = /usr/local/cuda/bin/nvcc --compiler-options std=c++11 --machine 64 -O3 -arch=sm_20 -c then I think it should work.
Please let me know if it works.
No, it did not work:
/usr/local/cuda/bin/nvcc --compiler-options -std=c++11 --machine 64 -O3 -arch=sm_20 -c bison.cu
/usr/include/c++/4.7/x86_64-linux-gnu/bits/c++config.h(177): error: identifier "nullptr" is undefined
/usr/include/c++/4.7/x86_64-linux-gnu/bits/c++config.h(177): error: expected a ";"
/usr/include/c++/4.7/exception(65): error: expected a ";"
[...]
/usr/include/c++/4.7/bits/cpp_type_traits.h(315): error: expected a ">"
Segmentation fault
make: *** [bison.o] Error 139
Looks like CUDA doesn't support certain C++ 11 features in gcc : http://stackoverflow.com/questions/12073828/c-version-supported-by-cuda-5-0 So I removed C++ 11 features from the alenka source code.
Let me know if it works for you now.
Sorry, but there are still compilation errors:
bison.y(1092): error: namespace "std" has no member "to_string"
bison.y(1108): error: namespace "std" has no member "to_string"
bison.y(2344): error: namespace "std" has no member "to_string"
3 errors detected in the compilation of "/tmp/tmpxft_000042e3_00000000-6_bison.cpp1.ii".
make: *** [bison.o] Error 2
Can you try compiling it with --compiler-options std=c++11 ?
Compilation of Alenka fails under Linux:
I've commented out
#include "itoa.h"
line in cm.h, in this case compilation also fails:Here is my environment: