diff --git a/CMakeLists.txt b/CMakeLists.txt index eea4345c..c41feeea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -189,6 +189,11 @@ else() endif() +# If BOOST_ROOT is set, ignore system-wide Boost +if(DEFINED ENV{BOOST_ROOT}) + set(Boost_NO_SYSTEM_PATHS ON) +endif() + if(MSVC) set(Boost_USE_STATIC_LIBS ON) endif() diff --git a/README.md b/README.md index 4d5ca173..cc7cdd6f 100644 --- a/README.md +++ b/README.md @@ -13,14 +13,14 @@ Be sure to clone the repository properly:\ ### Dependencies | component / version | minimum
(not recommended but may work) | recommended | most recent of what we have ever tested | |--|--|--|--| -| gcc (Linux) | 7.5.0 | 7.5.0 | 8.3.0 | +| gcc (Linux) | 5.4.0 | 9.4.0 | 12.3.0 | | llvm/clang (Linux) | UNKNOWN | 7.0.1 | 8.0.0 | -| [MSVC](https://visualstudio.microsoft.com/downloads/) (Windows) | 2017 (15.9.30) | 2017 (15.9.30) | 2022 (17.6.1) | +| [MSVC](https://visualstudio.microsoft.com/downloads/) (Windows) | 2017 (15.9.30) | 2017 (15.9.30) | 2022 (17.7.5) | | [XCode](https://developer.apple.com/downloads/) (macOS) | 12.3 | 14.3 | 14.3 | -| [CMake](https://cmake.org/download/) | 3.1.6 | 3.15.5 | 3.26.3 | +| [CMake](https://cmake.org/download/) | 3.15.5 | 3.22.1 | 3.26.3 | | [Boost](https://www.boost.org/users/download/) | 1.70 | 1.70 | 1.76 | -| [OpenSSL](https://www.openssl.org/source/) [(win)](https://slproweb.com/products/Win32OpenSSL.html) | - | 1.1.1n | 1.1.1n | -| [Qt](https://download.qt.io/archive/qt/) (*only for GUI*) | 5.8.0 | 5.12.12 | 5.15.2 | +| [OpenSSL](https://www.openssl.org/source/) [(win)](https://slproweb.com/products/Win32OpenSSL.html) | 1.1.1n | 1.1.1w | 1.1.1w | +| [Qt](https://download.qt.io/archive/qt/) (*only for GUI*) | 5.8.0 | 5.11.2 | 5.15.2 | Note:\ [*server version*] denotes steps required for building command-line tools (daemon, simplewallet, etc.).\ @@ -30,25 +30,28 @@ Note:\ ### Linux -Recommended OS version: Ubuntu 18.04 LTS. +Recommended OS versions: Ubuntu 20.04, 22.04 LTS. 1. Prerequisites [*server version*] - sudo apt-get install -y build-essential g++ python-dev autotools-dev libicu-dev libbz2-dev cmake git screen checkinstall zlib1g-dev + sudo apt-get install -y build-essential g++ curl autotools-dev libicu-dev libbz2-dev cmake git screen checkinstall zlib1g-dev [*GUI version*] sudo apt-get install -y build-essential g++ python-dev autotools-dev libicu-dev libbz2-dev cmake git screen checkinstall zlib1g-dev mesa-common-dev libglu1-mesa-dev -2. Download and build Boost +2. Download and build Boost\ + (Assuming you have cloned Zano into the 'zano' folder. If you used a different location for Zano, edit line 4 accordingly.) curl -OL https://boostorg.jfrog.io/artifactory/main/release/1.70.0/source/boost_1_70_0.tar.bz2 echo "430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778 boost_1_70_0.tar.bz2" | shasum -c && tar -xjf boost_1_70_0.tar.bz2 - cd boost_1_70_0 + rm boost_1_70_0.tar.bz2 && cd boost_1_70_0 + patch -p0 < ../zano/utils/boost_1.70_gcc_8.patch || cd .. ./bootstrap.sh --with-libraries=system,filesystem,thread,date_time,chrono,regex,serialization,atomic,program_options,locale,timer,log ./b2 + Make sure that you see "The Boost C++ Libraries were successfully built!" message at the end. 3. Install Qt\ (*GUI version only, skip this step if you're building server version*) @@ -63,15 +66,13 @@ Recommended OS version: Ubuntu 18.04 LTS. 4. Install OpenSSL - We recommend installing OpenSSL v1.1.1n locally unless you would like to use the same version system-wide. Adjust the local path `/home/user/openssl` in the commands below according to your needs. + We recommend installing OpenSSL v1.1.1w locally unless you would like to use the same version system-wide. Adjust the local path `/home/user/openssl` in the commands below according to your needs. - curl -OL https://www.openssl.org/source/openssl-1.1.1n.tar.gz - echo "40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a openssl-1.1.1n.tar.gz" | shasum -c && tar xaf openssl-1.1.1n.tar.gz - cd openssl-1.1.1n/ + curl -OL https://www.openssl.org/source/openssl-1.1.1w.tar.gz + echo "cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8 openssl-1.1.1w.tar.gz" | shasum -c && tar xaf openssl-1.1.1w.tar.gz + cd openssl-1.1.1w/ ./config --prefix=/home/user/openssl --openssldir=/home/user/openssl shared zlib - make - make test - make install + make && make test && make install 5. Set environment variables properly\ @@ -89,7 +90,7 @@ For instance, by adding the following lines to `~/.bashrc` export OPENSSL_ROOT_DIR=/home/user/openssl export QT_PREFIX_PATH=/home/user/Qt5.11.2/5.11.2/gcc_64 - + Make sure you've restarted your terminal session (by reopening the terminal window or reconnecting the server) to apply these changes. 6. Build the binaries 1. Build daemon and simplewallet: diff --git a/utils/boost_1.70_gcc_8.patch b/utils/boost_1.70_gcc_8.patch new file mode 100644 index 00000000..812eed14 --- /dev/null +++ b/utils/boost_1.70_gcc_8.patch @@ -0,0 +1,15 @@ +# This patch fixes compilation issue in Boost 1.70-1.71 while it is being compiled by GCC ver >= 8.3 +# -- sowle +# see also: https://github.com/boostorg/thread/pull/297 +# +--- boost/thread/pthread/thread_data.hpp.orig 2023-10-10 20:22:30.860192033 +0000 ++++ boost/thread/pthread/thread_data.hpp 2023-10-10 18:19:22.460764089 +0000 +@@ -57,7 +57,7 @@ + #else + std::size_t page_size = ::sysconf( _SC_PAGESIZE); + #endif +-#if PTHREAD_STACK_MIN > 0 ++#ifdef PTHREAD_STACK_MIN + if (size