Author

Topic: Working CUDA Gentoo ebuilds for 0.3.13 and 0.3.14 (Read 3851 times)

legendary
Activity: 1470
Merit: 1006
Bringing Legendary Har® to you since 1952
Update: i have installed fresh AMD64 gentoo on my VM.
The things left to do is update it and test if the ebuild works.

I think i should be done in 2 days.

EDIT - update:
Unfortunately, my bigger (750GB) hard drive just died, so there is no chance of doing anything at the moment...
I will try to sit on it next weekend...
legendary
Activity: 1470
Merit: 1006
Bringing Legendary Har® to you since 1952
I was going the create a virtual machine and install "fresh" gentoo on it, but i didn't have a lot of time lately.
I have a super-long weekend now, so i guess i will try to fix it till sunday.
newbie
Activity: 1
Merit: 0
Im in the same boat with the gpucommon.cpp error. Any updates?
full member
Activity: 209
Merit: 100
Are you use only your ebuild 0.3.14c without other patching?
I post my Manifest to check for possible differences.
Quote
AUX Makefile.gentoo 1640 RMD160 81cc2f009a497d8890837d0688a35c9a9df9ff9b SHA1 d012614a35c7c333254eb4c4fb2fedf20ccb3978 SHA256 cc4c2f8a17c9553a241ac2d5b36ad38763e7eed604c03ab0e45163071a2c59b8
AUX Makefile.gentoo.cuda 3177 RMD160 f339dc726eae6cf02c40aff144c4674e7b0295e7 SHA1 7ef6ab2197a07847b62942afa93eb1f5a306a253 SHA256 e3402d61e5930beda60f58101af3fed11ddc6e7b89c9b29773f709410c76fca6
AUX bitcoin-9999-Makefile.patch 2368 RMD160 3924ccdcb2bb400f62ad30e581d88dc8702049f3 SHA1 0521061568c6739ecaee8603b817c75002bb0e11 SHA256 2245176658c3773dec0423e132339b379df654d29f4dc86e1fb423b3be6a663f
AUX bitcoin-9999-Makefile.patch.bak 3047 RMD160 2f5c2f110d5b505dbd0906e61ccc2a95fbbecffa SHA1 16638c363d7e11d6cbcd09e6c8e5897b0e073d04 SHA256 73e66c09cf5d0579a1d22259af64cd0b9c39f21970ce00e9551b4805644b84dc
AUX bitcoin-bindaddr.patch 1416 RMD160 af29f0823d1361e2969acfecb8d8483c989c1de5 SHA1 cf1eb273a7d6d606b7838ab5d7f6a340674635b7 SHA256 0a36fe0342840f2f6835fc57e8b36887b3cc2ab2d56e42bc9b68e3891bfa609f
AUX bitcoin-disable_ip_transactions.patch 680 RMD160 93edf55f830fd6cde478985d69b3475c7d30b88c SHA1 94baa46e09ceb62c90c9bfe0ec155fbc36505cc4 SHA256 53e6a4ca4552e160fb581bc2134b1214922072bc5051266e65fc85565ba06e32
AUX bitcoin-getblock.patch 4617 RMD160 44b5b2649fbade2a46151d119afd3751f3cd747c SHA1 3a10cf0b0b483c63961406a45b6dec987147d993 SHA256 3b9cc013b2099af46d08c1dff239d717e722f013702143ccadc1f688a7875816
AUX bitcoin-http-json-rpc-bind-any.patch 916 RMD160 2aa94aec513a774816814f558318a1233fdd6831 SHA1 4890bd68103ea7ea9e167a96514b53ac98db517f SHA256 729ba543425380bb00c7f3294b12bf115cca6fa933fe9c846effbbf155461623
AUX bitcoin-listgenerated.patch 2893 RMD160 a9bf8a24c512fd136376680b3dd4dd4c8097ae7e SHA1 107b795b69bb11dc79be4e2a3d5ec44dfe89a425 SHA256 9af0a26328547db397985643ad87374859ed8ca9e265e5ab0dbc8fa28cdea1c7
AUX bitcoin-max_outbound.patch 359 RMD160 8d444d8a0874497b95c4b0111bd97d52e4c3428f SHA1 b5136c9997a8b5449c34e7978437ce89c1fa1a7e SHA256 80422a9add4e26ea123bd7e639fd85cbd94d6a0a0435e0c53d4df665bc3d3264
AUX bitcoin.conf 80 RMD160 d55c1ac48956c33cf4bf231f21ea81a7b1adc244 SHA1 12406dc38cd00a8160cb4246b7a167f4319c6715 SHA256 541ae10cc2246b620de3e7efa97eee59efacf83d28ea5f1297a121d0708226d2
AUX bitcoin.confd 192 RMD160 539b974f4f1f17b01b8661b826356d75973bdd6b SHA1 1c2cbfaeadb89b5f7f9051efe78e035e0e193d40 SHA256 3d10be70413667505ed0fbb9c59548f8115c3c7b68bca8fe1497d50038f401dc
AUX bitcoin.initd 1444 RMD160 fbd1264f07b5a2ae4526214346041d3d3d0d7aee SHA1 9d2126a8ab9a8f69aa706390d98401e29ba2b478 SHA256 c98f2c5db7830750dc9a72628387d18da3a14295a7106c3e396ef0bb30c50567
DIST bitcoin-0.3.14c-linux.tar.gz 809994 RMD160 d70bb440be030f72457766011fff873c1e03fd62 SHA1 9fca6eff796091781e0ced7c08b5dc98f4f8234e SHA256 4459aec849ba23be9c24a1a7a13b25d3ff5dcfd4859e12c71011efc3d21adb77
EBUILD bitcoin-0.3.14c.ebuild 3636 RMD160 26be29d71ab85271468c312eb6cb920740c93075 SHA1 f430e2d0aac60ed7224a946071b6c34961ed1518 SHA256 93a31fbccaeb4dca9872c9cb6fed22f15017802a89ef97b38e5ad348e0e982ba
MISC makefile.gentoo 1572 RMD160 2de70b3a1d1048ff57bce03da2c37a9f8286a3cc SHA1 ae78d56901c89891ec7db84a70fc3bd74feb5363 SHA256 2d6efef2c67d9f4060850ca8012ee899ae8f399e66c0e713abf017066226c3fe
MISC makefile.unix 1714 RMD160 a69d7eebef170deda99ecd0635835707d5f4480b SHA1 08aff2f97393ed6f0b85efd13b4bbfdc810ee69f SHA256 8757b9a8e4397536da8e1a8cf9f3eb18fd27b9abdd9851203a4a87b4a2676096
legendary
Activity: 1470
Merit: 1006
Bringing Legendary Har® to you since 1952
1. I use 64bit Gentoo.
2. Yes, I do.
As I understood sources this bug caused by inline realization SHA256Transform in main.cpp.

