OSX - I was able to compile but linking fails with undefined symbols (_cu*) in bitcoinminercuda.cpp.o.
I'm only trying to compile a rpc cuda miner, so BITCOIN_ENABLE_CUDA and BITCOIN_BUILD_RPC_MINER options are on and others are off.
Linking CXX executable rpcminer
Undefined symbols:
"_cuMemcpyDtoH_v2", referenced from:
CUDARunner::RunStep() in bitcoinminercuda.cpp.o
CUDARunner::FindBestConfiguration() in bitcoinminercuda.cpp.o
"_cuCtxDestroy", referenced from:
CUDARunner::~CUDARunner()in bitcoinminercuda.cpp.o
CUDARunner::~CUDARunner()in bitcoinminercuda.cpp.o
CUDARunner::~CUDARunner()in bitcoinminercuda.cpp.o
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
"_cuMemAlloc_v2", referenced from:
CUDARunner::AllocateResources(int, int)in bitcoinminercuda.cpp.o
CUDARunner::AllocateResources(int, int)in bitcoinminercuda.cpp.o
"_cuParamSeti", referenced from:
CUDARunner::RunStep() in bitcoinminercuda.cpp.o
CUDARunner::RunStep() in bitcoinminercuda.cpp.o
CUDARunner::FindBestConfiguration() in bitcoinminercuda.cpp.o
CUDARunner::FindBestConfiguration() in bitcoinminercuda.cpp.o
"_cuParamSetv", referenced from:
CUDARunner::RunStep() in bitcoinminercuda.cpp.o
CUDARunner::RunStep() in bitcoinminercuda.cpp.o
CUDARunner::FindBestConfiguration() in bitcoinminercuda.cpp.o
CUDARunner::FindBestConfiguration() in bitcoinminercuda.cpp.o
"_cuDeviceGetCount", referenced from:
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
"_cuCtxCreate_v2", referenced from:
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
"_cuInit", referenced from:
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
"_cuLaunchGrid", referenced from:
CUDARunner::RunStep() in bitcoinminercuda.cpp.o
CUDARunner::FindBestConfiguration() in bitcoinminercuda.cpp.o
"_cuModuleUnload", referenced from:
CUDARunner::~CUDARunner()in bitcoinminercuda.cpp.o
CUDARunner::~CUDARunner()in bitcoinminercuda.cpp.o
CUDARunner::~CUDARunner()in bitcoinminercuda.cpp.o
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
"_cuParamSetSize", referenced from:
CUDARunner::RunStep() in bitcoinminercuda.cpp.o
CUDARunner::FindBestConfiguration() in bitcoinminercuda.cpp.o
"_cuMemcpyHtoD_v2", referenced from:
CUDARunner::RunStep() in bitcoinminercuda.cpp.o
CUDARunner::FindBestConfiguration() in bitcoinminercuda.cpp.o
"_cuMemFree_v2", referenced from:
CUDARunner::DeallocateResources() in bitcoinminercuda.cpp.o
CUDARunner::DeallocateResources() in bitcoinminercuda.cpp.o
"_cuDeviceComputeCapability", referenced from:
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
"_cuDeviceGet", referenced from:
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
"_cuModuleGetFunction", referenced from:
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
"_cuFuncSetBlockShape", referenced from:
CUDARunner::RunStep() in bitcoinminercuda.cpp.o
CUDARunner::FindBestConfiguration() in bitcoinminercuda.cpp.o
"_cuModuleLoad", referenced from:
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
CUDARunner::CUDARunner()in bitcoinminercuda.cpp.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [cmake-rpcminer/rpcminer] Error 1
make[1]: *** [cmake-rpcminer/CMakeFiles/rpcminer.dir/all] Error 2
make: *** [all] Error 2
here's what the linker runs (contents of cmake-rpcminer/CMakeFiles/rpcminer.dir/link.txt)
/usr/bin/c++ -Wl,-search_paths_first -headerpad_max_install_names CMakeFiles/rpcminer.dir/__/sha256.cpp.o CMakeFiles/rpcminer.dir/__/rpcminer/hex.cpp.o CMakeFiles/rpcminer.dir/__/rpcminer/httprequest.cpp.o CMakeFiles/rpcminer.dir/__/rpcminer/rpcminerclient.cpp.o CMakeFiles/rpcminer.dir/__/rpcminer/rpcminermain.cpp.o CMakeFiles/rpcminer.dir/__/rpcminer/rpcminerthreadcpu.cpp.o CMakeFiles/rpcminer.dir/__/rpcminer/rpcrequest.cpp.o CMakeFiles/rpcminer.dir/__/json/json_spirit_reader.cpp.o CMakeFiles/rpcminer.dir/__/json/json_spirit_value.cpp.o CMakeFiles/rpcminer.dir/__/json/json_spirit_writer.cpp.o CMakeFiles/rpcminer.dir/__/minercommon/base64.c.o CMakeFiles/rpcminer.dir/__/cryptopp/cpu.cpp.o CMakeFiles/rpcminer.dir/__/cryptopp/sha.cpp.o CMakeFiles/rpcminer.dir/__/rpcminer/rpcminerthreadgpu.cpp.o CMakeFiles/rpcminer.dir/__/cuda/bitcoinminercuda.cpp.o ./rpcminer_generated_bitcoinminercuda.cu.o -o rpcminer /usr/local/cuda/lib/libcudart.dylib -Wl,-rpath -Wl,/usr/local/cuda/lib /opt/local/lib/libboost_date_time-mt.a /opt/local/lib/libboost_filesystem-mt.a /opt/local/lib/libboost_program_options-mt.a /opt/local/lib/libboost_regex-mt.a /opt/local/lib/libboost_system-mt.a /opt/local/lib/libboost_thread-mt.a /usr/lib/libssl.dylib /usr/lib/libcrypto.dylib /usr/lib/libcurl.dylib -lpthread /usr/local/cuda/lib/libcudart.dylib -Wl,-rpath -Wl,/usr/local/cuda/lib /opt/local/lib/libboost_date_time-mt.a /opt/local/lib/libboost_filesystem-mt.a /opt/local/lib/libboost_program_options-mt.a /opt/local/lib/libboost_regex-mt.a /opt/local/lib/libboost_system-mt.a /opt/local/lib/libboost_thread-mt.a /usr/lib/libssl.dylib /usr/lib/libcrypto.dylib /usr/lib/libcurl.dylib -lpthread
I tried with various options, even reoganized the linker line but no success so far. Tried with both cuda sdk 3.2 and cuda sdk 4.0rc2.