Please login or register.

How to compile Monero

[size=14pt]Compiling Instructions[/size]

Crossposting here because compiling instructions keep on getting lost in our main ANN talk thread. There are general compile instructions on the github here:

https://github.com/monero-project/bitmonero

Noobs and others! Welcome to Monero, the cryptocurrency thats kind of a real pain the ass to use because its truly volunteer open source development that takes a while and we're all drinking way too much coffee to have this kind of patience! Here, I provide instructions on how to compile the bleeding edge version of Monero in Linux - meaning, its still in testing. If you're interested in Monero to the extent to actually consider compiling, thats awesome - because you're probably more into the software cool technology part of this stuff as opposed to the dollas and cents. And if you're like me, you can't actually code - so your stuck in this place where all you can do is hope the price goes up and try ranting and raving about Monero anywhere you can.

Well no more! Now you're going to become a Monero Compiler! Compiling from the github repository gets you the latest, bleeding edge version of the software, so you can help find bugs and and otherwise test that everything works the way it should.

As of writing, the bleeding edge of Monero includes a LOT of features that the current binary releases do not have. The ones that I find important and interesting are: LMDB - a databased blockchain. This allows monero to run with 50 megs of RAM, which is awesome. Recently, there were some optimizations that allow really fast sync times. Additionally, there's been some fun wallet software updates, that include sweep dust and view-only wallets. There's probably a lot more that I'm missing, but I don't fully understand all that goes on. As I've said before, I'm just a dude - not a dev.

