Closed tymoteuszrogalewski closed 4 years ago
you could try using gcc 6 instead of gcc 5
sudo update-alternatives --config gcc
pick gcc 6 as your default and re-run cmake
Fixed. Thank you.
Thanks "xmrig" very much for last commit with fix :) Now compile with succes under ub16 :)
kl1059: thanks also, but with installing gcc-6 from ppa resources this fix compilation, but after copying binary to destination machine with ub16 I must also copy libstdc.so.6 with newer version, but thanks for help - now I know, how to manage compiler versions :)
Hi. I have ubuntu 16.04 gcc packages installed: gcc, gcc-5, gcc-5-base, gcc-6-base cuda installed 10.0
compile like this: git clone https://github.com/xmrig/xmrig-cuda.git cd xmrig-cuda/ cmake ./ -DCUDA_LIB=/usr/local/cuda/lib64/stubs/libcuda.so -- 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 -- Looking for builtin___clear_cache -- Looking for builtin___clear_cache - found -- 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 (found suitable version "10.0", minimum required is "8.0") -- Configuring done -- Generating done -- Build files have been written to: /home/miner/a/xmrig-cuda (with no errors yet) make [ 16%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/xmrig-cu_generated_cuda_core.cu.o [ 16%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/arqma/xmrig-cu_generated_randomx_arqma.cu.o [ 25%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/wownero/xmrig-cu_generated_randomx_wownero.cu.o [ 33%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/loki/xmrig-cu_generated_randomx_loki.cu.o [ 41%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/xmrig-cu_generated_cuda_extra.cu.o [ 50%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/xmrig-cu_generated_randomx.cu.o [ 58%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/monero/xmrig-cu_generated_randomx_monero.cu.o In file included from /usr/include/c++/5/cstdint:35:0, from /home/miner/a/xmrig-cuda/src/CudaCryptonightR_gen.h:4, from /home/miner/a/xmrig-cuda/src/cuda_core.cu:31: /usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
error This file requires compiler and library support \
^
If I do the same under ubuntu18 with installed gcc, gcc-7, gcc-7-base, gcc-8-base, than compile successfully, but such binary wont run under ubuntu 16 because no sufficient glibc version:
ldd libxmrig-cuda.so ./libxmrig-cuda.so: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by ./libxmrig-cuda.so)
with older versions xmrig-nvidia package there was no problem with compiling like this on ubuntu16
please help