diff --git a/CMakeLists.txt b/CMakeLists.txt index b2530c6b..515023b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,6 +182,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 13558e5f..f298e3a8 100644 --- a/README.md +++ b/README.md @@ -43,13 +43,17 @@ Recommended OS version: Ubuntu 18.04 LTS. 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 +(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*) diff --git a/src/serialization/binary_archive.h b/src/serialization/binary_archive.h index b951a106..3fe31e72 100644 --- a/src/serialization/binary_archive.h +++ b/src/serialization/binary_archive.h @@ -51,7 +51,7 @@ template <> struct binary_archive : public binary_archive_base { explicit binary_archive(stream_type &s) : base_type(s) { - stream_type::streampos pos = stream_.tellg(); + stream_type::pos_type pos = stream_.tellg(); stream_.seekg(0, std::ios_base::end); eof_pos_ = stream_.tellg(); stream_.seekg(pos); 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