Warning - this compiles recent head, which should be considered experimental code - test before you trust! (i.e., send tiny amounts of money before using this code to send ALL your money. It's been working for everyone that uses it with little glitches here and there, but hey, if you find a bug, report the bug!!!)

NOTE: I can personally check compiling in Ubuntu as detailed below. If you are building in other systems, try mimicking the dependencies of the Ubuntu instructions. I will try to keep these up to date (compiling head is a moving target due to development)

REGARDING BLOCKCHAIN BOOTSTRAPS:  As of 20150906, the bootstraps available on the getmonero.org website are from the old in-memory version. Thus, they are not immediately compatible with this version you are about to compile. There is a way to convert one to the other. The recommended order is blockchain_export, followed by blockchain_import. Honestly, I would suggest just synchronizing from the network. It will probably take just as long as doing the conversions.  

UBUNTU 14.04

DEPENDENCIES CAPABLE OF BUILDING 20150901 commit cf88e4d
If you are building a more recent head, it might not work. You can try rolling back to a different commit, by typing git checkout insert-comit-hash-here after step #5. You can get specific commits here: https://github.com/monero-project/bitmonero/commits/master

  1. '''sudo apt-get update'''
  2. [code]sudo apt-get upgrade -y[/code]
  3. [code]sudo apt-get install -y git gcc-4.9 cmake libunbound2 libevent-2.0-5 libgtest-dev libboost1.55-all-dev libevent-dev libssl-dev build-essential pkg-config miniupnpc libdb++-dev libdb-dev[/code]
  4. [code]git clone https://github.com/monero-project/bitmonero.git[/code]
  5. [code]cd bitmonero[/code]
  6. [code]make[/code]

These were provided by Arux, as documented by me here

There is a more in depth tutorial made by Antanst here

If you get no errors, you're ready to start the daemon and begin syncing the blockchain. [code]cd build/release/bin ./bitmonerod[/code]

If the timestats are annoying (this was for optimization), you can add --show-time-stats 0

Open another Terminal window. Now you can run simplewallet and start using Monero! [code]./simplewallet[/code]

LINUX MINT 17.2 instructions as figured out by robricc here: https://bitcointalk.org/index.php?topic=583449.msg12042051#msg12042051

  1. [code]sudo apt-get update[/code]
  2. [code]sudo apt-get install -y git gcc-4.9 cmake libunbound2 libevent-2.0-5 libgtest-dev libboost1.55-dev libboost-system1.55-dev libboost-filesystem1.55-dev libboost-thread1.55-dev libboost-date-time1.55-dev libboost-chrono1.55-dev libboost-regex1.55-dev libboost-serialization1.55-dev libboost-program-options1.55-dev libunbound-dev build-essential libssl-dev libdb++-dev libdb-dev[/code]
  3. [code]git clone https://github.com/monero-project/bitmonero.git cd bitmonero make[/code]

From saddambitcoin

Have you been thinking it's [i]“Way too hard to acquire these Monero Bucks”[/i]?

[size=20pt]A Step By Step Guide to Compiling Monero on OSX:[/size]

I've noticed an increase of people wanting to compile the latest code. While there are plenty of Linux resources I haven't seen many for OSX. Also, the bitmonero Github README points to instructions that install an older release, which is not what you want.

The good thing is, the instructions are not much different from Linux, but if you're new to the command line this may be intimidating to figure out.

Just follow these instructions step by step in your Terminal and you'll be running in no time.

  1. Install Homebrew. [code]ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"[/code]

  2. Install various packages needed to build the Monero daemon and wallet. [code]brew install git boost cmake libevent miniupnpc  pkg-config[/code]

  3. Clone the bitmonero repository to your computer using Git. [code]git clone https://github.com/monero-project/bitmonero.git bitmonero[/code]

  4. [code]cd bitmonero[/code]

  5. Finally, compile the code. [code]make release[/code]

  6. If you get no errors, you're ready to start the daemon and begin syncing the blockchain. [code]cd build/release/bin ./bitmonerod[/code]

  7. Command+T to open another Terminal tab. Now you can run simplewallet and start using Monero! [code]./simplewallet[/code]

  8. If you found this guide helpful, feel free to donate 1 XMR like so: [code]transfer 3 47Vmj6BXSRPax69cVdqVP5APVLkcxxjjXdcP9fJWZdNc5mEpn3fXQY1CFmJDvyUXzj2Fy9XafvUgMbW91ZoqwqmQ6RjbVtp 1[/code]

(thats saddambitcoins address, btw. Spread the monero! put more outputs on the blockchain!)

[size=14pt]Archlinux and other rare variants, [/size] as detailed here on one of these awesome i2p web URLs

http://cucjrcntebdskoljhpxj4xc3bmietslv7nfg5uy7itgrbgppcb6q.b32.i2p.us/arch.html

[code]pacman -Sy; pacman -S boost boost-libs git gcc autoconf automake cmake db unbound gtest ldns expat bison pkg-config; git clone https://github.com/libevent/libevent; cd libevent;./autogen.sh;./configure --prefix=/usr;make;make install; cd; git clone https://github.com/monero-project/bitmonero; cd bitmonero; make release-static[/code]

This guy is on a role: I'll actually copy these to this thread eventually.

How to compile Monero on FreeBSD: http://cucjrcntebdskoljhpxj4xc3bmietslv7nfg5uy7itgrbgppcb6q.b32.i2p.us/freebsd.html http://moneronodes.i2p.xyz/freebsd.html

How to compile Monero on RHEL 7 / CentOS 7 / Fedora: linkie 1 or linkie 2 http://cucjrcntebdskoljhpxj4xc3bmietslv7nfg5uy7itgrbgppcb6q.b32.i2p.us/centos.html http://moneronodes.i2p.xyz/centos.html

How to compile Monero on OpenSUSE 13.2: linkie 1 or linkie 2 http://cucjrcntebdskoljhpxj4xc3bmietslv7nfg5uy7itgrbgppcb6q.b32.i2p.us/opensuse.html http://moneronodes.i2p.xyz/opensuse.html

How to compile Monero on Mageia 5: linkie 1 or linkie 2 http://cucjrcntebdskoljhpxj4xc3bmietslv7nfg5uy7itgrbgppcb6q.b32.i2p.us/mageia.html http://moneronodes.i2p.xyz/mageia.html

How to compile Monero on Slackware: linkie 1 or linkie 2 http://cucjrcntebdskoljhpxj4xc3bmietslv7nfg5uy7itgrbgppcb6q.b32.i2p.us/slackware.html http://moneronodes.i2p.xyz/slackware.html

How to compile Monero on Gentoo: linkie 1 or linkie 2 http://cucjrcntebdskoljhpxj4xc3bmietslv7nfg5uy7itgrbgppcb6q.b32.i2p.us/gentoo.html http://moneronodes.i2p.xyz/gentoo.html

[size=14pt]File a bug report using these steps: [/size] 1. Try to reproduce the bug. Some bugs are very glitchy in nature and won't reproduce easily, but try. 2. google a bit to see if this has been discovered already, or is known. Known bugs (as far as I'm aware) include:

