How to Build and Compile a CryptoNote Project on Linux

There has been an active issue for over 5 years now when trying to build the source on modern compilers.  

The best solution (without updating the actual code) is to simulate the original build environment, Which is Ubuntu 14.04 with the Dependencies of: GCC 4.7.3 or later, CMake 2.8.6 or later, and Boost 1.55.

From my experiences, CryptoNote will also compile on Ubuntu 16 (using Boost 1.58).

I recommend using a Remote Server or Cloud Services to host your daemon, but here are (optional) instructions for how to compile your CryptoNote Coin using a VM (Virtual Machine) on Windows 10:

##  Download and Install VirtualBox:

https://www.virtualbox.org/wiki/Downloads

##  Download the desktop image of Ubuntu 14.04.6 LTS (Trusty Tahr)

https://releases.ubuntu.com/14.04/

# Use VirtualBox to create a VM (Virtual Machine) for Ubuntu 14.04
Note: I recommend changing the Settings for your VM to allow Shared Clipboard.
Note: You may need to enable virtualization in your system’s BIOS settings.  

Open VirtualBox

Click New

Type a Name (it can be anything)

For ISO Image, select Other…

Then choose the image file (ubuntu-14.04.6-desktop-amd64.iso)

Start the VM, and allow Ubuntu 14 to install.  

#  Virtual Box does not add the default user (default is:  vboxuser) as a super user, so we need to add it ourselves.  

Reference (from Solving Case #1):  https://www.tecmint.com/fix-user-is-not-in-the-sudoers-file-the-incident-will-be-reported-ubuntu/

– After Ubuntu 14 has installed, close the VM.  

– Restart the VM, and 

– Press the shift key once when the VM powers on.  

– Using the Down Arrow, select “Advanced options for Ubuntu” and press Enter.

– Select the kernel with the “(recovery mode)”.

– Move over to the line “root Drop to root shell prompt”, then hit Enter.

– Type the current password (default is: changeme) 

mount -o rw,remount /

adduser vboxuser sudo

reboot

  Installing Dependencies

##  Installing cmake 2.8.12.2

sudo apt-get update

sudo apt-get install cmake

cmake –version

## Installing gcc version 4.8.4

Note: gcc should already be installed, but if not, then follow these instructions

sudo apt-get update

sudo apt-get install gcc

gcc -v

##  Installing boost c++ libraries version 1.55

sudo add-apt-repository ppa:boost-latest/ppa
sudo apt-get update
sudo apt-get install libboost1.55-all-dev

dpkg -l | grep libboost

##  Installing Git

sudo apt-get update

sudo apt-get install git

git –version

# Install QT (at least 5.2.1) for compiling the wallet:

sudo apt-get install qtbase5-dev

Compiling the Cryptonote Project

git clone https://github.com/%5BYour Github Account Name]/[Your Coin’s Github Repository].git

cd [Your Coin’s Github Repository]

mkdir build

cd build

cmake .. && make

Check my Windows 32/64-bit guide if you need help compiling your CryptoNote project on Windows 7+.

Leave a comment

Design a site like this with WordPress.com
Get started