brichard19 / BitCrack

A tool for cracking Bitcoin private keys
MIT License
752 stars 495 forks source link

"Build dependencies" in file README.md #97

Open UUSR opened 5 years ago

UUSR commented 5 years ago

Please add more detailed information to the section: Build dependencies I can not compile in Ubuntu 16.04

brichard19 commented 5 years ago

What happens when you try to build?

UUSR commented 5 years ago

@brichard19 There are many errors.

brichard19 commented 5 years ago

Can you please show the build errors?

The only build requirements are CUDA toolkit (for CUDA) or an OpenCL headers (for OpenCL).

UUSR commented 5 years ago

@brichard19 CUDA version: nvcc --version

nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2015 NVIDIA Corporation Built on Tue_Aug_11_14:27:32_CDT_2015 Cuda compilation tools, release 7.5, V7.5.17

lspci -k | grep -EA2 'VGA|3D|Display'

01:00.0 VGA compatible controller: NVIDIA Corporation Device 1b81 (rev a1) Subsystem: ASUSTeK Computer Inc. Device 8599 Kernel driver in use: nouveau

Gives an error at the end: make BUILD_CUDA=1

ptxas /tmp/tmpxft_00002bc3_00000000-6_CudaKeySearchDevice.ptx, line 178375; error : Call has wrong number of parameters ptxas fatal : Ptx assembly aborted due to errors Makefile:8: recipe execution error for goal «cuda» make[1]: *** [cuda] Error 255 make[1]: exit from the catalog «/home/uusr/BitCrack/CudaKeySearchDevice» Makefile:58: recipe execution error for goal «dir_cudaKeySearchDevice» make: *** [dir_cudaKeySearchDevice] Error 2

brichard19 commented 5 years ago

Your CUDA toolkit is too old. Try using at least 8.0. Preferably 9.2.

UUSR commented 5 years ago

@brichard19 I installed the package cuda 9.2 sudo apt-get install cuda-9-2

Reading package lists ... Done Building a dependency tree Reading status information ... Done The cuda-9-2 package of the newest version (9.2.148-1) is already installed. cuda-9-2 is manually installed. 0 updated, 0 new packages installed, 0 packages marked for deletion, and 0 packages not updated.

nvcc --version It shows that the old version is installed nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2015 NVIDIA Corporation Built on Tue_Aug_11_14:27:32_CDT_2015 Cuda compilation tools, release 7.5, V7.5.17

ogronome commented 5 years ago

Then remove cuda 7.5 or upgrade to latest ubuntu with apt-get update && apt-get dist-upgrade Why you bother author of bitcrack with stupid linux newbie questions? Ask on ubuntuforums

UUSR commented 5 years ago

@ogronome Everything worked out. mkdir -p /home/uusr/BitCrack/bin cp clKeyFinder.bin /home/uusr/BitCrack/bin/clBitCrack cp ../CLKeySearchDevice/*.cl /home/uusr/BitCrack/bin make[1]: exit from the catalog «/home/uusr/BitCrack/KeyFinder»

2018-12-12 15-52-57

Roundtree-Larry commented 5 years ago

Same problem ,any solution ?

UUSR commented 5 years ago

@Roundtree-Larry update CUDA, everything works for me.

Roundtree-Larry commented 5 years ago

Please How did you update it ? because I have CUDA 10.0 ,but not work , I tried install CUDA 10.1 ,but I get the problem of #include I really don't know what is the problem. and if the build was done, how can open .exe in terminal ? Or there is another bruteforce in linux ? THanks

Here is the problem that I get after using cuda9 :

r - CudaKeySearchDevice.cu.o r - CudaKeySearchDevice.o r - cuda_libs.o r - cudabridge.cu.o make[1]: Leaving directory '/content/BitCrack-master/CudaKeySearchDevice' make --directory KeyFinder make[1]: Entering directory '/content/BitCrack-master/KeyFinder' g++ -DBUILD_CUDA -o cuKeyFinder.bin ConfigFile.cpp main.cpp DeviceManager.cpp -I/content/BitCrack-master/util -I/content/BitCrack-master/AddressUtil -I/content/BitCrack-master/CmdParse -I/content/BitCrack-master/CryptoUtil -I/content/BitCrack-master/KeyFinderLib -I/content/BitCrack-master/CLKeySearchDevice -I/content/BitCrack-master/CudaKeySearchDevice -I/content/BitCrack-master/cudaMath -I/content/BitCrack-master/clUtil -I/content/BitCrack-master/cudaUtil -I/content/BitCrack-master/secp256k1lib -I/content/BitCrack-master/Logger -I/content/BitCrack-master/embedcl -I/usr/local/cuda-9.2/include -O2 -std=c++11 -L/content/BitCrack-master/lib -L/usr/local/cuda-9.2/lib64 -lkeyfinder -laddressutil -lsecp256k1 -lcryptoutil -lsecp256k1 -lcudautil -llogger -lutil -lCudaKeySearchDevice -lcudadevrt -lcudart -lcmdparse main.cpp: In function ‘void printDeviceList(const std::vector&)’: main.cpp:262:79: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘long unsigned int’ [-Wformat=] printf("Memory: %lldMB\n", devices[i].memory / ((uint64_t)1024 * 1024)); ^ /content/BitCrack-master/lib/libCudaKeySearchDevice.a(cuda_libs.o): In function __cudaRegisterLinkedBinary_66_tmpxft_00002dac_00000000_12_cuda_device_runtime_compute_70_cpp1_ii_8b1a5d37': link.stub:(.text+0x1ea): undefined reference to__fatbinwrap_66_tmpxft_00002dac_00000000_12_cuda_device_runtime_compute_70_cpp1_ii_8b1a5d37' collect2: error: ld returned 1 exit status Makefile:5: recipe for target 'all' failed make[1]: [all] Error 1 make[1]: Leaving directory '/content/BitCrack-master/KeyFinder' Makefile:90: recipe for target 'dir_keyfinder' failed make: [dir_keyfinder] Error 2