CREDITSCOM / node

Credits Node is the main module that provide an opportunity to run a node and participate in CREDITS blockchain network.
https://developers.credits.com/
GNU Affero General Public License v3.0
150 stars 16 forks source link

Node compilation issue with Ubuntu18.04 #2

Closed micmac0 closed 5 years ago

micmac0 commented 5 years ago

Describe the bug I tried to compile node from ubuntu but I didn t manage to get it work and I got the following result :

node/build$ cmake -DCMAKE_BUILD_TYPE=Release -A x86_64 ..
CMake Error in CMakeLists.txt:
  Generator
    Unix Makefiles
  does not support platform specification, but platform
    x64
  was specified.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

My dependencies liboost installed are 1.65 + 1.68 dpkg -l | grep libboost

ii  libboost-date-time1.65.1:amd64        1.65.1+dfsg-0ubuntu5                        amd64        set of date-time libraries based on generic programming concepts
ii  libboost-filesystem1.65.1:amd64       1.65.1+dfsg-0ubuntu5                        amd64        filesystem operations (portable paths, iteration over directories, etc) in C++
ii  libboost-iostreams1.65.1:amd64        1.65.1+dfsg-0ubuntu5                        amd64        Boost.Iostreams Library
ii  libboost-locale1.65.1:amd64           1.65.1+dfsg-0ubuntu5                        amd64        C++ facilities for localization
ii  libboost-system1.65.1:amd64           1.65.1+dfsg-0ubuntu5                        amd64        Operating system (e.g. diagnostics support) library
ii  libboost-thread1.65.1:amd64           1.65.1+dfsg-0ubuntu5                        amd64        portable C++ multi-threading
ii  libboost1.68                          1.68-0~8~ubuntu18.04.1                      amd64        Boost C++ Libraries
ii  libboost1.68-dev                      1.68-0~8~ubuntu18.04.1                      amd64        Boost C++ Libraries development files

g++ --version g++ (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0

gcc --version gcc (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0

Desktop (please complete the following information):

Instand commented 5 years ago

https://github.com/CREDITSCOM/node/blob/master/README.md Readme updated, look at linux build please

micmac0 commented 5 years ago

that s great. I gave it a fast try , cmake need to be at least 3.11 CMake 3.11 or higher is required. You are running version 3.10.2

I will give a new try later with updated version of cmake.

tkoen93 commented 5 years ago

Please check the answer of Teocci over here: https://askubuntu.com/questions/355565/how-do-i-install-the-latest-version-of-cmake-from-the-command-line/865294

Currently trying that myself and looks good so far.

micmac0 commented 5 years ago

Here is the way I prepare a very fresh ubuntu 18 vm to compile node if it may help documentation

Install compil tools

sudo apt install gcc sudo apt install build-essential sudo apt install flex sudo apt install bison

install cmake

mkdir ~/temp cd ~/temp version=3.14 build=4 wget https://cmake.org/files/v$version/cmake-$version.$build.tar.gz tar -xzvf cmake-$version.$build.tar.gz cd cmake-$version.$build/ ./bootstrap make -j3 sudo make install cmake --version

install boost

get boost tar.gz https://www.boost.org/users/history/version_1_67_0.html tar xzvf boost_1_68_0.tar.gz cd boost_1_68_0/ ./bootstrap.sh --help ./bootstrap.sh --with-libraries=all --prefix=/usr/local ./b2 sudo ./b2 install

compile node

cd sudo apt install git git clone https://github.com/CREDITSCOM/node.git cd node git submodule update --init --recursive mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. make

now I have same error as described here #5

micmac0 commented 5 years ago

oh I just saw "install_ubuntu_environment.sh" in commit will test it by adding missing package. but still issue 5 with sodium.

tkoen93 commented 5 years ago

@micmac0 can you try to build the node after installing autoconf and automake?

sudo apt-get install autoconf automake

That worked for me.

micmac0 commented 5 years ago

Yes thanks @tkoen93 Work for me I also added the one you mention already yesterday and now : sudo apt install libtool pkg-config libssl-dev