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

Problem in compiling with CUDA 7.5 on Ubuntu 16.04 #42

Open
samson-wang opened this issue Sep 6, 2016 · 4 comments
Open

Problem in compiling with CUDA 7.5 on Ubuntu 16.04 #42

samson-wang opened this issue Sep 6, 2016 · 4 comments

Comments

@samson-wang
Copy link

When makefile after cmake preprocessing, get this error message

/usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’:
/usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope
   return (char *) memcpy (__dest, __src, __n) + __n;
                                          ^
CMake Error at inn_generated_SpatialStochasticPooling.cu.o.cmake:267 (message):
  Error generating file
  /home/samson/Repo/imagine-nn/build/CMakeFiles/inn.dir//./inn_generated_SpatialStochasticPooling.cu.o


CMakeFiles/inn.dir/build.make:70: recipe for target 'CMakeFiles/inn.dir/inn_generated_SpatialStochasticPooling.cu.o' failed
make[2]: *** [CMakeFiles/inn.dir/inn_generated_SpatialStochasticPooling.cu.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/inn.dir/all' failed
make[1]: *** [CMakeFiles/inn.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

From this issue, BVLC/caffe/issues/4046 , it seems to be an incompatibility between g++-5.0 and CUDA 7.5.

I'm not familiar with the cmake tool chain. I just add -D_FORCE_INLINES to CUDA_NVCC_FLAGS in CMakeCache.txt to solve the compile problem. The diffs as follow.

207c207
< CUDA_NVCC_FLAGS:STRING=-D_FORCE_INLINES

---
> CUDA_NVCC_FLAGS:STRING=
@arunpatala
Copy link

relevant torch/torch7#670

@arunpatala
Copy link

I added this to beginning of CMakeLists.txt

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORCE_INLINES")

@Alek-dr
Copy link

Alek-dr commented Sep 18, 2016

One simple question. I faced with the same problem, added string to CMakeLists.txt. How to install? If just type "luarocks install inn-1.0-0.rockspec" it will clone from git.

@arunpatala
Copy link

luarocks make inn-1.0-0.rockspec

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

3 participants