Fix Ubuntu 18.04 build and update README instructions #362

Closed
opened 2022-05-06 13:06:15 +00:00 by serkixenos · 13 comments
serkixenos commented 2022-05-06 13:06:15 +00:00 (Migrated from gitlab.com)

This is the error we are getting when trying to build Ubuntu 18.04 Docker image.

Cmd

docker build -f Dockerfile.18.04 -t peerplays-18-04 .

Output

[ 98%] Generating api_documentation.cpp
[ 98%] Building CXX object libraries/wallet/CMakeFiles/graphene_wallet.dir/wallet.cpp.o
[ 98%] Building CXX object libraries/wallet/CMakeFiles/graphene_wallet.dir/api_documentation.cpp.o
[ 98%] Linking CXX executable embed_genesis
[ 98%] Built target embed_genesis
[100%] Generating egenesis_brief.cpp, egenesis_full.cpp
/home/peerplays/peerplays/build/libraries/egenesis/embed_genesis: error while loading shared libraries: libzmq.so.5: cannot open shared object file: No such file or directory
libraries/egenesis/CMakeFiles/graphene_egenesis_brief.dir/build.make:76: recipe for target 'libraries/egenesis/egenesis_brief.cpp' failed
make[3]: *** [libraries/egenesis/egenesis_brief.cpp] Error 127
CMakeFiles/Makefile2:1063: recipe for target 'libraries/egenesis/CMakeFiles/graphene_egenesis_brief.dir/all' failed
make[2]: *** [libraries/egenesis/CMakeFiles/graphene_egenesis_brief.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....

Also, README file instructions on building are not correct.

Notes

Using BOOST_ROOT when installing boost, but not when configuring Peerplays. We do not need BOOST_ROOT, this is enough

wget -c 'http://sourceforge.net/projects/boost/files/boost/1.67.0/boost_1_67_0.tar.bz2/download' -O boost_1_67_0.tar.bz2
tar xjf boost_1_67_0.tar.bz2
cd boost_1_67_0
./bootstrap.sh
sudo ./b2 install

libzmq is not installed:

wget https://github.com/zeromq/libzmq/archive/refs/tags/v4.3.4.zip
unzip v4.3.4.zip
cd libzmq-4.3.4
mkdir build
cd build
cmake ..
make -j$(nproc)
sudo make install
sudo ldconfig

cppzmq is not installed:

wget https://github.com/zeromq/cppzmq/archive/refs/tags/v4.8.1.zip
unzip v4.8.1.zip
cd cppzmq-4.8.1
mkdir build
cd build
cmake ..
make -j$(nproc)
sudo make install
sudo ldconfig
This is the error we are getting when trying to build Ubuntu 18.04 Docker image. Cmd ``` docker build -f Dockerfile.18.04 -t peerplays-18-04 . ``` Output ``` [ 98%] Generating api_documentation.cpp [ 98%] Building CXX object libraries/wallet/CMakeFiles/graphene_wallet.dir/wallet.cpp.o [ 98%] Building CXX object libraries/wallet/CMakeFiles/graphene_wallet.dir/api_documentation.cpp.o [ 98%] Linking CXX executable embed_genesis [ 98%] Built target embed_genesis [100%] Generating egenesis_brief.cpp, egenesis_full.cpp /home/peerplays/peerplays/build/libraries/egenesis/embed_genesis: error while loading shared libraries: libzmq.so.5: cannot open shared object file: No such file or directory libraries/egenesis/CMakeFiles/graphene_egenesis_brief.dir/build.make:76: recipe for target 'libraries/egenesis/egenesis_brief.cpp' failed make[3]: *** [libraries/egenesis/egenesis_brief.cpp] Error 127 CMakeFiles/Makefile2:1063: recipe for target 'libraries/egenesis/CMakeFiles/graphene_egenesis_brief.dir/all' failed make[2]: *** [libraries/egenesis/CMakeFiles/graphene_egenesis_brief.dir/all] Error 2 make[2]: *** Waiting for unfinished jobs.... ``` Also, README file instructions on building are not correct. Notes Using BOOST_ROOT when installing boost, but not when configuring Peerplays. We do not need BOOST_ROOT, this is enough ``` wget -c 'http://sourceforge.net/projects/boost/files/boost/1.67.0/boost_1_67_0.tar.bz2/download' -O boost_1_67_0.tar.bz2 tar xjf boost_1_67_0.tar.bz2 cd boost_1_67_0 ./bootstrap.sh sudo ./b2 install ``` libzmq is not installed: ``` wget https://github.com/zeromq/libzmq/archive/refs/tags/v4.3.4.zip unzip v4.3.4.zip cd libzmq-4.3.4 mkdir build cd build cmake .. make -j$(nproc) sudo make install sudo ldconfig ``` cppzmq is not installed: ``` wget https://github.com/zeromq/cppzmq/archive/refs/tags/v4.8.1.zip unzip v4.8.1.zip cd cppzmq-4.8.1 mkdir build cd build cmake .. make -j$(nproc) sudo make install sudo ldconfig ```
serkixenos commented 2022-05-06 13:06:15 +00:00 (Migrated from gitlab.com)

assigned to @pavel.baykov

assigned to @pavel.baykov
serkixenos commented 2022-05-07 00:24:52 +00:00 (Migrated from gitlab.com)

assigned to @serkixenos and unassigned @pavel.baykov

assigned to @serkixenos and unassigned @pavel.baykov
serkixenos commented 2022-05-07 00:25:11 +00:00 (Migrated from gitlab.com)

assigned to @prandnum

assigned to @prandnum
serkixenos commented 2022-05-07 17:52:33 +00:00 (Migrated from gitlab.com)

@prandnum

Test instructions:

  • Obtain clean Ubuntu 20.04 and Ubuntu 18.04 VMs
  • Build software from source on both platforms, STRICTLY using instructions from README.md file
  • Build both docker images on both platforms, STRICTLY using instructions from README.md file
  • Report results here, share logs if any build fails

Report should look like this:

Ubuntu 20.04:
Build from source - OK/NOT OK
Build Docker image using Ubuntu 20.04 as a base - OK/NOT OK
Build Docker image using Ubuntu 18.04 as a base - OK/NOT OK

Ubuntu 18.04:
Build from source - OK/NOT OK
Build Docker image using Ubuntu 20.04 as a base - OK/NOT OK
Build Docker image using Ubuntu 18.04 as a base - OK/NOT OK

So, there are 6 builds in total to test

@prandnum Test instructions: - Obtain clean Ubuntu 20.04 and Ubuntu 18.04 VMs - Build software from source on both platforms, STRICTLY using instructions from README.md file - Build both docker images on both platforms, STRICTLY using instructions from README.md file - Report results here, share logs if any build fails Report should look like this: Ubuntu 20.04: Build from source - OK/NOT OK Build Docker image using Ubuntu 20.04 as a base - OK/NOT OK Build Docker image using Ubuntu 18.04 as a base - OK/NOT OK Ubuntu 18.04: Build from source - OK/NOT OK Build Docker image using Ubuntu 20.04 as a base - OK/NOT OK Build Docker image using Ubuntu 18.04 as a base - OK/NOT OK So, there are 6 builds in total to test
prandnum commented 2022-05-11 04:53:43 +00:00 (Migrated from gitlab.com)

Ubuntu 18.04: Build from source - OK
#Comment: make install in peerplays building steps needs to be changed to sudo make install else it fails with permission error. Tried building mainnet code and was able to start sync with mainnet.

Ubuntu 18.04: Build from source - OK #Comment: `make install` in peerplays building steps needs to be changed to sudo make install else it fails with permission error. Tried building mainnet code and was able to start sync with mainnet.
prandnum commented 2022-05-11 19:03:31 +00:00 (Migrated from gitlab.com)

Ubuntu 20.04: Build from source - OK #Comment: make install in peerplays building steps needs to be changed to sudo make install else it fails with permission error. Tried building mainnet code and was able to start sync with mainnet.

Ubuntu 20.04: Build from source - OK #Comment: `make install` in peerplays building steps needs to be changed to sudo make install else it fails with permission error. Tried building mainnet code and was able to start sync with mainnet.
prandnum commented 2022-05-12 10:14:24 +00:00 (Migrated from gitlab.com)

@serkixenos Docker build is failing

Ubuntu 20.04: Build Docker image using Ubuntu 20.04 as a base - NOT OK

-- Detecting CXX compile features - done
-- Linux Ubuntu 20.04 focal
Ubuntu version is: 20

====================
Building for Mainnet

CMake Error at CMakeLists.txt:107 (include):
include could not find load file:

GetGitRevisionDescription

CMake Error at CMakeLists.txt:108 (get_git_head_revision):
Unknown CMake command "get_git_head_revision".

-- Configuring incomplete, errors occurred!
See also "/home/peerplays/peerplays/build/CMakeFiles/CMakeOutput.log".
The command '/bin/sh -c cd peerplays && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release ..' returned a non-zero code: 1
qa@PBSA-Dev:~/PBSA/peerplays$

@serkixenos Docker build is failing Ubuntu 20.04: Build Docker image using Ubuntu 20.04 as a base - NOT OK -- Detecting CXX compile features - done -- Linux Ubuntu 20.04 focal Ubuntu version is: 20 ==================== Building for Mainnet ==================== CMake Error at CMakeLists.txt:107 (include): include could not find load file: GetGitRevisionDescription CMake Error at CMakeLists.txt:108 (get_git_head_revision): Unknown CMake command "get_git_head_revision". -- Configuring incomplete, errors occurred! See also "/home/peerplays/peerplays/build/CMakeFiles/CMakeOutput.log". The command '/bin/sh -c cd peerplays && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release ..' returned a non-zero code: 1 qa@PBSA-Dev:~/PBSA/peerplays$
serkixenos commented 2022-05-12 11:56:53 +00:00 (Migrated from gitlab.com)

README file updated

82a84a06da

When checking out the code for building docker, make sure to checkout beatrice branch, not master.

README file updated https://gitlab.com/PBSA/peerplays/-/commit/82a84a06da88706fd57b937049d7756cf853b5aa When checking out the code for building docker, make sure to checkout beatrice branch, not master.
prandnum commented 2022-05-12 12:13:07 +00:00 (Migrated from gitlab.com)

I am using beatrice branch. it failed for 18.04 also

Ubuntu 20.04: Build Docker image using Ubuntu 18.04 as a base - NOT OK

Step 21/29 : RUN     cd peerplays &&     mkdir build &&     cd build &&     cmake -DCMAKE_BUILD_TYPE=Release ..
 ---> Running in 6137fc2025e3
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Linux Ubuntu 18.04 bionic
Ubuntu version is: 18

====================
Building for Mainnet
====================

CMake Error at CMakeLists.txt:107 (include):
  include could not find requested file:

    GetGitRevisionDescription


CMake Error at CMakeLists.txt:108 (get_git_head_revision):
  Unknown CMake command "get_git_head_revision".


-- Configuring incomplete, errors occurred!
See also "/home/peerplays/peerplays/build/CMakeFiles/CMakeOutput.log".
The command '/bin/sh -c cd peerplays &&     mkdir build &&     cd build &&     cmake -DCMAKE_BUILD_TYPE=Release ..' returned a non-zero code: 1
qa@PBSA-Dev:~/PBSA/peerplays$
qa@PBSA-Dev:~/PBSA/peerplays$ git log -1
commit e0d7a6314a7ab6f17fec3e704370007c00896704 (HEAD -> beatrice, origin/beatrice)
Author: serkixenos <serki.xenos@gmail.com>
Date:   Fri May 6 04:14:36 2022 +0200

    Ubuntu 18.04 build support
qa@PBSA-Dev:~/PBSA/peerplays$
I am using beatrice branch. it failed for 18.04 also Ubuntu 20.04: Build Docker image using Ubuntu 18.04 as a base - NOT OK ``` Step 21/29 : RUN cd peerplays && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. ---> Running in 6137fc2025e3 -- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Linux Ubuntu 18.04 bionic Ubuntu version is: 18 ==================== Building for Mainnet ==================== CMake Error at CMakeLists.txt:107 (include): include could not find requested file: GetGitRevisionDescription CMake Error at CMakeLists.txt:108 (get_git_head_revision): Unknown CMake command "get_git_head_revision". -- Configuring incomplete, errors occurred! See also "/home/peerplays/peerplays/build/CMakeFiles/CMakeOutput.log". The command '/bin/sh -c cd peerplays && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release ..' returned a non-zero code: 1 qa@PBSA-Dev:~/PBSA/peerplays$ qa@PBSA-Dev:~/PBSA/peerplays$ git log -1 commit e0d7a6314a7ab6f17fec3e704370007c00896704 (HEAD -> beatrice, origin/beatrice) Author: serkixenos <serki.xenos@gmail.com> Date: Fri May 6 04:14:36 2022 +0200 Ubuntu 18.04 build support qa@PBSA-Dev:~/PBSA/peerplays$ ```
prandnum commented 2022-05-12 16:39:42 +00:00 (Migrated from gitlab.com)

Ubuntu 20.04: Build Docker image using Ubuntu 20.04 as a base - OK #Comment: docker start peerplays is not correct instead "docker run peerplays:latest" Tried building mainnet code and was able to start sync with mainnet.

Ubuntu 20.04: Build Docker image using Ubuntu 20.04 as a base - OK #Comment: `docker start peerplays` is not correct instead "docker run peerplays:latest" Tried building mainnet code and was able to start sync with mainnet.
prandnum commented 2022-05-12 17:52:45 +00:00 (Migrated from gitlab.com)

Ubuntu 20.04: Build Docker image using Ubuntu 18.04 as a base - OK #Comment: docker start peerplays is not correct instead "docker run peerplays-18-04:latest" Tried building mainnet code and was able to start sync with mainnet.

Ubuntu 20.04: Build Docker image using Ubuntu 18.04 as a base - OK #Comment: `docker start peerplays` is not correct instead "docker run peerplays-18-04:latest" Tried building mainnet code and was able to start sync with mainnet.
serkixenos commented 2022-05-13 01:27:26 +00:00 (Migrated from gitlab.com)

README file updated

23cdcec381

README file updated https://gitlab.com/PBSA/peerplays/-/commit/23cdcec381fa2866c6b24684da99971671bb9165
prandnum commented 2022-05-13 14:36:06 +00:00 (Migrated from gitlab.com)

Ubuntu 18.04: Build Docker image using Ubuntu 20.04 as a base - OK #Comment: Tried building mainnet code and was able to start sync with mainnet.

Ubuntu 18.04: Build Docker image using Ubuntu 18.04 as a base - OK #Comment: Tried building mainnet code and was able to start sync with mainnet.

Ubuntu 18.04: Build Docker image using Ubuntu 20.04 as a base - OK #Comment: Tried building mainnet code and was able to start sync with mainnet. Ubuntu 18.04: Build Docker image using Ubuntu 18.04 as a base - OK #Comment: Tried building mainnet code and was able to start sync with mainnet.
prandnum (Migrated from gitlab.com) closed this issue 2022-05-13 14:36:24 +00:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Peerplays_Blockchain/peerplays_migrated#362
No description provided.