A. sigfault on exit B. daemon stall due to suspected dethreading (use print_cn when daemon has stalled, you will see two header rows) C. funds get stuck in locked status - this can happen when you make a transaction in simplewallet when the daemon isn't syncronized. This can be rescued by regenerating your wallet.

  1. Use this template to report your issue. At first, just report the bug here, and we can try to do some triage before filling the github with issues. If this thread becomes a mess, we can go straight to the github, try a triage thing on the forum.getmonero.org, or make a new moderated thread.

Operating System: windows 8.1, Ubuntu 15.0~, etc Hardware details: system RAM, CPU information, free space on HD - e.g., 8 gigs RAM, AMD FX9590 Describe activity: e.g., I was mining on 3 threads and trying to make a 90 mixin transaction and all of a sudden my computer turned into a giant purple people eater Commit: insert the commit #. this will allow people that are debugging to know which version of the software you compiled. When the daemon is running, type "help". At the top of this output, there will be something like "bitmonero v0.8.8.7-1737fec" The bolded part can be used to identify the commit. There are other, better ways to get the version info, but I forget them.

Okay, this should be a good starting point. I had made videos on how to compile in a linux virtual machine, but I need to redo them. if you follow part 1 of my virtual machine series (https://www.youtube.com/watch?v=upX2SOZXYnk), that will get you started with the virtual machine. You can then use the above commands in a terminal to start playing with compiling Monero.

edited 20150803 to add libboost1.55-all-dev to the dependency line for ubuntu install, might be redundant with libboost1.55-dev in there. Also added linux mint instructions.

edited 20150805 - shortened it to the libboost1.55-all-dev, but then added it back in.

Basically, if it throw errors, google the shit outta something and ask. Look below for AmericanPegasus's battle with Mint.

At one point I stopped citing people who contributed to figuring out various dependencies. Sorry! But if you look below you can see who figured out what. GODSPEED YOU MIGHTY COMPILER!

From the main ANN thread: If you have old Monero stuff on your PC, the newer builds can throw errors when you try to sync. See below to fix.

[quote author=dEBRUYNE link=topic=583449.msg12059100#msg12059100 date=1438771165] [quote author=skunk link=topic=583449.msg12059071#msg12059071 date=1438770840] [code] 2015-Aug-05 12:28:22.322839 [P2P8][188.134.79.203:18080 OUT]Sync data returned unknown top block: 202622 -> 681852 [479230 blocks (332 days) behind] SYNCHRONIZATION started 2015-Aug-05 12:28:26.961903 [P2P9][188.134.79.203:18080 OUT]-->>NOTIFY_REQUEST_GET_OBJECTS: blocks.size()=200, txs.size()=0requested blocks count=200 / 200 2015-Aug-05 12:28:28.195987 [P2P8][109.10.159.165:18080 OUT]Got NEW BLOCKS inside of handle_response_get_objects: size: 200 2015-Aug-05 12:28:28.204492 [P2P8]HASH: - VIN/VOUT: 41/80 H: 0 chcktx: 2 2015-Aug-05 12:28:28.211067 [P2P8]HASH: - VIN/VOUT: 45/45 H: 0 chcktx: 1 2015-Aug-05 12:28:28.223177 [P2P8]HASH: - VIN/VOUT: 79/51 H: 0 chcktx: 3 2015-Aug-05 12:28:28.246164 [P2P8]Height: 202623 blob: 286 cumm: 46946 p/t: 14 (4/0/0/0/0/0/9/0/0/0/7)ms 2015-Aug-05 12:28:28.252709 [P2P8]HASH: - VIN/VOUT: 55/54 H: 0 chcktx: 1 2015-Aug-05 12:28:28.256634 [P2P8]HASH: - VIN/VOUT: 1/55 H: 0 chcktx: 0 2015-Aug-05 12:28:28.264167 [P2P8]Height: 202624 blob: 285 cumm: 14468 p/t: 4 (0/1/0/0/0/0/2/0/0/0/2)ms 2015-Aug-05 12:28:28.270787 [P2P8]HASH: - VIN/VOUT: 24/69 H: 0 chcktx: 1 2015-Aug-05 12:28:28.279580 [P2P8]HASH: - VIN/VOUT: 53/52 H: 0 chcktx: 3 2015-Aug-05 12:28:28.279954 [P2P8]ERROR /home/skunk/bitcoin/bitmonero/src/cryptonote_core/tx_pool.cpp:189 internal error: try to insert duplicate iterator in key_image set 2015-Aug-05 12:28:35.640622 [P2P4][176.9.89.217:18080 OUT]-->>NOTIFY_REQUEST_GET_OBJECTS: blocks.size()=200, txs.size()=0requested blocks count=200 / 200 2015-Aug-05 12:28:37.736564 [P2P8][80.82.78.38:18080 OUT]-->>NOTIFY_REQUEST_GET_OBJECTS: blocks.size()=200, txs.size()=0requested blocks count=200 / 200 2015-Aug-05 12:28:42.500006 [P2P6][176.9.89.217:18080 OUT]Got NEW BLOCKS inside of handle_response_get_objects: size: 200 2015-Aug-05 12:28:42.520971 [P2P6]HASH: - VIN/VOUT: 25/78 H: 0 chcktx: 2 2015-Aug-05 12:28:42.521279 [P2P6]ERROR /home/skunk/bitcoin/bitmonero/src/cryptonote_core/tx_pool.cpp:189 internal error: try to insert duplicate iterator in key_image set 2015-Aug-05 12:28:44.526165 [P2P5][80.82.78.38:18080 OUT]Got NEW BLOCKS inside of handle_response_get_objects: size: 200 2015-Aug-05 12:28:44.549773 [P2P5]HASH: - VIN/VOUT: 24/69 H: 0 chcktx: 2 2015-Aug-05 12:28:46.933277 [P2P9][31.128.159.34:18080 OUT]-->>NOTIFY_REQUEST_GET_OBJECTS: blocks.size()=200, txs.size()=0requested blocks count=200 / 200 2015-Aug-05 12:28:51.512626 [P2P6][31.128.159.34:18080 OUT]Got NEW BLOCKS inside of handle_response_get_objects: size: 200 2015-Aug-05 12:28:51.522660 [P2P6]HASH: - VIN/VOUT: 71/46 H: 0 chcktx: 3 2015-Aug-05 12:28:51.523018 [P2P6]ERROR /home/skunk/bitcoin/bitmonero/src/cryptonote_core/tx_pool.cpp:189 internal error: try to insert duplicate iterator in key_image set print_height 202624 [/code] ok, it seems there is something indigestible for master wallet at this block height... i give up, will come back in some months... [/quote]

warptangent said this on irc last night, I just stumbled upon it:

about this issue, skunk could try removing the existing poolstate.bin file. most people running a client from last year onwards, without having cleared that file, probably have dangling key images (left over from txs no longer in the pool)  https://bitcointalk.org/index.php?topic=583449.msg12055171#msg12055171 daemon I mean... bitmonerod

Also, you could try and state your question in this thread: https://bitcointalk.org/index.php?topic=652305.0

Hope that works! [/quote]

[size=16pt]STILL NOT SATISFIED? BUILD DEV![/size]

Yes, its true. Monero core team is moving to a stable-ish source on the release branch, and a no holds-barred development branch. Currently on dev branch is zeroMQ. So if compiling a working Monero isn't satisfying your desire to watch your computer do cool things after you copy and paste commands into it (I COMMAND YOU COMPUTER!!), you can try your hand at the dev branch.

Do steps 1-3 to make sure you have the main dependencies required.

This will clone another copy of the git repository into the directory mondev [code]git clone https://github.com/monero-project/bitmonero.git mondev[/code]

This will make your compilers and such use the development branch instead of the release branch [code]git checkout development[/code]

Key new dependency is new zeroMQ stuff, which can be installed by following the instructions provided here: https://github.com/zeromq/czmq#using-czmq

when all thats done, make your way back to the mondev folder, then type

[code]make debug[/code]

Now, this is probably best used on testnet at this point, so get to /build/debug/bin/, then enter

[code]./bitmonerod --testnet[/code]

you'll have to play around with your ports because testnet uses 28080

edited 20150807 to add libevent-dev to the ubuntu instructions. edited 20150809 to add sadaambitcoins OSX instructions edited 20150810 to modify mint instructions due to typos found by bosco[/code][/code] edited 20150823 to modify Ubuntu build dependencies edited 20150912 to add instructions on building development branch edited 20150919 to add pkg-config to OSX list of deps

Replies: 1
Gingeropolous posted 8 years ago Weight: -193 | Link [ - ]

I need to finish reformatting into kramdown. Copied from the btctalk post