Basically, you do this:
Download the distribution tarball or repository. You can use the link on the project's GitHub page.
If you used the distribution tarball, unpack it.
Obtain any needed prerequisites. Things you may need include the development packages or source builds of: OpenSSL, Boost, libZ, GLib2, and BerkeleyDB. You should be able to use your distribution's development packages for everything with the possible exception of OpenSSL. I don't know offhand if Ubuntu ships a version that will work with the Bitcoin client (including ECDSA support). If not, rebuild OpenSSL from the source with default options.
Make a copy of the supplied UNIX makefile (called
makefile.unix
) and call itMakefile
.Adjust the
Makefile
you created as needed. You may need to: Add include/library paths for the prerequisites if they're not in the usual places. Localize the name of the BerkeleyDB distribution, for example 'db_cxx-5.1' instead of 'db_cxx'. Localize the name of some Boost libraries (on some distributions, most will need '-mt' added to the end).Type 'make' and hope for the best.
If it didn't work, figure out why and fix it.
One caution: If two builds of the Bitcoin client are linked against different versions of the BerkeleyDB package, they may not be able to read each other's database files (including the wallet.dat
file). There is a process to convert the files (dump to text on one version, build from text on another) but it's cumbersome and perilous.
Update: To your two specific issues, the fix is to remove (or comment out) lines 476 and 479 in the net.h
file, the extern
declarations of pnodeLocalHost
and hListenSocket
. (Be careful, when you remove one, the line number of the other may change. Identify both changes before you make either.)