From b1e5fac728c1fb7e55737d13ebc9cc514d4775da Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Mon, 13 Aug 2018 22:21:42 +0200 Subject: [PATCH] Backport move to Ubuntu Bionic and GCC7 in Gitian builds * Add stdin, stdout, stderr to ignored export list * Merge bitcoin#13171: Change gitian-descriptors to use bionic instead c1afe32 Change gitian-descriptors to use bionic instead (Chun Kuan Lee) Pull request description: I have tested this with Ubuntu Bionic host with lxc 3.0.0, the gitian-build for Windows and MacOSX work fine, but there is an issue about it for Linux. Failed at check-symbol: ``` test/test_bitcoin: symbol __divmoddi4 from unsupported version GCC_7.0.0 test/test_bitcoin: symbol log2f from unsupported version GLIBC_2.27 qt/bitcoin-qt: symbol __divmoddi4 from unsupported version GCC_7.0.0 qt/bitcoin-qt: symbol log2f from unsupported version GLIBC_2.27 ``` I think this should be fixed in `./configure --enable-glibc-back-compat` Should not be merged before bitcoin#13177 devrandom/gitian-builder#178 Close bitcoin#12511 Tree-SHA512: 257d75d5b6864e105279f7a7b992fbbd7903cdbe3300b66dacec0a783d267707d9dbbfe0e64a36983ca1eca50a2a5e1cdb222b6d3745ccc3e5fc5636c88b581f * Use IN6ADDR_ANY_INIT instead of in6addr_any This is the same fix as bitcoin@fc6a9f2 Couldn't backport the original commit as we are missing some refactorings. --- contrib/devtools/symbol-check.py | 2 +- contrib/gitian-build.sh | 9 ++++----- contrib/gitian-descriptors/gitian-linux.yml | 16 ++++++++-------- contrib/gitian-descriptors/gitian-osx-signer.yml | 2 +- contrib/gitian-descriptors/gitian-osx.yml | 4 ++-- contrib/gitian-descriptors/gitian-win-signer.yml | 2 +- contrib/gitian-descriptors/gitian-win.yml | 9 +++++---- src/init.cpp | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py index c23ee5624c00d..c945fcbde94d5 100755 --- a/contrib/devtools/symbol-check.py +++ b/contrib/devtools/symbol-check.py @@ -46,7 +46,7 @@ # Ignore symbols that are exported as part of every executable IGNORE_EXPORTS = { -'_edata', '_end', '_init', '__bss_start', '_fini', '_IO_stdin_used' +'_edata', '_end', '_init', '__bss_start', '_fini', '_IO_stdin_used', 'stdin', 'stdout', 'stderr' } READELF_CMD = os.getenv('READELF', '/usr/bin/readelf') CPPFILT_CMD = os.getenv('CPPFILT', '/usr/bin/c++filt') diff --git a/contrib/gitian-build.sh b/contrib/gitian-build.sh index d05bcf69295a0..e773114b00c71 100644 --- a/contrib/gitian-build.sh +++ b/contrib/gitian-build.sh @@ -258,14 +258,13 @@ then if [[ -n "$USE_LXC" ]] then sudo apt-get install lxc - bin/make-base-vm --suite trusty --arch amd64 --lxc - + bin/make-base-vm --suite bionic --arch amd64 --lxc elif [[ -n "$USE_DOCKER" ]] then sudo apt-get install docker-ce - bin/make-base-vm --suite trusty --arch amd64 --docker + bin/make-base-vm --suite bionic --arch amd64 --docker else - bin/make-base-vm --suite trusty --arch amd64 + bin/make-base-vm --suite bionic --arch amd64 fi popd fi @@ -377,7 +376,7 @@ fi if [[ $sign = true ]] then - + pushd ./gitian-builder # Sign Windows if [[ $windows = true ]] diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index e4345db8e5936..c77bec48561aa 100755 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -2,23 +2,23 @@ name: "absolute-linux-0.12" enable_cache: true suites: -- "trusty" +- "bionic" architectures: - "amd64" packages: - "curl" - "g++-aarch64-linux-gnu" -- "g++-4.8-aarch64-linux-gnu" -- "gcc-4.8-aarch64-linux-gnu" +- "g++-7-aarch64-linux-gnu" +- "gcc-7-aarch64-linux-gnu" - "binutils-aarch64-linux-gnu" - "g++-arm-linux-gnueabihf" -- "g++-4.8-arm-linux-gnueabihf" -- "gcc-4.8-arm-linux-gnueabihf" +- "g++-7-arm-linux-gnueabihf" +- "gcc-7-arm-linux-gnueabihf" - "binutils-arm-linux-gnueabihf" -- "g++-4.8-multilib" -- "gcc-4.8-multilib" +- "g++-7-multilib" +- "gcc-7-multilib" - "binutils-gold" -- "git-core" +- "git" - "pkg-config" - "autoconf" - "libtool" diff --git a/contrib/gitian-descriptors/gitian-osx-signer.yml b/contrib/gitian-descriptors/gitian-osx-signer.yml index a3ce722335647..e49482bb3a110 100644 --- a/contrib/gitian-descriptors/gitian-osx-signer.yml +++ b/contrib/gitian-descriptors/gitian-osx-signer.yml @@ -1,7 +1,7 @@ --- name: "absolute-dmg-signer" suites: -- "trusty" +- "bionic" architectures: - "amd64" packages: diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml index 1ae179fd4ec37..632aa826c582c 100644 --- a/contrib/gitian-descriptors/gitian-osx.yml +++ b/contrib/gitian-descriptors/gitian-osx.yml @@ -2,14 +2,14 @@ name: "absolute-osx-0.12" enable_cache: true suites: -- "trusty" +- "bionic" architectures: - "amd64" packages: - "ca-certificates" - "curl" - "g++" -- "git-core" +- "git" - "pkg-config" - "autoconf" - "librsvg2-bin" diff --git a/contrib/gitian-descriptors/gitian-win-signer.yml b/contrib/gitian-descriptors/gitian-win-signer.yml index 81712a5cf123e..b8414ef2bb359 100644 --- a/contrib/gitian-descriptors/gitian-win-signer.yml +++ b/contrib/gitian-descriptors/gitian-win-signer.yml @@ -1,7 +1,7 @@ --- name: "absolute-win-signer" suites: -- "trusty" +- "bionic" architectures: - "amd64" packages: diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml index 7ff8890155210..f3296971ca99e 100755 --- a/contrib/gitian-descriptors/gitian-win.yml +++ b/contrib/gitian-descriptors/gitian-win.yml @@ -2,13 +2,13 @@ name: "absolute-win-0.12" enable_cache: true suites: -- "trusty" +- "bionic" architectures: - "amd64" packages: - "curl" - "g++" -- "git-core" +- "git" - "pkg-config" - "autoconf" - "libtool" @@ -22,6 +22,7 @@ packages: - "ca-certificates" - "python" - "python3" +- "rename" remotes: - "url": "https://github.com/absolute-community/absolute.git" "dir": "absolute" @@ -30,7 +31,7 @@ script: | WRAP_DIR=$HOME/wrapped HOSTS="i686-w64-mingw32 x86_64-w64-mingw32" CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests" - FAKETIME_HOST_PROGS="g++ ar ranlib nm windres strip objcopy" + FAKETIME_HOST_PROGS="ar ranlib nm windres strip objcopy" FAKETIME_PROGS="date makensis zip" HOST_CFLAGS="-O2 -g" HOST_CXXFLAGS="-O2 -g" @@ -109,7 +110,7 @@ script: | for prog in gcc g++; do echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog} echo "# GCCVERSION=${GCCVERSION}" >> ${WRAP_DIR}/${i}-${prog} - echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog} + echo "REAL=\`which -a ${i}-${prog}-posix | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog} echo '# Add the gcc version to the wrapper so that ccache takes this into account (we use CCACHE_COMPILERCHECK=content)' >> ${WRAP_DIR}/${i}-${prog} echo "# `${prog} --version | head -1`" >> ${WRAP_DIR}/${i}-${prog} echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog} diff --git a/src/init.cpp b/src/init.cpp index e9571e093497f..6177b9e7a4d9e 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1512,7 +1512,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler) if (!mapMultiArgs.count("-bind") && !mapMultiArgs.count("-whitebind")) { struct in_addr inaddr_any; inaddr_any.s_addr = INADDR_ANY; - fBound |= Bind(connman, CService(in6addr_any, GetListenPort()), BF_NONE); + fBound |= Bind(connman, CService((in6_addr)IN6ADDR_ANY_INIT, GetListenPort()), BF_NONE); fBound |= Bind(connman, CService(inaddr_any, GetListenPort()), !fBound ? BF_REPORT_ERROR : BF_NONE); } if (!fBound)