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:
parent
63354b91c3
commit
cd7ec1cf18
3 changed files with 21 additions and 2 deletions
|
|
@ -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*)
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
15
utils/boost_1.70_gcc_8.patch
Normal file
15
utils/boost_1.70_gcc_8.patch
Normal 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;
|
||||
Loading…
Add table
Reference in a new issue