Pages:
Author

Topic: [Paid] [Bounty: 10 BTC] Bitcoind build instructions for Centos x86 and x64 - page 2. (Read 15613 times)

legendary
Activity: 1102
Merit: 1014
This is the latest build I have 0.6. It will show a warning that it needs to update but if it helps you here it is.

http://owneo.com/bitcoind-60003-64bit-centos5

The build process hasn't worked for me since that version.

13DQrtowGDnZUie2j9WvsKuocR8cE2XJF1
hero member
Activity: 489
Merit: 500
legendary
Activity: 1102
Merit: 1014
hero member
Activity: 489
Merit: 500
Code:
/home/bytedisorder/Bitcoin/Deps/lib/libcrypto.a -lgcc -Wl,-Bstatic -l z -l dl -l pthread
/home/bytedisorder/Bitcoin/Deps/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
dso_dlfcn.c:(.text+0x21): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
obj/netbase.o: In function `LookupIntern':
/home/bytedisorder/bitcoin-master/src/netbase.cpp:90: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
obj/bitcoinrpc.o: In function `__static_initialization_and_destruction_0':

This seems to be the cause of the error, but this is a bit beyond me. I believe i have all of the needed libraries installed.
hero member
Activity: 489
Merit: 500
Does anybody have a working binary for CentOS, I have been trying to compile this makefile for about 2 days with a plethora of errors and one that seems to keep occurring:
Code:
collect2: ld returned 1 exit status
make: *** [bitcoind] Error 1

I'll send 1BTC to somebody for a working makefile or binary.

Thanks guys.
full member
Activity: 182
Merit: 100
Trying to compile it on a Centos 5.5 x64, got countless errors related to python, not sure why, I have python 2.4.3 installed:



The script kept going and it seemed fine until it finished like this:

Code:
bitcoin-bitcoin-6e3a1a3/src/test/wallet_tests.cpp
bitcoin-bitcoin-6e3a1a3/src/ui_interface.h
bitcoin-bitcoin-6e3a1a3/src/uint256.h
bitcoin-bitcoin-6e3a1a3/src/util.cpp
bitcoin-bitcoin-6e3a1a3/src/util.h
bitcoin-bitcoin-6e3a1a3/src/version.cpp
bitcoin-bitcoin-6e3a1a3/src/version.h
bitcoin-bitcoin-6e3a1a3/src/wallet.cpp
bitcoin-bitcoin-6e3a1a3/src/wallet.h
bitcoin-bitcoin-6e3a1a3/src/walletdb.cpp
bitcoin-bitcoin-6e3a1a3/src/walletdb.h
cat: /home/root/makefile.new: No such file or directory
make: *** No rule to make target `bitcoind'.  Stop.
cp: cannot stat `bitcoind': No such file or directory
kjj
legendary
Activity: 1302
Merit: 1026
Everything looks fine right up until actually trying to build bitcoind.

Code:
bitcoinrpc.cpp: In function âvoid RPCAcceptHandler(boost::shared_ptr >, boost::asio::ssl::context&, bool, AcceptedConnection*, const boost::system::error_code&)â:
bitcoinrpc.cpp:2771: error: reference to âerrorâ is ambiguous
util.h:135: error: candidates are: bool error(const char*, ...)
/home/kjj2/Bitcoin/Deps/include/boost/asio/error.hpp:57: error:                 namespace boost::asio::error { }
make: *** [obj/bitcoinrpc.o] Error 1

To be honest, I have no idea here.  I can't tell if this is because it is expecting a different version of boost, or if there was some syntax change in c++ between the version of gcc-g++ that ships with CentOS and the version that the devs use.  Since the docs say any version of boost after 1.37 is fine, but make no mention of the c++ version (at least not that I've noticed), I'm thinking it is probably the second one.

I'll grab a copy of bitcoin-master (0.6.99) and attempt to compile on a different box, and the beta 1.50 boost release.  Maybe one of those will give me a clue of some sort.
sr. member
Activity: 298
Merit: 252
Well thanks for the help, I ended up just moving us to ubuntu 11 because centos was 2 days running trying to compile with no luck.  With each version of this thing they make it harder and harder to compile in centos. Plus it gets more bloated each time. Before 3 clients used 375MB of ram, now those same 3 use 580MB of ram, this thing is a pig now!

The only problem in Ubuntu is the Boost bug that still is not fixed since version 9.04 Smiley ha ha. But I just added LC_ALL=C to our locale file and it work's fine, since this is the only thing the server's are used for.

Thanks though.
kjj
legendary
Activity: 1302
Merit: 1026
Sorry guys, I was very busy today and didn't have time to look at this.  Actually, I still am, but for different reasons.  I'll check this out as soon as I can, but that might end up being tomorrow morning instead of tonight.
legendary
Activity: 1102
Merit: 1014
Anyone have any info on this now?  We're trying to get 0.6.3 to compile in CentOS 5 and it's just not working at all, been working on it now for 2 days.
What kind of error message do you get? Where does the compile fail? Haven't tried compiling it myself...
sr. member
Activity: 298
Merit: 252
Anyone have any info on this now?  We're trying to get 0.6.3 to compile in CentOS 5 and it's just not working at all, been working on it now for 2 days.
newbie
Activity: 26
Merit: 0
Nope, guess I didn't make it clear in my EDIT:, I got it built after installing the *-static packages. Which I probably could've avoided by just doing the ldconfig thing you mentioned. Thanks for the cool script. Smiley

Now if only someone would make a .rpm and keep it up to date... Wink
kjj
legendary
Activity: 1302
Merit: 1026
Are you guys still having problems?
kjj
legendary
Activity: 1302
Merit: 1026
First, make sure you are not trying to do this as root.  There are several places where absolute paths must be specified without tilde expansion, so the path must be under /home/.  You can set the ownership of the binary to root and install it in a system path after it is built, but the build process only works as a different user.

Second, if you've recently installed zlib and/or zlib-devel, make sure you run ldconfig as root to update the library cache and symlinks.
newbie
Activity: 26
Merit: 0
I tried that script and I get this error:

Quote
g++ -pthread -Wextra -Wno-sign-compare -Wno-char-subscripts -Wno-invalid-offsetof -Wformat-security -g -DNOPCH -I/root/Bitcoin/Libraries/bitcoin-master/src -DUSE_SSL -fno-stack-protector -fstack-protector-all -Wstack-protector -Wl,-z,relro -Wl,-z,now -D_FORTIFY_SOURCE=2 -O2 -I"/home/root/Bitcoin/Deps/include" -static -o bitcoind obj/checkpoints.o obj/netbase.o obj/crypter.o obj/key.o obj/db.o obj/init.o obj/irc.o obj/keystore.o obj/main.o obj/net.o obj/protocol.o obj/bitcoinrpc.o obj/rpcdump.o obj/script.o obj/util.o obj/wallet.o   -Wl,-Bstatic -mtl /home/root/Bitcoin/Deps/lib/libboost_system.a -mtl /home/root/Bitcoin/Deps/lib/libboost_filesystem.a -mtl /home/root/Bitcoin/Deps/lib/libboost_program_options.a -mtl /home/root/Bitcoin/Deps/lib/libboost_thread.a /home/root/Bitcoin/Deps/lib/libdb_cxx.a -mtl /home/root/Bitcoin/Deps/lib/libssl.a -mtl /home/root/Bitcoin/Deps/lib/libcrypto.a -lgcc -Wl,-Bstatic -l z -l dl -l pthread
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [bitcoind] Error 1

What is this z library, why isn't it installed, and where can I get it?

It is a very common compression library.  You should be able to install it with:

Code:
yum install zlib

I get the same error, I have both zlib and zlib-devel installed.

EDIT: Installing zlib-static solved that error. I then got a second error for -ldl and installing glibc-static solved that issue too. Now that I look at the output from TT I notice that the build failed in a completely different place, mine failed at the very end when it's using the new makfile on bitcoind. So his problem is probably just not having zlib/zlib-devel installed.

Also, I think my problem may have been because I didn't remove the Bitcoin/ directory after some failed builds earlier from missing dependencies.
kjj
legendary
Activity: 1302
Merit: 1026
I tried that script and I get this error:

Quote
g++ -pthread -Wextra -Wno-sign-compare -Wno-char-subscripts -Wno-invalid-offsetof -Wformat-security -g -DNOPCH -I/root/Bitcoin/Libraries/bitcoin-master/src -DUSE_SSL -fno-stack-protector -fstack-protector-all -Wstack-protector -Wl,-z,relro -Wl,-z,now -D_FORTIFY_SOURCE=2 -O2 -I"/home/root/Bitcoin/Deps/include" -static -o bitcoind obj/checkpoints.o obj/netbase.o obj/crypter.o obj/key.o obj/db.o obj/init.o obj/irc.o obj/keystore.o obj/main.o obj/net.o obj/protocol.o obj/bitcoinrpc.o obj/rpcdump.o obj/script.o obj/util.o obj/wallet.o   -Wl,-Bstatic -mtl /home/root/Bitcoin/Deps/lib/libboost_system.a -mtl /home/root/Bitcoin/Deps/lib/libboost_filesystem.a -mtl /home/root/Bitcoin/Deps/lib/libboost_program_options.a -mtl /home/root/Bitcoin/Deps/lib/libboost_thread.a /home/root/Bitcoin/Deps/lib/libdb_cxx.a -mtl /home/root/Bitcoin/Deps/lib/libssl.a -mtl /home/root/Bitcoin/Deps/lib/libcrypto.a -lgcc -Wl,-Bstatic -l z -l dl -l pthread
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [bitcoind] Error 1

What is this z library, why isn't it installed, and where can I get it?

It is a very common compression library.  You should be able to install it with:

Code:
yum install zlib
TT
member
Activity: 77
Merit: 10
I tried that script and I get this error:

Quote
g++ -pthread -Wextra -Wno-sign-compare -Wno-char-subscripts -Wno-invalid-offsetof -Wformat-security -g -DNOPCH -I/root/Bitcoin/Libraries/bitcoin-master/src -DUSE_SSL -fno-stack-protector -fstack-protector-all -Wstack-protector -Wl,-z,relro -Wl,-z,now -D_FORTIFY_SOURCE=2 -O2 -I"/home/root/Bitcoin/Deps/include" -static -o bitcoind obj/checkpoints.o obj/netbase.o obj/crypter.o obj/key.o obj/db.o obj/init.o obj/irc.o obj/keystore.o obj/main.o obj/net.o obj/protocol.o obj/bitcoinrpc.o obj/rpcdump.o obj/script.o obj/util.o obj/wallet.o   -Wl,-Bstatic -mtl /home/root/Bitcoin/Deps/lib/libboost_system.a -mtl /home/root/Bitcoin/Deps/lib/libboost_filesystem.a -mtl /home/root/Bitcoin/Deps/lib/libboost_program_options.a -mtl /home/root/Bitcoin/Deps/lib/libboost_thread.a /home/root/Bitcoin/Deps/lib/libdb_cxx.a -mtl /home/root/Bitcoin/Deps/lib/libssl.a -mtl /home/root/Bitcoin/Deps/lib/libcrypto.a -lgcc -Wl,-Bstatic -l z -l dl -l pthread
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [bitcoind] Error 1

What is this z library, why isn't it installed, and where can I get it?
legendary
Activity: 1102
Merit: 1014
Paid. These files are now hosted in a git repo at https://github.com/weex/bitcoind-centos
kjj
legendary
Activity: 1302
Merit: 1026
Sure, put them anywhere you think they will be the most useful.

And the address in my signature will be fine.
legendary
Activity: 1102
Merit: 1014
This worked for me without a hitch on both a 32-bit and 64-bit CentOS system. I figure anyone who would have an objection should have said something by now.

Do you mind if I throw these two files up in a git repo?

Please post your address to claim the bounty.
Pages:
Jump to: