update the code here: https://xmrig.com/docs/miner/build/ubuntu
for wider compatibility by issuing arguments for compiler version.
from:
1. git clone https://github.com/xmrig/xmrig-cuda.git
2. mkdir xmrig-cuda/build && cd xmrig-cuda/build
3. cmake .. -DCUDA_LIB=/usr/local/cuda/lib64/stubs/libcuda.so -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda
4. make -j$(nproc)
to:
1. git clone https://github.com/xmrig/xmrig-cuda.git
2. mkdir xmrig-cuda/build && cd xmrig-cuda/build
3. sudo apt install gcc-12 g++-12
4. cmake .. -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DCUDA_LIB=/usr/local/cuda/lib64/stubs/libcuda.so -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda
5. make -j$(nproc)
update the code here: https://xmrig.com/docs/miner/build/ubuntu
for wider compatibility by issuing arguments for compiler version.
from:
to: