Merge pull request #3545
1cbbeb6
gitian: Add openssl to linux deps (Wladimir J. van der Laan)64be7f7
gitian: Build boost dependency for linux (Wladimir J. van der Laan)7eb99a8
gitian: Reduce build time for boost windows dependency (Wladimir J. van der Laan)714cdec
build: Pass BOOST_CPPFLAGS to sleep implementation test (Wladimir J. van der Laan)0d40f5a
build: Allow providing extra libs for Boost Chrono (Wladimir J. van der Laan)e4b991e
build: Auto-detect whether -DBOOST_TEST_DYN_LINK is needed (Wladimir J. van der Laan)
This commit is contained in:
commit
490d6a3046
6 changed files with 94 additions and 19 deletions
29
configure.ac
29
configure.ac
|
@ -207,10 +207,8 @@ case $host in
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CPPFLAGS="$CPPFLAGS -DMAC_OSX"
|
CPPFLAGS="$CPPFLAGS -DMAC_OSX"
|
||||||
TESTDEFS="-DBOOST_TEST_DYN_LINK"
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
TESTDEFS="-DBOOST_TEST_DYN_LINK"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -345,6 +343,24 @@ if test x$use_tests = xyes; then
|
||||||
|
|
||||||
|
|
||||||
AX_BOOST_UNIT_TEST_FRAMEWORK
|
AX_BOOST_UNIT_TEST_FRAMEWORK
|
||||||
|
|
||||||
|
dnl Determine if -DBOOST_TEST_DYN_LINK is needed
|
||||||
|
AC_MSG_CHECKING([for dynamic linked boost test])
|
||||||
|
TEMP_LIBS="$LIBS"
|
||||||
|
LIBS="$LIBS $BOOST_UNIT_TEST_FRAMEWORK_LIB"
|
||||||
|
TEMP_CPPFLAGS="$CPPFLAGS"
|
||||||
|
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||||
|
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
|
#define BOOST_TEST_DYN_LINK
|
||||||
|
#define BOOST_TEST_MAIN
|
||||||
|
#include <boost/test/unit_test.hpp>
|
||||||
|
|
||||||
|
])],
|
||||||
|
[AC_MSG_RESULT(yes)]
|
||||||
|
[TESTDEFS="$TESTDEFS -DBOOST_TEST_DYN_LINK"],
|
||||||
|
[AC_MSG_RESULT(no)])
|
||||||
|
LIBS="$TEMP_LIBS"
|
||||||
|
CPPFLAGS="$TEMP_CPPFLAGS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB"
|
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB"
|
||||||
|
@ -357,8 +373,13 @@ dnl after 1.56.
|
||||||
dnl If neither is available, abort.
|
dnl If neither is available, abort.
|
||||||
dnl If sleep_for is used, boost_chrono becomes a requirement.
|
dnl If sleep_for is used, boost_chrono becomes a requirement.
|
||||||
if test x$ax_cv_boost_chrono = xyes; then
|
if test x$ax_cv_boost_chrono = xyes; then
|
||||||
|
dnl Allow passing extra needed dependency libraries for boost-chrono from static gitian build
|
||||||
|
BOOST_CHRONO_LIB="$BOOST_CHRONO_LIB $BOOST_CHRONO_EXTRALIBS"
|
||||||
|
|
||||||
TEMP_LIBS="$LIBS"
|
TEMP_LIBS="$LIBS"
|
||||||
LIBS="$LIBS $BOOST_LIBS $BOOST_CHRONO_LIB"
|
LIBS="$LIBS $BOOST_LIBS $BOOST_CHRONO_LIB"
|
||||||
|
TEMP_CPPFLAGS="$CPPFLAGS"
|
||||||
|
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||||
AC_TRY_LINK([
|
AC_TRY_LINK([
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
#include <boost/version.hpp>
|
#include <boost/version.hpp>
|
||||||
|
@ -373,11 +394,14 @@ AC_TRY_LINK([
|
||||||
AC_DEFINE(HAVE_WORKING_BOOST_SLEEP_FOR, 1, [Define this symbol if boost sleep_for works])],
|
AC_DEFINE(HAVE_WORKING_BOOST_SLEEP_FOR, 1, [Define this symbol if boost sleep_for works])],
|
||||||
[boost_sleep=no])
|
[boost_sleep=no])
|
||||||
LIBS="$TEMP_LIBS"
|
LIBS="$TEMP_LIBS"
|
||||||
|
CPPFLAGS="$TEMP_CPPFLAGS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x$boost_sleep != xyes; then
|
if test x$boost_sleep != xyes; then
|
||||||
TEMP_LIBS="$LIBS"
|
TEMP_LIBS="$LIBS"
|
||||||
LIBS="$LIBS $BOOST_LIBS"
|
LIBS="$LIBS $BOOST_LIBS"
|
||||||
|
TEMP_CPPFLAGS="$CPPFLAGS"
|
||||||
|
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||||
AC_TRY_LINK([
|
AC_TRY_LINK([
|
||||||
#include <boost/version.hpp>
|
#include <boost/version.hpp>
|
||||||
#include <boost/thread.hpp>
|
#include <boost/thread.hpp>
|
||||||
|
@ -392,6 +416,7 @@ AC_TRY_LINK([
|
||||||
[boost_sleep=yes; AC_DEFINE(HAVE_WORKING_BOOST_SLEEP, 1, [Define this symbol if boost sleep works])],
|
[boost_sleep=yes; AC_DEFINE(HAVE_WORKING_BOOST_SLEEP, 1, [Define this symbol if boost sleep works])],
|
||||||
[boost_sleep=no])
|
[boost_sleep=no])
|
||||||
LIBS="$TEMP_LIBS"
|
LIBS="$TEMP_LIBS"
|
||||||
|
CPPFLAGS="$TEMP_CPPFLAGS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x$boost_sleep != xyes; then
|
if test x$boost_sleep != xyes; then
|
||||||
|
|
42
contrib/gitian-descriptors/boost-linux.yml
Normal file
42
contrib/gitian-descriptors/boost-linux.yml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
---
|
||||||
|
name: "boost"
|
||||||
|
suites:
|
||||||
|
- "precise"
|
||||||
|
architectures:
|
||||||
|
- "i386"
|
||||||
|
- "amd64"
|
||||||
|
packages:
|
||||||
|
- "unzip"
|
||||||
|
- "pkg-config"
|
||||||
|
- "libtool"
|
||||||
|
- "faketime"
|
||||||
|
- "bsdmainutils"
|
||||||
|
- "zip"
|
||||||
|
reference_datetime: "2011-01-30 00:00:00"
|
||||||
|
remotes: []
|
||||||
|
files:
|
||||||
|
- "boost_1_55_0.tar.bz2"
|
||||||
|
script: |
|
||||||
|
STAGING="$HOME/install"
|
||||||
|
export LIBRARY_PATH="$STAGING/lib"
|
||||||
|
# Input Integrity Check
|
||||||
|
echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52 boost_1_55_0.tar.bz2" | shasum -c
|
||||||
|
|
||||||
|
mkdir -p "$STAGING"
|
||||||
|
tar xjf boost_1_55_0.tar.bz2
|
||||||
|
cd boost_1_55_0
|
||||||
|
GCCVERSION=$(g++ -E -dM $(mktemp --suffix=.h) | grep __VERSION__ | cut -d ' ' -f 3 | cut -d '"' -f 2)
|
||||||
|
# note: bjam with -d+2 reveals that -O3 is implied by default, no need to provide it in cxxflags
|
||||||
|
echo "using gcc : $GCCVERSION : g++
|
||||||
|
:
|
||||||
|
<cxxflags>\"-frandom-seed=boost1 -fPIC\"
|
||||||
|
;" > user-config.jam
|
||||||
|
|
||||||
|
./bootstrap.sh --without-icu
|
||||||
|
|
||||||
|
./bjam toolset=gcc threadapi=pthread threading=multi variant=release link=static runtime-link=shared --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 --layout=tagged --build-type=complete --prefix="$STAGING" $MAKEOPTS install
|
||||||
|
|
||||||
|
cd "$STAGING"
|
||||||
|
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
||||||
|
export FAKETIME=$REFERENCE_DATETIME
|
||||||
|
zip -r $OUTDIR/boost-linux${GBUILD_BITS}-1.55.0-gitian-r1.zip *
|
|
@ -16,7 +16,7 @@ files:
|
||||||
- "boost-mingw-gas-cross-compile-2013-03-03.patch"
|
- "boost-mingw-gas-cross-compile-2013-03-03.patch"
|
||||||
script: |
|
script: |
|
||||||
# Defines
|
# Defines
|
||||||
INSTALLPREFIX="$OUTDIR/staging/boost"
|
INSTALLPREFIX="$HOME/install"
|
||||||
HOST=i686-w64-mingw32
|
HOST=i686-w64-mingw32
|
||||||
# Input Integrity Check
|
# Input Integrity Check
|
||||||
echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52 boost_1_55_0.tar.bz2" | shasum -c
|
echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52 boost_1_55_0.tar.bz2" | shasum -c
|
||||||
|
@ -57,10 +57,9 @@ script: |
|
||||||
# Note: Might need these options in the future for 64bit builds.
|
# Note: Might need these options in the future for 64bit builds.
|
||||||
# "Please note that address-model=64 must be given to bjam command line on 64bit Windows for 64bit build; otherwise 32bit code will be generated."
|
# "Please note that address-model=64 must be given to bjam command line on 64bit Windows for 64bit build; otherwise 32bit code will be generated."
|
||||||
# "For cross-compiling the lib you must specify certain additional properties at bjam command line: target-os, abi, binary-format, architecture and address-model."
|
# "For cross-compiling the lib you must specify certain additional properties at bjam command line: target-os, abi, binary-format, architecture and address-model."
|
||||||
./bjam toolset=gcc binary-format=pe target-os=windows threadapi=win32 threading=multi variant=release link=static --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 -sNO_ZLIB=1 --layout=tagged --build-type=complete --prefix="$INSTALLPREFIX" $MAKEOPTS install
|
./bjam toolset=gcc binary-format=pe target-os=windows threadapi=win32 threading=multi variant=release link=static runtime-link=static --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 -sNO_ZLIB=1 --layout=tagged --build-type=complete --prefix="$INSTALLPREFIX" $MAKEOPTS install
|
||||||
|
|
||||||
cd "$INSTALLPREFIX"
|
cd "$INSTALLPREFIX"
|
||||||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
|
||||||
export FAKETIME=$REFERENCE_DATETIME
|
export FAKETIME=$REFERENCE_DATETIME
|
||||||
zip -r boost-win32-1.55.0-gitian-r6.zip *
|
zip -r $OUTDIR/boost-win32-1.55.0-gitian-r6.zip *
|
||||||
cp boost-win32-1.55.0-gitian-r6.zip $OUTDIR
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ packages:
|
||||||
reference_datetime: "2013-06-01 00:00:00"
|
reference_datetime: "2013-06-01 00:00:00"
|
||||||
remotes: []
|
remotes: []
|
||||||
files:
|
files:
|
||||||
|
- "openssl-1.0.1e.tar.gz"
|
||||||
- "miniupnpc-1.8.tar.gz"
|
- "miniupnpc-1.8.tar.gz"
|
||||||
- "qrencode-3.4.3.tar.bz2"
|
- "qrencode-3.4.3.tar.bz2"
|
||||||
- "protobuf-2.5.0.tar.bz2"
|
- "protobuf-2.5.0.tar.bz2"
|
||||||
|
@ -24,11 +25,21 @@ script: |
|
||||||
OPTFLAGS='-O2'
|
OPTFLAGS='-O2'
|
||||||
export LIBRARY_PATH="$STAGING/lib"
|
export LIBRARY_PATH="$STAGING/lib"
|
||||||
# Integrity Check
|
# Integrity Check
|
||||||
|
echo "f74f15e8c8ff11aa3d5bb5f276d202ec18d7246e95f961db76054199c69c1ae3 openssl-1.0.1e.tar.gz" | sha256sum -c
|
||||||
echo "bc5f73c7b0056252c1888a80e6075787a1e1e9112b808f863a245483ff79859c miniupnpc-1.8.tar.gz" | sha256sum -c
|
echo "bc5f73c7b0056252c1888a80e6075787a1e1e9112b808f863a245483ff79859c miniupnpc-1.8.tar.gz" | sha256sum -c
|
||||||
echo "dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98 qrencode-3.4.3.tar.bz2" | sha256sum -c
|
echo "dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98 qrencode-3.4.3.tar.bz2" | sha256sum -c
|
||||||
echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 protobuf-2.5.0.tar.bz2" | sha256sum -c
|
echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 protobuf-2.5.0.tar.bz2" | sha256sum -c
|
||||||
echo "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz" | sha256sum -c
|
echo "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz" | sha256sum -c
|
||||||
|
|
||||||
|
#
|
||||||
|
tar xzf openssl-1.0.1e.tar.gz
|
||||||
|
cd openssl-1.0.1e
|
||||||
|
# need -fPIC to avoid relocation error in 64 bit builds
|
||||||
|
./config no-shared no-zlib no-dso no-krb5 --openssldir=$STAGING -fPIC
|
||||||
|
make
|
||||||
|
make install_sw
|
||||||
|
cd ..
|
||||||
|
#
|
||||||
tar xzfm miniupnpc-1.8.tar.gz
|
tar xzfm miniupnpc-1.8.tar.gz
|
||||||
cd miniupnpc-1.8
|
cd miniupnpc-1.8
|
||||||
# miniupnpc is always built with -fPIC
|
# miniupnpc is always built with -fPIC
|
||||||
|
@ -60,4 +71,4 @@ script: |
|
||||||
cd ../..
|
cd ../..
|
||||||
#
|
#
|
||||||
cd $STAGING
|
cd $STAGING
|
||||||
zip -r $OUTDIR/bitcoin-deps-linux${GBUILD_BITS}-gitian-r1.zip include lib bin host
|
zip -r $OUTDIR/bitcoin-deps-linux${GBUILD_BITS}-gitian-r2.zip include lib bin host
|
||||||
|
|
|
@ -6,14 +6,7 @@ architectures:
|
||||||
- "i386"
|
- "i386"
|
||||||
- "amd64"
|
- "amd64"
|
||||||
packages:
|
packages:
|
||||||
- "qt4-qmake"
|
|
||||||
- "libqt4-dev"
|
- "libqt4-dev"
|
||||||
- "libboost-system-dev"
|
|
||||||
- "libboost-filesystem-dev"
|
|
||||||
- "libboost-program-options-dev"
|
|
||||||
- "libboost-thread-dev"
|
|
||||||
- "libboost-test-dev"
|
|
||||||
- "libssl-dev"
|
|
||||||
- "git-core"
|
- "git-core"
|
||||||
- "unzip"
|
- "unzip"
|
||||||
- "pkg-config"
|
- "pkg-config"
|
||||||
|
@ -27,8 +20,10 @@ remotes:
|
||||||
- "url": "https://github.com/bitcoin/bitcoin.git"
|
- "url": "https://github.com/bitcoin/bitcoin.git"
|
||||||
"dir": "bitcoin"
|
"dir": "bitcoin"
|
||||||
files:
|
files:
|
||||||
- "bitcoin-deps-linux32-gitian-r1.zip"
|
- "bitcoin-deps-linux32-gitian-r2.zip"
|
||||||
- "bitcoin-deps-linux64-gitian-r1.zip"
|
- "bitcoin-deps-linux64-gitian-r2.zip"
|
||||||
|
- "boost-linux32-1.55.0-gitian-r1.zip"
|
||||||
|
- "boost-linux64-1.55.0-gitian-r1.zip"
|
||||||
script: |
|
script: |
|
||||||
STAGING="$HOME/install"
|
STAGING="$HOME/install"
|
||||||
OPTFLAGS='-O2'
|
OPTFLAGS='-O2'
|
||||||
|
@ -38,18 +33,19 @@ script: |
|
||||||
#
|
#
|
||||||
mkdir -p $STAGING
|
mkdir -p $STAGING
|
||||||
cd $STAGING
|
cd $STAGING
|
||||||
unzip ../build/bitcoin-deps-linux${GBUILD_BITS}-gitian-r1.zip
|
unzip ../build/bitcoin-deps-linux${GBUILD_BITS}-gitian-r2.zip
|
||||||
|
unzip ../build/boost-linux${GBUILD_BITS}-1.55.0-gitian-r1.zip
|
||||||
cd ../build
|
cd ../build
|
||||||
#
|
#
|
||||||
cd bitcoin
|
cd bitcoin
|
||||||
export TAR_OPTIONS=--mtime=`echo $REFERENCE_DATETIME | awk '{ print $1 }'`
|
export TAR_OPTIONS=--mtime=`echo $REFERENCE_DATETIME | awk '{ print $1 }'`
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
./configure --prefix=$STAGING --bindir=$BINDIR --with-protoc-bindir=$STAGING/host/bin --disable-maintainer-mode --disable-dependency-tracking PKG_CONFIG_PATH="$STAGING/lib/pkgconfig" CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib ${OPTFLAGS}" CXXFLAGS="-frandom-seed=bitcoin ${OPTFLAGS}"
|
./configure --prefix=$STAGING --bindir=$BINDIR --with-protoc-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --disable-dependency-tracking PKG_CONFIG_PATH="$STAGING/lib/pkgconfig" CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib ${OPTFLAGS}" CXXFLAGS="-frandom-seed=bitcoin ${OPTFLAGS}" BOOST_CHRONO_EXTRALIBS="-lrt"
|
||||||
make dist
|
make dist
|
||||||
mkdir -p distsrc
|
mkdir -p distsrc
|
||||||
cd distsrc
|
cd distsrc
|
||||||
tar --strip-components=1 -xf ../bitcoin-*.tar.*
|
tar --strip-components=1 -xf ../bitcoin-*.tar.*
|
||||||
./configure --prefix=$STAGING --bindir=$BINDIR --with-protoc-bindir=$STAGING/host/bin --disable-maintainer-mode --disable-dependency-tracking PKG_CONFIG_PATH="$STAGING/lib/pkgconfig" CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib ${OPTFLAGS}" CXXFLAGS="-frandom-seed=bitcoin ${OPTFLAGS}"
|
./configure --prefix=$STAGING --bindir=$BINDIR --with-protoc-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --disable-dependency-tracking PKG_CONFIG_PATH="$STAGING/lib/pkgconfig" CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib ${OPTFLAGS}" CXXFLAGS="-frandom-seed=bitcoin ${OPTFLAGS}" BOOST_CHRONO_EXTRALIBS="-lrt"
|
||||||
make $MAKEOPTS
|
make $MAKEOPTS
|
||||||
make $MAKEOPTS install-strip
|
make $MAKEOPTS install-strip
|
||||||
mkdir -p $OUTDIR/src
|
mkdir -p $OUTDIR/src
|
||||||
|
|
|
@ -53,6 +53,8 @@ Release Process
|
||||||
cd ..
|
cd ..
|
||||||
./bin/gbuild ../bitcoin/contrib/gitian-descriptors/deps-linux.yml
|
./bin/gbuild ../bitcoin/contrib/gitian-descriptors/deps-linux.yml
|
||||||
mv build/out/bitcoin-deps-*.zip inputs/
|
mv build/out/bitcoin-deps-*.zip inputs/
|
||||||
|
./bin/gbuild ../bitcoin/contrib/gitian-descriptors/boost-linux.yml
|
||||||
|
mv build/out/boost-linux-*.zip inputs/
|
||||||
./bin/gbuild ../bitcoin/contrib/gitian-descriptors/boost-win32.yml
|
./bin/gbuild ../bitcoin/contrib/gitian-descriptors/boost-win32.yml
|
||||||
mv build/out/boost-win32-*.zip inputs/
|
mv build/out/boost-win32-*.zip inputs/
|
||||||
./bin/gbuild ../bitcoin/contrib/gitian-descriptors/deps-win32.yml
|
./bin/gbuild ../bitcoin/contrib/gitian-descriptors/deps-win32.yml
|
||||||
|
|
Loading…
Reference in a new issue