ProsusCorp / ProsusMoney

The Chilean Cryptocurrency
http://www.prosusmoney.cl
9 stars 13 forks source link

Compiling on UBUNTU 20 with libboost 1.71.0 #24

Closed Goro2030 closed 4 years ago

Goro2030 commented 4 years ago

@yerkobits , I'm trying to update the software to compile and run on UBUNTU 20, since we need to make Prosus "Linux version independent" and not depend on a specific version of Linux, or libboost, etc ... and I'm failing miserably ...

First of all, the instructions that you reverted to the previous version will just not work for someone that sets up a new Ubuntu box, since the DEV libraries are not in the default installation package, so I added back:

Adding the repository for dev ( to get libboost):

sudo add-apt-repository -s 'deb http://us.archive.ubuntu.com/ubuntu/ focal universe'

Now we need like 300MB of the QT Graphical interface libraries, since those are also custom, non-default:

sudo apt install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-xmllistmodel qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel qttools5-dev-tools qml-module-qtquick-templates2 libqt5svg5-dev

Did 2 changes to my fork that you can see there, to use libboost 1.71.0, since 1.58 is not available for Ubuntu 20 anymore ... so I changed the setup instructions like this:

OLD: apt-get install build-essential git cmake libboost1.58-all-dev
NEW: apt-get install build-essential git cmake libboost-all-dev

Then I changed the versions in file /cryptonote/CmakeLists.txt:


OLD: -find_package(Boost 1.55 QUIET REQUIRED COMPONENTS system filesystem thread date_time chrono regex serialization program_options coroutine context atomic)
NEW: find_package(Boost 1.71 QUIET REQUIRED COMPONENTS system filesystem thread date_time chrono regex serialization program_options coroutine context atomic)

Assuming that's what defines the libboost version ... i got it past the first error in compilation, but now when trying to compile it, it fails with the following:

root@ubuntu:/mnt/git# mkdir build && cd build
root@ubuntu:/mnt/git/build# cmake ..
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
fatal: not a git repository (or any parent up to mount point /mnt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package):
  Found package configuration file:

    /usr/lib/x86_64-linux-gnu/cmake/boost_date_time-1.71.0/boost_date_time-config.cmake

  but it set boost_date_time_FOUND to FALSE so package "boost_date_time" is
  considered to be NOT FOUND.  Reason given by package:

  No suitable build variant has been found.

  The following variants have been tried and rejected:

  * libboost_date_time.so.1.71.0 (shared, Boost_USE_STATIC_LIBS=ON)

  * libboost_date_time.a (shared runtime, Boost_USE_STATIC_RUNTIME=ON)

Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
  /usr/share/cmake-3.16/Modules/FindBoost.cmake:443 (find_package)
  CMakeLists.txt:32 (find_package)
Goro2030 commented 4 years ago

@yerkobits , I've solved all of the issues above, look at the PULL Request I've submitted.

yerkobits commented 4 years ago

look at this... #21 (the especifics modules from LibBoost)

Goro2030 commented 4 years ago

Forget about the LIBBOOST issue, as I said in that other post:

I think this is the "correct" answer, not a long or a short one ... it's one "LONG" line, simpler instructions, and save disk space, as I proposed in the PULL for README.MD yesterday. It's libboost version independent, and works for everyone.

I wan't to get your buy in on the other changes to README.MD ...