Author

Topic: Bitcoin Formula for Mac OS X (Read 4050 times)

newbie
Activity: 39
Merit: 0
February 28, 2011, 02:28:35 PM
#9

Great!

Please let us know when they approve the pull request.

Thanks.
newbie
Activity: 11
Merit: 0
newbie
Activity: 39
Merit: 0
February 28, 2011, 01:47:02 PM
#7
I am not really sure how to make Homebrew install a specific version of berkeley-db. I will pay 10 BTC to whomever can fix the above formula so that it installs the correct version of the library. You may have to use the "keg_only" option to prevent conflicts with the main berkeley-db formula.

Melek,

According to the wiki, there is no way to depend on a specific version of a formula.

I will try to see if it is possible to have a formula as berkeley-db4.

Thanks.
newbie
Activity: 11
Merit: 0
February 28, 2011, 12:52:09 PM
#6
I am not really sure how to make Homebrew install a specific version of berkeley-db. I will pay 10 BTC to whomever can fix the above formula so that it installs the correct version of the library. You may have to use the "keg_only" option to prevent conflicts with the main berkeley-db formula.
newbie
Activity: 11
Merit: 0
February 28, 2011, 11:19:49 AM
#5
The official client uses an older version of Berkeley DB (4.8, according to build-osx.txt).

You're linking to Berkeley DB 5.1.19, so when you run your client it upgrades the bitcoin database files, which makes them incompatible with the official client.


Thanks for clarifying.

Are you planning to move the official client to the latest v5 at some point? Is v5 fully backward compatible with v4, i.e. can it read v4 wallets without modifications?
legendary
Activity: 1652
Merit: 2301
Chief Scientist
February 28, 2011, 07:48:51 AM
#4
The official client uses an older version of Berkeley DB (4.8, according to build-osx.txt).

You're linking to Berkeley DB 5.1.19, so when you run your client it upgrades the bitcoin database files, which makes them incompatible with the official client.
newbie
Activity: 11
Merit: 0
February 28, 2011, 05:55:58 AM
#3
Thus compile bitcoind and running it, leads to some kind of corruption in the data, and opening the official client gives an error. I am wondering what is causing that?

The only difference is that I am now dynamically linking, instead of statically linking the libraries. Am I using an outdated version of any of the libraries? Here is what I link against:

Code:
$ otool -L /usr/local/bin/bitcoind
/usr/local/bin/bitcoind:
/usr/local/Cellar/berkeley-db/5.1.19/lib/libdb_cxx-5.1.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_system-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_filesystem-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_program_options-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_thread-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
/usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1)
newbie
Activity: 11
Merit: 0
February 28, 2011, 05:14:21 AM
#2
I requested a merge to the default Homebrew branch, so the formula should be available shortly.
newbie
Activity: 11
Merit: 0
February 28, 2011, 05:13:13 AM
#1
I just created a homebrew formula for installation on Mac OS X

https://github.com/melek-bitcoin/homebrew/commit/eca924cddd868613937d692bab2c184187610020

Homebrew is a system similar to the gentoo port system, where all dependencies are resolved automatically and the installation is done by compilation from source, rather than downloading of binaries. You can read more about it here:

http://mxcl.github.com/homebrew/

Once you have Homebrew installed on your Mac, you can easily get bitcoind by typing

Code:
brew install bitcoind

and the dependencies on boost, boost, berkeley-db should be resolved automatically. OpenSSL is installed by default, and the bitcoind formula links against the default version.

All the linking is done dynamically rather than statically (unlike in the original source code).

I tested on 10.6 Snow Leopard:

Code:
$ brew install bitcoind
==> Downloading http://download.oracle.com/berkeley-db/db-5.1.19.tar.gz
==> ../dist/configure --disable-debug --prefix=/usr/local/Cellar/berkeley-db/5.1.19 --mandir=/usr/local/Cel
==> make install
/usr/local/Cellar/berkeley-db/5.1.19: 2634 files, 68M, built in 2.8 minutes
==> Downloading http://downloads.sourceforge.net/project/bitcoin/Bitcoin/bitcoin-0.3.20/bitcoin-0.3.20.01-macosx.zip
==> Downloading patches
==> Patching
patching file bitcoin-0.3.20.01/src/makefile.osx
==> make -f makefile.osx bitcoind -j3
/usr/local/Cellar/bitcoind/0.3.20.01: 1.8M, built in 73 seconds
Jump to: