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

How to install the package? Building NVCC (Device) object CMakeFiles fund some error. #21

Closed
ixiaoli opened this issue Mar 13, 2018 · 2 comments

Comments

@ixiaoli
Copy link

ixiaoli commented Mar 13, 2018

hi,@ankurhanda ,
The following is the output after command "luarocks make gvnn-scm-1.rockspec"
cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/hpj/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/hpj/torch/install/lib/luarocks/rocks/gvnn/scm-1" && make

-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Torch7 in /home/hpj/torch/install
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp
-- Compiling with OpenMP support
-- Found CUDA: /usr (found suitable version "7.5", minimum required is "4.0")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hpj/gvnn/build
Scanning dependencies of target gvnn
[ 25%] Building C object CMakeFiles/gvnn.dir/init.c.o
[ 50%] Linking C shared module libgvnn.so
[ 50%] Built target gvnn
[ 75%] Building NVCC (Device) object CMakeFiles/cugvnn.dir/cugvnn_generated_init.cu.o
/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 cugvnn_generated_init.cu.o.cmake:267 (message):
Error generating file
/home/hpj/gvnn/build/CMakeFiles/cugvnn.dir//./cugvnn_generated_init.cu.o

CMakeFiles/cugvnn.dir/build.make:63: recipe for target 'CMakeFiles/cugvnn.dir/cugvnn_generated_init.cu.o' failed
make[2]: *** [CMakeFiles/cugvnn.dir/cugvnn_generated_init.cu.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/cugvnn.dir/all' failed
make[1]: *** [CMakeFiles/cugvnn.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Error: Build error: Failed building.
THX~

@ankurhanda
Copy link
Owner

Did you google it? BVLC/caffe#4046

@ixiaoli
Copy link
Author

ixiaoli commented Mar 14, 2018

hi!@ankurhanda
I add that flag to my CMakeLists.txt it fixed the problem and compiles fine. ie. Add this near the front:
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} "-D_FORCE_INLINES" ")
thank you!

@ixiaoli ixiaoli closed this as completed Mar 14, 2018
@ixiaoli ixiaoli reopened this Mar 14, 2018
@ixiaoli ixiaoli closed this as completed Mar 14, 2018
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

2 participants