1
0
Fork 0
forked from lthn/blockchain

build: 1) fixed issue where CMake couldn't find local Boost with system-wide Boost present and 2) added a patch for Boost compilation when GCC version >= 8.3 (+minor warning fix)

This commit is contained in:
sowle 2023-10-11 21:57:18 +02:00
parent 63354b91c3
commit cd7ec1cf18
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC
3 changed files with 21 additions and 2 deletions

View file

@ -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 `zano` folder. If used different location for Zano, edit line 4 correspondingly)
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*)

View file

@ -51,7 +51,7 @@ template <>
struct binary_archive<false> : public binary_archive_base<std::istream, false>
{
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);

View file

@ -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<PTHREAD_STACK_MIN) size=PTHREAD_STACK_MIN;
#endif
size = ((size+page_size-1)/page_size)*page_size;