Skip to content

Commit c983d6f

Browse files
committed
Merge pull request #6900
2cecb24 doc: change suite to trusty in gitian-building.md (Wladimir J. van der Laan) 957c0fd gitian: make windows build deterministic (Wladimir J. van der Laan) 2e31d74 gitian: use trusty for building (Wladimir J. van der Laan) 0b416c6 depends: qt PIDLIST_ABSOLUTE patch (Wladimir J. van der Laan) 9f251b7 devtools: add libraries for bitcoin-qt to symbol check (Wladimir J. van der Laan)
2 parents 52c5637 + 2cecb24 commit c983d6f

File tree

10 files changed

+98
-31
lines changed

10 files changed

+98
-31
lines changed

contrib/devtools/symbol-check.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,24 @@
4949
READELF_CMD = os.getenv('READELF', '/usr/bin/readelf')
5050
CPPFILT_CMD = os.getenv('CPPFILT', '/usr/bin/c++filt')
5151
# Allowed NEEDED libraries
52-
ALLOWED_LIBRARIES = {'librt.so.1','libpthread.so.0','libanl.so.1','libm.so.6','libgcc_s.so.1','libc.so.6','ld-linux-x86-64.so.2'}
52+
ALLOWED_LIBRARIES = {
53+
# bitcoind and bitcoin-qt
54+
'libgcc_s.so.1', # GCC base support
55+
'libc.so.6', # C library
56+
'libpthread.so.0', # threading
57+
'libanl.so.1', # DNS resolve
58+
'libm.so.6', # math library
59+
'librt.so.1', # real-time (clock)
60+
'ld-linux-x86-64.so.2', # 64-bit dynamic linker
61+
'ld-linux.so.2', # 32-bit dynamic linker
62+
# bitcoin-qt only
63+
'libX11-xcb.so.1', # part of X11
64+
'libX11.so.6', # part of X11
65+
'libxcb.so.1', # part of X11
66+
'libfontconfig.so.1', # font support
67+
'libfreetype.so.6', # font parsing
68+
'libdl.so.2' # programming interface to dynamic linker
69+
}
5370

