Author Topic: How to build this thing headlessly for Ubuntu & Mint  (Read 2668 times)

0 Members and 1 Guest are viewing this topic.

Offline roadscape

Hi,

Thanks in advance for any help!

Can somebody help me here. I'm stuck compiling this thing. This is what it's telling me:



Code: [Select]
root@:/root# cd bitshares-2
root@:/root/bitshares-2# cmake -DBOOST_ROOT="$BOOST_ROOT" -DCMAKE_BUILD_TYPE=Debug .
-- Using custom FindBoost.cmake
CMake Error at libraries/fc/CMakeModules/FindBoost.cmake:1129 (message):
  Unable to find the requested Boost libraries.

  Unable to find the Boost header files.  Please set BOOST_ROOT to the root
  directory containing Boost or BOOST_INCLUDEDIR to the directory containing
  Boost's headers.
Call Stack (most recent call first):
  CMakeLists.txt:60 (FIND_PACKAGE)


-- Using custom FindBoost.cmake
CMake Error at libraries/fc/CMakeModules/FindBoost.cmake:1129 (message):
  Unable to find the requested Boost libraries.

  Unable to find the Boost header files.  Please set BOOST_ROOT to the root
  directory containing Boost or BOOST_INCLUDEDIR to the directory containing
  Boost's headers.
Call Stack (most recent call first):
  CMakeLists.txt:64 (FIND_PACKAGE)


-- Configuring BitShares on Linux
-- Using  as BerkeleyDB root
-- Looking for: db_cxx-6.0
-- debug/usr/lib/x86_64-linux-gnu/libdb_cxx.sooptimized/usr/lib/x86_64-linux-gnu/libdb_cxx.so
-- Configuring project fc located in: /root/bitshares-2/libraries/fc
-- Configuring fc to build on Unix/Apple
-- Using custom FindBoost.cmake
CMake Error at libraries/fc/CMakeModules/FindBoost.cmake:1129 (message):
  Unable to find the requested Boost libraries.

  Unable to find the Boost header files.  Please set BOOST_ROOT to the root
  directory containing Boost or BOOST_INCLUDEDIR to the directory containing
  Boost's headers.
Call Stack (most recent call first):
  libraries/fc/CMakeLists.txt:122 (FIND_PACKAGE)


CMake Error at libraries/fc/CMakeLists.txt:242 (add_subdirectory):
  The source directory

    /root/bitshares-2/libraries/fc/vendor/websocketpp

  does not contain a CMakeLists.txt file.


-- Could NOT find Curses (missing:  CURSES_LIBRARY CURSES_INCLUDE_PATH)
-- Finished fc module configuration...
-- egenesis: /root/bitshares-2/genesis.json
-- embed_genesis_args: -t/root/bitshares-2/libraries/egenesis/egenesis_brief.cpp.tmpl---/root/bitshares-2/libraries/egenesis/egenesis_brief.cpp-t/root/bitshares-2/libraries/egenesis/egenesis_full.cpp.tmpl---/root/bitshares-2/libraries/egenesis/egenesis_full.cpp--genesis-json/root/bitshares-2/genesis.json
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/root/bitshares-2/libraries/fc/Boost_INCLUDE_DIR
   used as include directory in directory /root/bitshares-2/libraries/fc

-- Configuring incomplete, errors occurred!

You may get this if you don't have $BOOST_ROOT set before running cmake.. if you followed the graphene wiki instructions for installing Boost, then this would be what you need:

Code: [Select]
BOOST_ROOT=$HOME/opt/boost_1_57_0
cmake -DBOOST_ROOT="$BOOST_ROOT" -DCMAKE_BUILD_TYPE=Release .
make
http://cryptofresh.com  |  witness: roadscape

Offline bitcoin42

Hi,

Thanks in advance for any help!

Can somebody help me here. I'm stuck compiling this thing. This is what it's telling me:



Code: [Select]
root@:/root# cd bitshares-2
root@:/root/bitshares-2# cmake -DBOOST_ROOT="$BOOST_ROOT" -DCMAKE_BUILD_TYPE=Debug .
-- Using custom FindBoost.cmake
CMake Error at libraries/fc/CMakeModules/FindBoost.cmake:1129 (message):
  Unable to find the requested Boost libraries.

  Unable to find the Boost header files.  Please set BOOST_ROOT to the root
  directory containing Boost or BOOST_INCLUDEDIR to the directory containing
  Boost's headers.
Call Stack (most recent call first):
  CMakeLists.txt:60 (FIND_PACKAGE)


-- Using custom FindBoost.cmake
CMake Error at libraries/fc/CMakeModules/FindBoost.cmake:1129 (message):
  Unable to find the requested Boost libraries.

  Unable to find the Boost header files.  Please set BOOST_ROOT to the root
  directory containing Boost or BOOST_INCLUDEDIR to the directory containing
  Boost's headers.
Call Stack (most recent call first):
  CMakeLists.txt:64 (FIND_PACKAGE)


-- Configuring BitShares on Linux
-- Using  as BerkeleyDB root
-- Looking for: db_cxx-6.0
-- debug/usr/lib/x86_64-linux-gnu/libdb_cxx.sooptimized/usr/lib/x86_64-linux-gnu/libdb_cxx.so
-- Configuring project fc located in: /root/bitshares-2/libraries/fc
-- Configuring fc to build on Unix/Apple
-- Using custom FindBoost.cmake
CMake Error at libraries/fc/CMakeModules/FindBoost.cmake:1129 (message):
  Unable to find the requested Boost libraries.

  Unable to find the Boost header files.  Please set BOOST_ROOT to the root
  directory containing Boost or BOOST_INCLUDEDIR to the directory containing
  Boost's headers.
Call Stack (most recent call first):
  libraries/fc/CMakeLists.txt:122 (FIND_PACKAGE)


CMake Error at libraries/fc/CMakeLists.txt:242 (add_subdirectory):
  The source directory

    /root/bitshares-2/libraries/fc/vendor/websocketpp

  does not contain a CMakeLists.txt file.


-- Could NOT find Curses (missing:  CURSES_LIBRARY CURSES_INCLUDE_PATH)
-- Finished fc module configuration...
-- egenesis: /root/bitshares-2/genesis.json
-- embed_genesis_args: -t/root/bitshares-2/libraries/egenesis/egenesis_brief.cpp.tmpl---/root/bitshares-2/libraries/egenesis/egenesis_brief.cpp-t/root/bitshares-2/libraries/egenesis/egenesis_full.cpp.tmpl---/root/bitshares-2/libraries/egenesis/egenesis_full.cpp--genesis-json/root/bitshares-2/genesis.json
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/root/bitshares-2/libraries/fc/Boost_INCLUDE_DIR
   used as include directory in directory /root/bitshares-2/libraries/fc

-- Configuring incomplete, errors occurred!

Offline devlux

  • Full Member
  • ***
  • Posts: 63
    • View Profile
I've finally managed to get this bad boy to build on Linux and I wanted to share how I managed to do it.
My server is Ubuntu 15.04 and my Desktop is Linux Mint which I think is based on 14.04 LTS, none of the directions out there really explain either setup very well, for instance they still reference "graphene". 

The method below should work fine for any recent debian based distro, note that it is not just copy/pasta from the github instructions.  I actually had to add some things that were missing like automake

Here is how to do it assuming a fresh install.

First of all don't mess around with sudo just do a
Code: [Select]
sudo /bin/bash
Now you're root.
Code: [Select]
cd /root
apt-get install gcc-4.9 g++-4.9 cmake make automake libbz2-dev libdb++-dev libdb-dev libssl-dev openssl libreadline-dev autoconf libtool git

BOOST_ROOT=$HOME/opt/boost_1_57_0
apt-get update
apt-get install autotools-dev build-essential g++ libbz2-dev libicu-dev python-dev
wget -c 'http://sourceforge.net/projects/boost/files/boost/1.57.0/boost_1_57_0.tar.bz2/download' -O boost_1_57_0.tar.bz2
[ $( sha256sum boost_1_57_0.tar.bz2 | cut -d ' ' -f 1 ) == "910c8c022a33ccec7f088bd65d4f14b466588dda94ba2124e78b8c57db264967" ] || ( echo 'Corrupt download' ; exit 1 )
tar xjf boost_1_57_0.tar.bz2
cd boost_1_57_0/
./bootstrap.sh "--prefix=$BOOST_ROOT"
./b2 install

cd /root

git clone https://github.com/bitshares/bitshares-2.git
cd bitshares-2
cmake -DBOOST_ROOT="$BOOST_ROOT" -DCMAKE_BUILD_TYPE=Debug .
make

If you get an error about boost not linking correctly
Code: [Select]
CC=gcc-4.9 CXX=g++-4.9 cmake .

At this point you now have the binaries built.  You should install them properly. 
I don't recommend you run it as root for obvious reasons. 
I put the binaries in /usr/bin the config files should all go into /etc/bts
You'll need an init script and you should have a bitshares user who the script will run as. 
You should also have a config.json and drop it into /etc/bts/
The working directory should be /usr/lib/bts and that directory should be owned by the bitshares user.

You should also deny login to the bitshares user by editing /etc/passwd and setting the shell to /bin/false
Then you just need to register it to services and make sure it starts at boot after the network interface is up, so run levels 3,4,5 
« Last Edit: October 14, 2015, 06:55:57 am by devlux »