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

ubuntu 16.04 compile error: fatal error: device_functions.hpp: No such file or directory #64

Closed
calvintam236 opened this issue Dec 14, 2017 · 5 comments
Labels

Comments

@calvintam236
Copy link

$ cmake .. -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-9.1 -DWITH_HTTPD=OFF && 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 UV: /usr/lib/x86_64-linux-gnu/libuv.so  
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found CUDA: /usr/local/cuda-9.1 (found suitable version "9.1", minimum required is "7.5") 
-- Found NVML: /usr/local/cuda-9.1/include  
-- Looking for syslog.h
-- Looking for syslog.h - found
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/xmrig-nvidia-2.4.2/build
[  2%] Building NVCC (Device) object CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o
/tmp/xmrig-nvidia-2.4.2/src/nvidia/cuda_extra.cu:7:32: fatal error: device_functions.hpp: No such file or directory
compilation terminated.
CMake Error at xmrig-cuda_generated_cuda_extra.cu.o.cmake:207 (message):
  Error generating
  /tmp/xmrig-nvidia-2.4.2/build/CMakeFiles/xmrig-cuda.dir/src/nvidia/./xmrig-cuda_generated_cuda_extra.cu.o


make[2]: *** [CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o] Error 1
CMakeFiles/xmrig-cuda.dir/build.make:70: recipe for target 'CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o' failed
make[1]: *** [CMakeFiles/xmrig-cuda.dir/all] Error 2
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/xmrig-cuda.dir/all' failed
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Could not compile. Any idea how to fix this, @xmrig?

@reddec
Copy link

reddec commented Dec 15, 2017

Found solution:
change in /xmrig-nvidia-2.4.2/src/nvidia/cuda_extra.cu device_functions.hpp to device_functions.h

I think it's due to newer version of Cuda

@calvintam236
Copy link
Author

@xmrig please fix it in the master branch and make a new release.

@raulpdlr
Copy link

raulpdlr commented Dec 16, 2017

ditto what calvin said, reddec's approach worked

@calvintam236
Copy link
Author

@raulpdlr @xmrig I am building it inside Docker, so the source code has to be changed in order for the build to work when it clones from here.

xmrig added a commit that referenced this issue Dec 17, 2017
@xmrig
Copy link
Owner

xmrig commented Dec 17, 2017

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants