Monday, April 30, 2012

Build and Run MaidSafe-DHT on Mac OS X

1. Install command line tools for Xcode
Xcode -> Preferences -> Downloads -> Components, Click “Install” behind “Command Line Tools”.

2. Install MacPorts
Download dmg from, and install.

3. Install Boost with MacPorts
sudo port install boost

4. Install gcc-4.6 with MacPorts
sudo port install gcc46

5. Making and Installing MaidSafe-Common
VERY important: to make cmake to use gcc 4.6:
$ export CC=/opt/local/bin/gcc-mp-4.6
$ export CXX=/opt/local/bin/g++-mp-4.6
$ cd MaidSafe-Common/maidsafe_common_lib/build/OSX/Release
$ cmake ../../..
$ cmake --build . --target install

6. Making and Installing MaidSafe-Transport
$ cd MaidSafe-Transport/build/OSX/Release
$ cmake ../../..
$ cmake --build . --target install

7. Making and Installing MaidSafe-DHT
$ cd MaidSafe-DHT/build/OSX/Release
$ cmake ../../..
$ cmake --build . --target install

8. Run it!
We need to run at least k (defaults to 4) nodes. The first node must be run with -f (--first_node) flag. The other nodes should be run with “-b bootstrap_contacts”.
Now we can use the available commands to store and retrieve values.

No comments:

Post a Comment