OK.
I will unmerge all my versions of Bitcoin, erase all files except the ones that are on my server and then I will check if it builds correctly again.

But now i need to get out of house, i will be back in few hours. Stay tuned.
full member
Activity: 209
Merit: 100
1. I use 64bit Gentoo.
2. Yes, I do.
As I understood sources this bug caused by inline realization SHA256Transform in main.cpp.
legendary
Activity: 1470
Merit: 1006
Bringing Legendary Har® to you since 1952
Is ebuild cann't apply patch by own?

It can, but i don't want to play with creating too complex stuff because something may fail.

1. Are You using 32bit or 64bit Gentoo ?
2. Also, have You let emerge download sources on its own, or You patched 0.3.14c source Yourself ?

EDIT:
I'm working on the sollution.
full member
Activity: 209
Merit: 100
Is ebuild cann't apply patch by own?
Quote
# pwd
/tmp/portage/net-p2p/bitcoin-0.3.14c/work/bitcoin-0.3.14c
# ls -la
total 8
drwxr-xr-x 4 root    root     120 Oct 24 19:56 .
drwx------ 3 portage portage   60 Oct 30 17:16 ..
-rwxr-xr-x 1 root    root    1084 Sep 30 04:01 license.txt
drwxr-xr-x 9 root    root     180 Oct 20 04:01 locale
-rwxr-xr-x 1 root    root    2027 Sep 30 04:01 readme.txt
drwxr-xr-x 9 root    root    1140 Oct 30 17:23 src
# pwd
/tmp/portage/net-p2p/bitcoin-0.3.14c/work/bitcoin-0.3.14c/src
# ls -la
total 1392
drwxr-xr-x  9 root root   1140 Oct 30 17:23 .
drwxr-xr-x  4 root root    120 Oct 24 19:56 ..
-rw-r--r--  1 root root   5651 Oct 22 22:52 base58.h
-rw-r--r--  1 root root  14745 Oct 22 22:54 bignum.h
-rw-r--r--  1 root root   4390 Oct 22 20:55 bitcoinminercuda.cpp
-rw-r--r--  1 root root   9446 Oct 22 20:55 bitcoinminercuda.cu
-rw-r--r--  1 root root   1360 Oct 24 19:34 bitcoinminercuda.h
-rw-r--r--  1 root root   3497 Oct 22 22:54 build-msw.txt
-rw-r--r--  1 root root   6782 Oct 22 20:51 build-osx.txt
-rw-r--r--  1 root root   2266 Oct 22 20:51 build-unix.txt
drwxr-xr-x  4 root root    380 Oct 22 20:51 cryptopp
-rw-r--r--  1 root root   1262 Oct 22 20:55 cudashared.h
-rw-r--r--  1 root root  26665 Oct 22 22:55 db.cpp
-rw-r--r--  1 root root  12330 Oct 22 22:56 db.h
-rw-r--r--  1 root root  18092 Oct 22 20:55 gpl-2.0.txt
-rw-r--r--  1 root root  13274 Oct 24 19:35 gpucommon.cpp
-rw-r--r--  1 root root   3302 Oct 24 19:34 gpucommon.h
-rw-r--r--  1 root root   3645 Oct 22 22:59 headers.h
-rw-r--r--  1 root root  14258 Oct 24 16:22 init.cpp
-rw-r--r--  1 root root    483 Oct 22 23:01 init.h
-rw-r--r--  1 root root   9026 Oct 22 23:02 irc.cpp
-rw-r--r--  1 root root    485 Oct 22 23:02 irc.h
drwxr-xr-x  3 root root    320 Oct 22 20:51 json
-rw-r--r--  1 root root   4878 Oct 22 23:02 key.h
-rw-r--r--  1 root root   1956 Oct 22 23:02 license.txt
drwxr-xr-x 10 root root    220 Oct 22 20:51 locale
-rw-r--r--  1 root root 115874 Oct 24 19:32 main.cpp
-rw-r--r--  1 root root  43543 Oct 22 23:09 main.h
-rw-r--r--  1 root root   3166 Oct 30 17:16 Makefile
-rw-r--r--  1 root root   2251 Oct 22 20:51 makefile.mingw
-rw-r--r--  1 root root   1888 Oct 22 23:09 makefile.osx
-rw-r--r--  1 root root   1757 Oct 22 23:09 makefile.unix
-rw-r--r--  1 root root   2942 Oct 22 20:51 makefile.vc
-rw-r--r--  1 root root  46975 Oct 24 16:22 net.cpp
-rw-r--r--  1 root root  26880 Oct 22 23:16 net.h
-rw-r--r--  1 root root   2372 Oct 22 23:16 noui.h
drwxr-xr-x  4 root root    360 Oct 30 17:22 obj
drwxr-xr-x  3 root root    320 Oct 22 20:51 rc
-rw-r--r--  1 root root  49451 Oct 22 23:27 rpc.cpp
-rw-r--r--  1 root root    449 Oct 22 23:27 rpc.h
-rw-r--r--  1 root root  39233 Oct 22 20:51 script.cpp
-rw-r--r--  1 root root  19945 Oct 22 23:27 script.h
-rw-r--r--  1 root root  40118 Oct 22 23:28 serialize.h
-rw-r--r--  1 root root   5508 Oct 22 23:28 setup.nsi
-rw-r--r--  1 root root  20685 Oct 22 20:51 sha256.cpp
-rw-r--r--  1 root root   2638 Oct 22 23:28 strlcpy.h
drwxr-xr-x  6 root root    180 Oct 22 20:51 .svn
-rw-r--r--  1 root root  61963 Oct 22 23:30 uibase.cpp
-rw-r--r--  1 root root  15261 Oct 22 20:51 uibase.h
-rw-r--r--  1 root root  88778 Oct 22 23:30 ui.cpp
-rw-r--r--  1 root root  10020 Oct 22 23:30 ui.h
-rw-r--r--  1 root root  24800 Oct 22 23:30 uint256.h
-rw-r--r--  1 root root 463952 Oct 22 20:51 uiproject.fbp
-rw-r--r--  1 root root    650 Oct 22 20:51 ui.rc
-rw-r--r--  1 root root  22023 Oct 22 20:51 util.cpp
-rw-r--r--  1 root root  17908 Oct 22 23:32 util.h
drwxr-xr-x  3 root root    300 Oct 22 20:51 xpm
legendary
Activity: 1470
Merit: 1006
Bringing Legendary Har® to you since 1952
Are you forgot to link something?
bitcoin-0.3.14c
Quote
g++ -O2 -march=core2 -mtune=core2 -pipe -msse -msse2 -msse3 -mssse3 -mmmx -mcx16 -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -Wno-invalid-offsetof -Wformat -DFOURWAYSSE2 -I"/usr/include" -I"/usr/include/crypto++" -I"/usr/include/db4.8" -I"/opt/cuda/sdk/C/common/inc/" -I"/opt/cuda/include/" -D_BITCOIN_MINER_CUDA_ -o bitcoin obj/util.o obj/script.o obj/db.o obj/net.o obj/irc.o obj/main.o obj/rpc.o obj/init.o obj/bitcoinminercuda-cuda.o obj/bitcoinminercuda.o obj/gpucommon.o obj/ui.o obj/uibase.o obj/sha256.o -L/usr/lib64 -pthread   -lwx_gtk2u_xrc-2.9 -lwx_gtk2u_html-2.9 -lwx_gtk2u_qa-2.9 -lwx_gtk2u_adv-2.9 -lwx_gtk2u_core-2.9 -lwx_baseu_xml-2.9 -lwx_baseu_net-2.9 -lwx_baseu-2.9  -O1 -dead_strip -ldb_cxx -lboost_system -lboost_filesystem -lboost_program_options -lboost_thread -lgthread-2.0 -lssl -lcrypto -lcrypto++ -lgmp -ldl -lz -L"/opt/cuda"/lib64 -L"/opt/cuda"/sdk/shared/lib -L"/opt/cuda"/sdk/shared/lib/linux -L"/opt/cuda"/sdk/C/lib -L"/opt/cuda"/sdk/C/common/lib/linux/ -L"/opt/cuda"/open64/lib -lcuda -lcudart
obj/gpucommon.o: In function `BitcoinMinerGPU()':
gpucommon.cpp:(.text+0x278e): undefined reference to `SHA256Transform(void*, void*, void const*)'
gpucommon.cpp:(.text+0x3df2): undefined reference to `SHA256Transform(void*, void*, void const*)'
gpucommon.cpp:(.text+0x3e0c): undefined reference to `SHA256Transform(void*, void*, void const*)'
collect2: ld returned 1 exit status
make: *** [bitcoin] Error 1

Weird, i have never seen this error when building on my Gentoo...
Have You used patch, or just downloaded my sources ?

Also, can You post results of # ls -la /path/to/unpacked/source ?
full member
Activity: 209
Merit: 100
Are you forgot to link something?
bitcoin-0.3.14c
Quote
g++ -O2 -march=core2 -mtune=core2 -pipe -msse -msse2 -msse3 -mssse3 -mmmx -mcx16 -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -Wno-invalid-offsetof -Wformat -DFOURWAYSSE2 -I"/usr/include" -I"/usr/include/crypto++" -I"/usr/include/db4.8" -I"/opt/cuda/sdk/C/common/inc/" -I"/opt/cuda/include/" -D_BITCOIN_MINER_CUDA_ -o bitcoin obj/util.o obj/script.o obj/db.o obj/net.o obj/irc.o obj/main.o obj/rpc.o obj/init.o obj/bitcoinminercuda-cuda.o obj/bitcoinminercuda.o obj/gpucommon.o obj/ui.o obj/uibase.o obj/sha256.o -L/usr/lib64 -pthread   -lwx_gtk2u_xrc-2.9 -lwx_gtk2u_html-2.9 -lwx_gtk2u_qa-2.9 -lwx_gtk2u_adv-2.9 -lwx_gtk2u_core-2.9 -lwx_baseu_xml-2.9 -lwx_baseu_net-2.9 -lwx_baseu-2.9  -O1 -dead_strip -ldb_cxx -lboost_system -lboost_filesystem -lboost_program_options -lboost_thread -lgthread-2.0 -lssl -lcrypto -lcrypto++ -lgmp -ldl -lz -L"/opt/cuda"/lib64 -L"/opt/cuda"/sdk/shared/lib -L"/opt/cuda"/sdk/shared/lib/linux -L"/opt/cuda"/sdk/C/lib -L"/opt/cuda"/sdk/C/common/lib/linux/ -L"/opt/cuda"/open64/lib -lcuda -lcudart
obj/gpucommon.o: In function `BitcoinMinerGPU()':
gpucommon.cpp:(.text+0x278e): undefined reference to `SHA256Transform(void*, void*, void const*)'
gpucommon.cpp:(.text+0x3df2): undefined reference to `SHA256Transform(void*, void*, void const*)'
gpucommon.cpp:(.text+0x3e0c): undefined reference to `SHA256Transform(void*, void*, void const*)'
collect2: ld returned 1 exit status
make: *** [bitcoin] Error 1
legendary
Activity: 1470
Merit: 1006
Bringing Legendary Har® to you since 1952
It doesn't work with r173:
/tmp/portage/net-p2p/bitcoin-9999/temp/bitcoin-9999-Makefile.patch.out:
Quote
***** bitcoin-9999-Makefile.patch *****

=======================================

PATCH COMMAND:  patch -p0 -g0 -E --no-backup-if-mismatch < '/usr/local/portage/my/net-p2p/bitcoin/files/bitcoin-9999-Makefile.patch'

=======================================
patching file makefile.unix
Hunk #1 FAILED at 2.
1 out of 1 hunk FAILED -- saving rejects to file makefile.unix.rej

Forgot to tell You - don't use the *-9999-* ebuilds. They never worked for me either.
I'm deleting them from server. Also deleting all other irrelevant files & adjusting the Manifest.

The only working ebuilds in my release are "0.3.*c" ones.
full member
Activity: 209
Merit: 100
It doesn't work with r173:
/tmp/portage/net-p2p/bitcoin-9999/temp/bitcoin-9999-Makefile.patch.out:
Quote
***** bitcoin-9999-Makefile.patch *****

=======================================

PATCH COMMAND:  patch -p0 -g0 -E --no-backup-if-mismatch < '/usr/local/portage/my/net-p2p/bitcoin/files/bitcoin-9999-Makefile.patch'

=======================================
patching file makefile.unix
Hunk #1 FAILED at 2.
1 out of 1 hunk FAILED -- saving rejects to file makefile.unix.rej
legendary
Activity: 1470
Merit: 1006
Bringing Legendary Har® to you since 1952
Hello,

