firoorg / ccminer

mtp ccminer developpment
GNU General Public License v3.0
102 stars 55 forks source link

Error compiling 1.2.1 #52

Closed mzk32 closed 5 years ago

mzk32 commented 5 years ago

I got an error when compiling version 1.2.1:

/usr/bin/ld: compat/libs/x64/libgpu101.a(test_temp.o): relocation R_X86_64_PC32 against symbol `cudaHostAlloc@@libcudart.so.10.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: compat/libs/x64/libgpu101.a(cuda_mtp.lib): relocation R_X86_64_PC32 against symbol `__cudaUnregisterFatBinary@@libcudart.so.10.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: nonrepresentable section on output

i have libcudart in this location:

$ locate libcudart
/usr/lib/x86_64-linux-gnu/libcudart.so
/usr/lib/x86_64-linux-gnu/libcudart.so.10.1
/usr/lib/x86_64-linux-gnu/libcudart.so.10.1.105
/usr/lib/x86_64-linux-gnu/libcudart_static.a

i couldn't figure out how to recompile with -fPIC, please help

thank you

djm34 commented 5 years ago

In principle you don't need to compile with -fPIC. You just need to have cuda on your $PATH variable. Make sure you do ./autogen.sh ; ./configure; make

Also, you should probably use 1.2.0; 1.2.1 has a problem with the solo version it was supposed to fix. (I am working on it)