1

I'm using CentOS on my server, and when I try to compile bitcoin from the github source using make -f makefile.unix, I get a ton of errors. I'm assuming they're caused by dependency errors?

I've seen a bunch of dependency lists for debian-based linux distros which use apt-get, but I'd like to know what I need for CentOS. Installing the dependencies from the debian lists using yum show the packages as unavailable.

Here's the huge error list, if anyone wants it: http://pastebin.com/1y2wCH5N

1

If you want to compile Bitcoin on CentOS 6, you will need more than just Bitcoin; several other dependencies are either missing or too old.

The particulars:

  • Boost is too old. CentOS 6 has version 1.41, but Bitcoin requires features first introduced in Boost 1.47.
  • Berkeley DB is too old. CentOS 6 has version 4.7, but Bitcoin wants version 4.8 (but see below for more on this).
  • OpenSSL may be missing some elliptic curve algorithms required for Bitcoin, due to Red Hat's extremely conservative legal stance with respect to ECC. (See bugs 319901 and 1020292, among others.)
  • The qrencode and miniupnpc libraries, necessary for the Bitcoin GUI to support QR codes and UPnP respectively, are missing entirely. (A server-only build doesn't need them, though.)
  • Older versions of the Bitcoin codebase did not work with Qt 4.6, the version shipped with CentOS 6, but required Qt 4.7. I fixed this with a one-liner, and it was patched upstream. This probably won't affect you, though, unless you're building old code for some reason.

You also need these packages, which do exist in CentOS 6:

  • db4-devel
  • autoconf automake libtool

And you also need this package from EPEL:

  • protobuf-devel

For a build including the GUI, you also need:

  • qt-devel desktop-file-utils

Then you need to patch Bitcoin to accept using Berkeley DB 4.7; by default the configure script bails if BDB 4.8 is not present, even if you pass the configure option that is supposed to override this. And be warned that wallets created by this build may or may not work with Bitcoin compiled with BDB 4.8.

Then you need to patch it again to make it compile on the older versions of gcc and glibc shipped with EL6, as the current Bitcoin code assumes a compiler supporting C++11 is being used. It's a one line patch, but it took me half an hour to track down.

As you can see, this is kind of painful, and the missing libraries alone cause most people to give up.

Most of these packages (except miniupnpc) are in CentOS 7, so if you're going down this road, that's probably a better starting point.

I've been maintaining versions of those libraries, along with an SELinux-enhanced Bitcoin build, for a couple of years now. It's much easier to just grab the repo and install the existing RPM packages since I've done all this work for you. But if you really want to cover that ground again, there's your road map.

0

I don't use Red Hat but I've found this guide quite recent: http://www.ripplex.biz/blog/compiling-bitcoin-on-centos-v6-4

you'll find there the dep list.

I'm copying there here in case of 404 of the original website:

Install QT, boost, db4 and zlib development packages:

yum install qt-devel boost-devel db4-devel zlib-devel

  • Awesome, thanks! Before you answered, I ended up downloading the binary from sourceforge. Is it safe to compile this and use the new binary instead? As long as it uses the same data directory, it should still keep the same data, right? – timetofly Aug 13 '13 at 14:54
  • I think it is safe. Probably compiling it you could optimize the binary for your pc, but I don't know it there would be any sensible difference. About the data dir is more a configuration issue than other. So I'd say it is ok – ddddavidee Aug 15 '13 at 17:21
  • Interesting. What is the process of optimizing the binary? How is this done? – timetofly Aug 15 '13 at 21:43
  • I think this would be more on topic on other SE sites, btw I would suggest to read this wikipedia page Optimizing compiler to understand what it means. – ddddavidee Aug 15 '13 at 22:04
  • Thanks for the link. I'm solely a web developer, so don't know much about non-web development and compilation. Thanks a bunch. – timetofly Aug 16 '13 at 1:53
0

You need to install QT, boost, db4 and zlib development packages, on cent-os command line try this.

yum install qt-devel boost-devel db4-devel zlib-devel

after that you can download and extract the archive of bitcoind from http://bitcoin.org/en/download

0

Here's what I used successfully on Fedora 20:

$ sudo yum groupinstall -y "Development Tools" "Development Libraries"
$ sudo yum install -y gcc-c++ libtool swig pyqt4-devel python-psutil python-twisted wget protobuf-devel

See https://bitcoin.stackexchange.com/a/30106/19021

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.