I'm starting this thread to maintain my Gentoo bitcoin ebuilds for CUDA version of bitcoin.
I will start a github repo later, so for now, ebuilds, patches and full sources are avaiable here:

http://tinyurl.com/2ujagcw

These are simply patches from puddinpop, adjusted for the newest version and with makefiles & dependencies added.
I also hope for some help from the author (puddinpop), because i don't think i can maintain this on my own for long, as I am not a C/C++ programmer, I am just good with patching & diffing.

I tested it on my 64Bit Gentoo, and they compile fine, but some paths are adjusted for 64bit Gentoo, so the ebuilds may not work without small adjustments of makefile (in net-p2p/bitcoin/files/Makefile.gentoo.cuda). So if it does not compile for You on 32bit, then try adjusting these paths in the makefile:
Code:
CUDALIBPATHS= \
 -L$(CUDAROOT)/lib64 \
 -L$(CUDAROOT)/sdk/shared/lib \
 -L$(CUDAROOT)/sdk/shared/lib/linux \
 -L$(CUDAROOT)/sdk/C/lib \
 -L$(CUDAROOT)/sdk/C/common/lib/linux/ \
 -L$(CUDAROOT)/open64/lib

Any donations to make my effort worthwhile are welcome.
1NLWBAD7ZD82fJDDawKfp5RAKSR8YWWYd3
Jump to: