Title: HOWTO: Compiling Bitcoin v0.3 on FreeBSD (7.2,7.3,8.0) Post by: The Madhatter on July 15, 2010, 03:32:04 PM Step 1:
Install the following from the ports tree: x11-toolkits/gtk20 devel/boost-all devel/gmake databases/db48 Step 2: Install wxWidgets 2.9 from source. The ports version won't work. You can get 2.9 here: http://prdownloads.sourceforge.net/wxwindows/wxWidgets-2.9.0.tar.bz2 Step 3: Apply the attached patch to the "makefile.unix" file. cd ~/bitcoin-0.3/src/ patch < makefile.unix.patch.txt Step 4: Tweak any compiler options in makefile.unix. (See the CFLAGS line). The default options are the options I use on my machines. They are: "-O3 -march=nocona -fstack-protector". Be sure to set your 'march' at the very least. Step 5: Build with: gmake -f makefile.unix bitcoind And enjoy! :) $ cat ~/.bitcoin/debug.log |grep "Bitcoin version" Bitcoin version 0.3.0 beta, OS version FreeBSD 8.0-RELEASE-p3 amd64 $ And what about performance? It's insanely great on FreeBSD. Especially with the ULE scheduler. CPU: Intel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz (2666.38-MHz K8-class CPU) hashmeter 4 CPUs 2585 khash/s :D Title: Re: HOWTO: Compiling Bitcoin v0.3 on FreeBSD (7.2,7.3,8.0) Post by: Dereckson on September 20, 2010, 09:17:23 PM Good evening,
Thank you for your howto, it allows me to prepare a FreeBSD port for Bitcoin. Could you attach makefile.unix.patch.txt your patch? It seems you forgot it. Title: Re: HOWTO: Compiling Bitcoin v0.3 on FreeBSD (7.2,7.3,8.0) Post by: The Madhatter on September 20, 2010, 11:44:13 PM I didn't forget to attach it. Look again.
Title: Re: HOWTO: Compiling Bitcoin v0.3 on FreeBSD (7.2,7.3,8.0) Post by: Hiro Protagonist on October 15, 2010, 04:42:16 AM Good evening, Thank you for your howto, it allows me to prepare a FreeBSD port for Bitcoin. Any status on the FreeBSD port? Thanks for this HOWTO. Any ideas on the best way to run bitcoind as a daemon on the system? Title: Re: HOWTO: Compiling Bitcoin v0.3 on FreeBSD (7.2,7.3,8.0) Post by: The Madhatter on October 15, 2010, 04:57:00 AM Each time I am close to submitting a port, the codebase/makefiles change. I'm waiting until the development of Bitcoin dies down a tad before I work on the port again.
Compiling it on FreeBSD is easier now. You just have to enable a define, adjust some library/include paths, and it compiles and runs great. :) Title: Re: HOWTO: Compiling Bitcoin v0.3 on FreeBSD (7.2,7.3,8.0) Post by: lucky on January 03, 2011, 01:37:42 AM Compiling it on FreeBSD is easier now. You just have to enable a define, adjust some library/include paths, and it compiles and runs great. :) Could you (or someone else) explain that a bit further? I've been trying to get 0.3.19 it to compile on FBSD for about half an hour now with no success. Title: Re: HOWTO: Compiling Bitcoin v0.3 on FreeBSD (7.2,7.3,8.0) Post by: Metal on January 07, 2011, 04:04:39 AM It seems that the original makefile.unix won't work as-is for most folks.
In my case, I had to use the output of `wx-config --cflags` and `wx-config --libs` to make the build work on a ubuntu hardy box (thanks to Diablo-3D for pointing me in the right direction.) Are we okay with having a few build recipes hanging around old forum posts, or should there be an attempt at foolproofing the build process a bit? Maybe some light autoconf/automake use would help here. Title: Re: HOWTO: Compiling Bitcoin v0.3 on FreeBSD (7.2,7.3,8.0) Post by: The Madhatter on January 07, 2011, 04:12:45 AM Here is the complete makefile.unix that I used to build Bitcoin 0.3.19 on FreeBSD-8.1-RELEASE/amd64:
You'll need to install the following from ports: gmake boost-all db47 (you can use db48, but you'll have to change the makefile a bit) openssl (from ports works best) After you drop in this makefile.unix file, just run "gmake -f makefile.unix bitcoind" and you'll have a "bitcoind" binary. :) Code: # Copyright (c) 2009-2010 Satoshi Nakamoto Edit: If you want the GUI you'll need to install "x11-toolkits/gtk20" from ports, and install wxwidgets 2.9 from source (it's not in the ports tree). Use the makefile above and run "gmake -f makefile.unix bitcoin". Title: Re: HOWTO: Compiling Bitcoin v0.3 on FreeBSD (7.2,7.3,8.0) Post by: Gavin Andresen on January 07, 2011, 05:23:32 PM Great! I'd like to see this good work make it back into mainline bitcoin; please talk with the other improve-the-build-process efforts and submit some patches.
Title: Re: HOWTO: Compiling Bitcoin v0.3 on FreeBSD (7.2,7.3,8.0) Post by: gelraen on May 20, 2011, 12:10:27 PM Now bitcoin from git repo works fine with databases/db46 and x11-toolkits/wxgtk29
Code: Bitcoin version 0.3.22-beta Code: diff --git a/src/makefile.unix b/src/makefile.unix Title: Re: HOWTO: Compiling Bitcoin v0.3 on FreeBSD (7.2,7.3,8.0) Post by: Vladimir on May 22, 2011, 10:13:01 AM This is of course based on published above excellent guide. Thanks to The Madhatter.
However, instead of all that, now one can simply do this: cd /usr/ports/net-p2p/bitcoin; make install clean; rehash you will even have a chance to select/deselect GUI and upnp stuff. |