5471
class CPPFilt(object):
5572
'''

contrib/gitian-descriptors/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Once you've got the right hardware and software:
2727

2828
# Create base images
2929
cd gitian-builder
30-
bin/make-base-vm --suite precise --arch amd64
30+
bin/make-base-vm --suite trusty --arch amd64
3131
cd ..
3232

3333
# Get inputs (see doc/release-process.md for exact inputs needed and where to get them)

contrib/gitian-descriptors/gitian-linux.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@
22
name: "bitcoin-linux-0.12"
33
enable_cache: true
44
suites:
5-
- "precise"
5+
- "trusty"
66
architectures:
77
- "amd64"
88
packages:
99
- "g++-multilib"
1010
- "git-core"
1111
- "pkg-config"
12-
- "autoconf2.13"
12+
- "autoconf"
1313
- "libtool"
1414
- "automake"
1515
- "faketime"
1616
- "bsdmainutils"
1717
- "binutils-gold"
18-
- "libstdc++6-4.6-pic"
1918
reference_datetime: "2015-06-01 00:00:00"
2019
remotes:
2120
- "url": "https://github.com/bitcoin/bitcoin.git"
@@ -44,7 +43,7 @@ script: |
4443
for prog in ${FAKETIME_PROGS}; do
4544
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
4645
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
47-
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
46+
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
4847
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
4948
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
5049
chmod +x ${WRAP_DIR}/${prog}
@@ -55,7 +54,7 @@ script: |
5554
for prog in ${FAKETIME_HOST_PROGS}; do
5655
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
5756
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
58-
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
57+
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
5958
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
6059
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
6160
chmod +x ${WRAP_DIR}/${i}-${prog}
@@ -70,14 +69,6 @@ script: |
7069
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
7170
done
7271
73-
# Ubuntu precise hack: Not an issue in later versions.
74-
# Precise's libstdc++.a is non-pic. There's an optional libstdc++6-4.6-pic
75-
# package which provides libstdc++_pic.a, but the linker can't find it.
76-
# Symlink it to a path that will be included in our link-line so that the
77-
# linker picks it up before the default libstdc++.a.
78-
# This is only necessary for 64bit.
79-
ln -s /usr/lib/gcc/x86_64-linux-gnu/4.6/libstdc++_pic.a ${BASEPREFIX}/x86_64-unknown-linux-gnu/lib/libstdc++.a
80-
8172
# Create the release tarball using (arbitrarily) the first host
8273
./autogen.sh
8374
./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`

contrib/gitian-descriptors/gitian-osx-signer.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: "bitcoin-dmg-signer"
33
suites:
4-
- "precise"
4+
- "trusty"
55
architectures:
66
- "amd64"
77
packages:
@@ -23,7 +23,7 @@ script: |
2323
for prog in ${FAKETIME_PROGS}; do
2424
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
2525
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
26-
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
26+
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
2727
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
2828
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
2929
chmod +x ${WRAP_DIR}/${prog}

contrib/gitian-descriptors/gitian-osx.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
name: "bitcoin-osx-0.12"
33
enable_cache: true
44
suites:
5-
- "precise"
5+
- "trusty"
66
architectures:
77
- "amd64"
88
packages:
99
- "g++"
1010
- "git-core"
1111
- "pkg-config"
12-
- "autoconf2.13"
12+
- "autoconf"
1313
- "libtool"
1414
- "automake"
1515
- "faketime"
@@ -49,7 +49,7 @@ script: |
4949
for prog in ${FAKETIME_PROGS}; do
5050
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
5151
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
52-
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
52+
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
5353
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
5454
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
5555
chmod +x ${WRAP_DIR}/${prog}
@@ -60,7 +60,7 @@ script: |
6060
for prog in ${FAKETIME_HOST_PROGS}; do
6161
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
6262
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
63-
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
63+
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
6464
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
6565
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
6666
chmod +x ${WRAP_DIR}/${i}-${prog}

contrib/gitian-descriptors/gitian-win-signer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: "bitcoin-win-signer"
33
suites:
4-
- "precise"
4+
- "trusty"
55
architectures:
66
- "amd64"
77
packages:

contrib/gitian-descriptors/gitian-win.yml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
name: "bitcoin-win-0.12"
33
enable_cache: true
44
suites:
5-
- "precise"
5+
- "trusty"
66
architectures:
77
- "amd64"
88
packages:
99
- "g++"
1010
- "git-core"
1111
- "pkg-config"
12-
- "autoconf2.13"
12+
- "autoconf"
1313
- "libtool"
1414
- "automake"
1515
- "faketime"
@@ -46,7 +46,7 @@ script: |
4646
for prog in ${FAKETIME_PROGS}; do
4747
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
4848
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
49-
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
49+
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
5050
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
5151
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
5252
chmod +x ${WRAP_DIR}/${prog}
@@ -57,12 +57,36 @@ script: |
5757
for prog in ${FAKETIME_HOST_PROGS}; do
5858
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
5959
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
60-
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
60+
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
6161
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
6262
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
6363
chmod +x ${WRAP_DIR}/${i}-${prog}
6464
done
6565
done
66+
67+
# Create per-host linker wrapper
68+
# This is only needed for trusty, as the mingw linker leaks a few bytes of
69+
# heap, causing non-determinism. See discussion in https://github.com/bitcoin/bitcoin/pull/6900
70+
for i in $HOSTS; do
71+
mkdir -p ${WRAP_DIR}/${i}
72+
for prog in collect2; do
73+
echo '#!/bin/bash' > ${WRAP_DIR}/${i}/${prog}
74+
REAL=$(${i}-gcc -print-prog-name=${prog})
75+
echo "export MALLOC_PERTURB_=255" >> ${WRAP_DIR}/${i}/${prog}
76+
echo "${REAL} \$@" >> $WRAP_DIR/${i}/${prog}
77+
chmod +x ${WRAP_DIR}/${i}/${prog}
78+
done
79+
for prog in gcc g++; do
80+
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
81+
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
82+
echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
83+
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
84+
echo "export COMPILER_PATH=${WRAP_DIR}/${i}" >> ${WRAP_DIR}/${i}-${prog}
85+
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
86+
chmod +x ${WRAP_DIR}/${i}-${prog}
87+
done
88+
done
89+
6690
export PATH=${WRAP_DIR}:${PATH}
6791
6892
cd bitcoin

depends/packages/qt.mk

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ $(package)_dependencies=openssl
88
$(package)_linux_dependencies=freetype fontconfig dbus libxcb libX11 xproto libXext
99
$(package)_build_subdir=qtbase
1010
$(package)_qt_libs=corelib network widgets gui plugins testlib
11-
$(package)_patches=mac-qmake.conf fix-xcb-include-order.patch mingw-uuidof.patch
11+
$(package)_patches=mac-qmake.conf fix-xcb-include-order.patch mingw-uuidof.patch pidlist_absolute.patch
1212

1313
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
1414
$(package)_qttranslations_sha256_hash=c4bd6db6e426965c6f8824c54e81f68bbd61e2bae1bcadc328c6e81c45902a0d
@@ -122,9 +122,6 @@ endef
122122
define $(package)_preprocess_cmds
123123
sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \
124124
sed -i.old "s/src_plugins.depends = src_sql src_xml src_network/src_plugins.depends = src_xml src_network/" qtbase/src/src.pro && \
125-
sed -i.old "s/PIDLIST_ABSOLUTE/ITEMIDLIST */" qtbase/src/plugins/platforms/windows/qwindowscontext.h &&\
126-
sed -i.old "s/PIDLIST_ABSOLUTE/ITEMIDLIST */" qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp &&\
127-
sed -i.old "s/PCIDLIST_ABSOLUTE/const ITEMIDLIST */" qtbase/src/plugins/platforms/windows/qwindowscontext.h &&\
128125
sed -i.old "s|X11/extensions/XIproto.h|X11/X.h|" qtbase/src/plugins/platforms/xcb/qxcbxsettings.cpp && \
129126
sed -i.old 's/if \[ "$$$$XPLATFORM_MAC" = "yes" \]; then xspecvals=$$$$(macSDKify/if \[ "$$$$BUILD_ON_MAC" = "yes" \]; then xspecvals=$$$$(macSDKify/' qtbase/configure && \
130127
mkdir -p qtbase/mkspecs/macx-clang-linux &&\
@@ -134,6 +131,7 @@ define $(package)_preprocess_cmds
134131
cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \
135132
patch -p1 < $($(package)_patch_dir)/fix-xcb-include-order.patch && \
136133
patch -p1 < $($(package)_patch_dir)/mingw-uuidof.patch && \
134+
patch -p1 < $($(package)_patch_dir)/pidlist_absolute.patch && \
137135
echo "QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
138136
echo "QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
139137
echo "QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
diff -dur old/qtbase/src/plugins/platforms/windows/qwindowscontext.h new/qtbase/src/plugins/platforms/windows/qwindowscontext.h
2+
--- old/qtbase/src/plugins/platforms/windows/qwindowscontext.h 2015-06-29 22:04:40.000000000 +0200
3+
+++ new/qtbase/src/plugins/platforms/windows/qwindowscontext.h 2015-11-01 12:55:59.751234846 +0100
4+
@@ -124,10 +124,18 @@
5+
inline void init();
6+
7+
typedef HRESULT (WINAPI *SHCreateItemFromParsingName)(PCWSTR, IBindCtx *, const GUID&, void **);
8+
+#if defined(Q_CC_MINGW) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3)
9+
+ typedef HRESULT (WINAPI *SHGetKnownFolderIDList)(const GUID &, DWORD, HANDLE, ITEMIDLIST **);
10+
+#else
11+
typedef HRESULT (WINAPI *SHGetKnownFolderIDList)(const GUID &, DWORD, HANDLE, PIDLIST_ABSOLUTE *);
12+
+#endif
13+
typedef HRESULT (WINAPI *SHGetStockIconInfo)(int , int , _SHSTOCKICONINFO *);
14+
typedef HRESULT (WINAPI *SHGetImageList)(int, REFIID , void **);
15+
+#if defined(Q_CC_MINGW) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3)
16+
+ typedef HRESULT (WINAPI *SHCreateItemFromIDList)(const ITEMIDLIST *, REFIID, void **);
17+
+#else
18+
typedef HRESULT (WINAPI *SHCreateItemFromIDList)(PCIDLIST_ABSOLUTE, REFIID, void **);
19+
+#endif
20+
21+
SHCreateItemFromParsingName sHCreateItemFromParsingName;
22+
SHGetKnownFolderIDList sHGetKnownFolderIDList;
23+
diff -dur old/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp new/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
24+
--- old/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp 2015-06-29 22:04:40.000000000 +0200
25+
+++ new/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp 2015-11-01 13:41:09.503149772 +0100
26+
@@ -1008,7 +1008,11 @@
27+
qWarning() << __FUNCTION__ << ": Invalid CLSID: " << url.path();
28+
return Q_NULLPTR;
29+
}
30+
+#if defined(Q_CC_MINGW) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3)
31+
+ ITEMIDLIST *idList;
32+
+#else
33+
PIDLIST_ABSOLUTE idList;
34+
+#endif
35+
HRESULT hr = QWindowsContext::shell32dll.sHGetKnownFolderIDList(uuid, 0, 0, &idList);
36+
if (FAILED(hr)) {
37+
qErrnoWarning("%s: SHGetKnownFolderIDList(%s)) failed", __FUNCTION__, qPrintable(url.toString()));

doc/gitian-building.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ Execute the following as user `debian`:
320320

321321
```bash
322322
cd gitian-builder
323-
bin/make-base-vm --lxc --arch amd64 --suite precise
323+
bin/make-base-vm --lxc --arch amd64 --suite trusty
324324
```
325325

326326
There will be a lot of warnings printed during the build of the image. These can be ignored.

0 commit comments

Comments
 (0)