Browse Source

Upgrade gitian win32 to Precise 12.04.

mingw upgrade allows more hardening, compiler bug fixes and possibily win64 later.
Rename deps .zip files to be more consistent in revision format.
Boost #4258 build fix for mingw32
0.10
Warren Togami 11 years ago
parent
commit
af6c2c71ed
  1. 65
      contrib/gitian-descriptors/boost-win32.yml
  2. 13
      contrib/gitian-descriptors/deps-win32.yml
  3. 29
      contrib/gitian-descriptors/gitian-win32.yml
  4. 11
      contrib/gitian-descriptors/protobuf-win32.yml
  5. 30
      contrib/gitian-descriptors/qt-win32.yml

65
contrib/gitian-descriptors/boost-win32.yml

@ -1,11 +1,12 @@
--- ---
name: "boost" name: "boost"
suites: suites:
- "lucid" - "precise"
architectures: architectures:
- "i386" - "amd64"
packages: packages:
- "mingw32" - "mingw-w64"
- "g++-mingw-w64"
- "faketime" - "faketime"
- "zip" - "zip"
reference_datetime: "2011-01-30 00:00:00" reference_datetime: "2011-01-30 00:00:00"
@ -13,21 +14,69 @@ remotes: []
files: files:
- "boost_1_50_0.tar.bz2" - "boost_1_50_0.tar.bz2"
script: | script: |
#
INSTALLPREFIX="$OUTDIR/staging/boost" INSTALLPREFIX="$OUTDIR/staging/boost"
HOST=i686-w64-mingw32
#
mkdir -p "$INSTALLPREFIX" mkdir -p "$INSTALLPREFIX"
tar xjf boost_1_50_0.tar.bz2 tar xjf boost_1_50_0.tar.bz2
cd boost_1_50_0 cd boost_1_50_0
echo "using gcc : 4.4 : i586-mingw32msvc-g++
# Boost #4258: multiple definition of `_tls_used' https://svn.boost.org/trac/boost/ticket/4258
cd libs/thread/
patch -p1 << 'EOF'
From 8b83ad1f0ac4c56f019072de4a7a93f8fcccb96b Mon Sep 17 00:00:00 2001
From: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Sat, 7 Jul 2012 14:37:07 +0000
Subject: [PATCH] Thread: Added __MINGW64_VERSION_MAJOR when __MINGW64__ is not
defined
---
src/win32/tss_pe.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/win32/tss_pe.cpp b/src/win32/tss_pe.cpp
index 4d75680..0cdb7a6 100644
--- a/src/win32/tss_pe.cpp
+++ b/src/win32/tss_pe.cpp
@@ -11,7 +11,7 @@
#if defined(BOOST_HAS_WINTHREADS) && defined(BOOST_THREAD_BUILD_LIB)
-#if (defined(__MINGW32__) && !defined(_WIN64)) || defined(__MINGW64__)
+#if (defined(__MINGW32__) && !defined(_WIN64)) || defined(__MINGW64__) || (__MINGW64_VERSION_MAJOR)
#include <boost/thread/detail/tss_hooks.hpp>
@@ -38,7 +38,7 @@
}
}
-#if defined(__MINGW64__) || (__MINGW32_MAJOR_VERSION >3) || \
+#if defined(__MINGW64__) || (__MINGW64_VERSION_MAJOR) || (__MINGW32_MAJOR_VERSION >3) || \
((__MINGW32_MAJOR_VERSION==3) && (__MINGW32_MINOR_VERSION>=18))
extern "C"
{
--
1.8.4
EOF
cd -
GCCVERSION=$($HOST-g++ -E -dM $(mktemp --suffix=.h) | grep __VERSION__ | cut -d ' ' -f 3 | cut -d '"' -f 2)
echo "using gcc : $GCCVERSION : $HOST-g++
: :
<rc>i586-mingw32msvc-windres <rc>$HOST-windres
<archiver>i586-mingw32msvc-ar <archiver>$HOST-ar
<cxxflags>-frandom-seed=boost1 <cxxflags>-frandom-seed=boost1
<ranlib>$HOST-ranlib
;" > user-config.jam ;" > user-config.jam
./bootstrap.sh --without-icu ./bootstrap.sh --without-icu
./bjam toolset=gcc 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 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
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.50.0-gitian3.zip * zip -r boost-win32-1.50.0-gitian-r5.zip *
cp boost-win32-1.50.0-gitian3.zip $OUTDIR cp boost-win32-1.50.0-gitian-r5.zip $OUTDIR

13
contrib/gitian-descriptors/deps-win32.yml

@ -1,11 +1,12 @@
--- ---
name: "bitcoin-deps" name: "bitcoin-deps"
suites: suites:
- "lucid" - "precise"
architectures: architectures:
- "i386" - "amd64"
packages: packages:
- "mingw32" - "mingw-w64"
- "g++-mingw-w64"
- "git-core" - "git-core"
- "zip" - "zip"
- "faketime" - "faketime"
@ -26,7 +27,7 @@ script: |
export FAKETIME=$REFERENCE_DATETIME export FAKETIME=$REFERENCE_DATETIME
export TZ=UTC export TZ=UTC
export INSTALLPREFIX=$OUTDIR/staging/deps export INSTALLPREFIX=$OUTDIR/staging/deps
export HOST=i586-mingw32msvc export HOST=i686-w64-mingw32
# #
mkdir -p $INSTALLPREFIX mkdir -p $INSTALLPREFIX
@ -71,12 +72,12 @@ script: |
# #
tar xjf qrencode-3.2.0.tar.bz2 tar xjf qrencode-3.2.0.tar.bz2
cd qrencode-3.2.0 cd qrencode-3.2.0
png_CFLAGS="-I$INSTALLPREFIX/include" png_LIBS="-L$INSTALLPREFIX/lib -lpng" ./configure --prefix=$INSTALLPREFIX --host=i586-mingw32msvc png_CFLAGS="-I$INSTALLPREFIX/include" png_LIBS="-L$INSTALLPREFIX/lib -lpng" ./configure --prefix=$INSTALLPREFIX --host=$HOST
make make
make install make install
cd .. cd ..
# #
cd $INSTALLPREFIX cd $INSTALLPREFIX
zip -r $OUTDIR/bitcoin-deps-0.0.7.zip include lib zip -r $OUTDIR/bitcoin-deps-win32-gitian-r8.zip include lib
# Kill wine processes as gitian won't figure out we are done otherwise # Kill wine processes as gitian won't figure out we are done otherwise
killall wineserver services.exe explorer.exe winedevice.exe killall wineserver services.exe explorer.exe winedevice.exe

29
contrib/gitian-descriptors/gitian-win32.yml

@ -1,11 +1,12 @@
--- ---
name: "bitcoin" name: "bitcoin"
suites: suites:
- "lucid" - "precise"
architectures: architectures:
- "i386" - "amd64"
packages: packages:
- "mingw32" - "mingw-w64"
- "g++-mingw-w64"
- "git-core" - "git-core"
- "unzip" - "unzip"
- "nsis" - "nsis"
@ -21,31 +22,33 @@ remotes:
- "url": "https://github.com/bitcoin/bitcoin.git" - "url": "https://github.com/bitcoin/bitcoin.git"
"dir": "bitcoin" "dir": "bitcoin"
files: files:
- "qt-win32-4.8.3-gitian-r3.zip" - "qt-win32-4.8.3-gitian-r4.zip"
- "boost-win32-1.50.0-gitian3.zip" - "boost-win32-1.50.0-gitian-r5.zip"
- "bitcoin-deps-0.0.7.zip" - "bitcoin-deps-win32-gitian-r8.zip"
- "protobuf-win32-2.5.0-gitian-r2.zip" - "protobuf-win32-2.5.0-gitian-r3.zip"
script: | script: |
# #
STAGING=$HOME/staging STAGING=$HOME/staging
HOST=i686-w64-mingw32
#
mkdir -p $STAGING mkdir -p $STAGING
cd $STAGING cd $STAGING
unzip ../build/qt-win32-4.8.3-gitian-r3.zip unzip ../build/qt-win32-4.8.3-gitian-r4.zip
unzip ../build/boost-win32-1.50.0-gitian3.zip unzip ../build/boost-win32-1.50.0-gitian-r5.zip
unzip ../build/bitcoin-deps-0.0.7.zip unzip ../build/bitcoin-deps-win32-gitian-r8.zip
unzip ../build/protobuf-win32-2.5.0-gitian-r2.zip unzip ../build/protobuf-win32-2.5.0-gitian-r3.zip
cd $HOME/build/ cd $HOME/build/
# #
cd bitcoin cd bitcoin
export PATH=$STAGING/host/bin:$PATH export PATH=$STAGING/host/bin:$PATH
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 --bindir=$OUTDIR --prefix=$STAGING --host=i586-mingw32msvc --with-qt-plugindir=$STAGING/plugins --with-qt-incdir=$STAGING/include --with-qt-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --with-protoc-bindir=$STAGING/host/bin --disable-dependency-tracking CPPFLAGS="-I$STAGING/include" LDFLAGS="-L$STAGING/lib" CXXFLAGS="-frandom-seed=bitcoin" ./configure --bindir=$OUTDIR --prefix=$STAGING --host=$HOST --with-qt-plugindir=$STAGING/plugins --with-qt-incdir=$STAGING/include --with-qt-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --with-protoc-bindir=$STAGING/host/bin --disable-dependency-tracking CPPFLAGS="-I$STAGING/include" LDFLAGS="-L$STAGING/lib" CXXFLAGS="-frandom-seed=bitcoin"
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 --bindir=$OUTDIR --prefix=$STAGING --host=i586-mingw32msvc --with-qt-plugindir=$STAGING/plugins --with-qt-incdir=$STAGING/include --with-qt-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --with-protoc-bindir=$STAGING/host/bin --disable-dependency-tracking CPPFLAGS="-I$STAGING/include" LDFLAGS="-L$STAGING/lib" CXXFLAGS="-frandom-seed=bitcoin" ./configure --bindir=$OUTDIR --prefix=$STAGING --host=i686-w64-mingw32 --with-qt-plugindir=$STAGING/plugins --with-qt-incdir=$STAGING/include --with-qt-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --with-protoc-bindir=$STAGING/host/bin --disable-dependency-tracking CPPFLAGS="-I$STAGING/include" LDFLAGS="-L$STAGING/lib" CXXFLAGS="-frandom-seed=bitcoin"
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
export TZ=UTC export TZ=UTC

11
contrib/gitian-descriptors/protobuf-win32.yml

@ -1,11 +1,12 @@
--- ---
name: "protobuf-win32" name: "protobuf-win32"
suites: suites:
- "lucid" - "precise"
architectures: architectures:
- "i386" - "amd64"
packages: packages:
- "mingw32" - "mingw-w64"
- "g++-mingw-w64"
- "zip" - "zip"
- "faketime" - "faketime"
reference_datetime: "2013-04-15 00:00:00" reference_datetime: "2013-04-15 00:00:00"
@ -16,7 +17,7 @@ script: |
# #
export TZ=UTC export TZ=UTC
export INSTALLPREFIX=$OUTDIR/staging/deps export INSTALLPREFIX=$OUTDIR/staging/deps
export HOST=i586-mingw32msvc export HOST=i686-w64-mingw32
# #
# #
mkdir -p $INSTALLPREFIX mkdir -p $INSTALLPREFIX
@ -36,6 +37,6 @@ script: |
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 $OUTDIR/protobuf-win32-2.5.0-gitian-r2.zip include lib host zip -r $OUTDIR/protobuf-win32-2.5.0-gitian-r3.zip include lib host
unset LD_PRELOAD unset LD_PRELOAD
unset FAKETIME unset FAKETIME

30
contrib/gitian-descriptors/qt-win32.yml

@ -1,11 +1,12 @@
--- ---
name: "qt" name: "qt"
suites: suites:
- "lucid" - "precise"
architectures: architectures:
- "i386" - "amd64"
packages: packages:
- "mingw32" - "mingw-w64"
- "g++-mingw-w64"
- "zip" - "zip"
- "unzip" - "unzip"
- "faketime" - "faketime"
@ -14,34 +15,37 @@ reference_datetime: "2011-01-30 00:00:00"
remotes: [] remotes: []
files: files:
- "qt-everywhere-opensource-src-4.8.3.tar.gz" - "qt-everywhere-opensource-src-4.8.3.tar.gz"
- "bitcoin-deps-0.0.7.zip" - "bitcoin-deps-win32-gitian-r8.zip"
script: | script: |
#
HOST=i686-w64-mingw32
INSTDIR="$HOME/qt/" INSTDIR="$HOME/qt/"
#
mkdir $INSTDIR mkdir $INSTDIR
mkdir -p $INSTDIR/host/bin mkdir -p $INSTDIR/host/bin
# #
# Need mingw-compiled openssl from bitcoin-deps: # Need mingw-compiled openssl from bitcoin-deps:
unzip bitcoin-deps-0.0.7.zip unzip bitcoin-deps-win32-gitian-r8.zip
DEPSDIR=`pwd` DEPSDIR=`pwd`
# #
tar xzf qt-everywhere-opensource-src-4.8.3.tar.gz tar xzf qt-everywhere-opensource-src-4.8.3.tar.gz
cd qt-everywhere-opensource-src-4.8.3 cd qt-everywhere-opensource-src-4.8.3
sed 's/$TODAY/2011-01-30/' -i configure sed 's/$TODAY/2011-01-30/' -i configure
sed 's/i686-pc-mingw32-/i586-mingw32msvc-/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf sed 's/i686-pc-mingw32-/$HOST-/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
sed --posix 's|QMAKE_CFLAGS\t\t= -pipe|QMAKE_CFLAGS\t\t= -pipe -isystem /usr/i586-mingw32msvc/include/ -frandom-seed=qtbuild|' -i mkspecs/unsupported/win32-g++-cross/qmake.conf sed --posix 's|QMAKE_CFLAGS\t\t= -pipe|QMAKE_CFLAGS\t\t= -pipe -isystem /usr/$HOST/include/ -frandom-seed=qtbuild|' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
sed 's/QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads/QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf sed 's/QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads/QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
sed 's/QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads/QMAKE_LFLAGS_EXCEPTIONS_ON = -lmingwthrd/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf sed 's/QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads/QMAKE_LFLAGS_EXCEPTIONS_ON = -lmingwthrd/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
sed --posix 's/QMAKE_MOC\t\t= i586-mingw32msvc-moc/QMAKE_MOC\t\t= moc/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf sed --posix 's/QMAKE_MOC\t\t= $HOST-moc/QMAKE_MOC\t\t= moc/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
sed --posix 's/QMAKE_RCC\t\t= i586-mingw32msvc-rcc/QMAKE_RCC\t\t= rcc/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf sed --posix 's/QMAKE_RCC\t\t= $HOST-rcc/QMAKE_RCC\t\t= rcc/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
sed --posix 's/QMAKE_UIC\t\t= i586-mingw32msvc-uic/QMAKE_UIC\t\t= uic/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf sed --posix 's/QMAKE_UIC\t\t= $HOST-uic/QMAKE_UIC\t\t= uic/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf
# ar adds timestamps to every object file included in the static library # ar adds timestamps to every object file included in the static library
# providing -D as ar argument is supposed to solve it, but doesn't work as qmake strips off the arguments and adds -M to pass a script... # providing -D as ar argument is supposed to solve it, but doesn't work as qmake strips off the arguments and adds -M to pass a script...
# which somehow cannot be combined with other flags. # which somehow cannot be combined with other flags.
# use faketime only for ar, as it confuses make/qmake into hanging sometimes # use faketime only for ar, as it confuses make/qmake into hanging sometimes
sed --posix "s|QMAKE_LIB\t\t= i586-mingw32msvc-ar -ru|QMAKE_LIB\t\t= $HOME/ar -Dr|" -i mkspecs/unsupported/win32-g++-cross/qmake.conf sed --posix "s|QMAKE_LIB\t\t= $HOST-ar -ru|QMAKE_LIB\t\t= $HOME/ar -Dr|" -i mkspecs/unsupported/win32-g++-cross/qmake.conf
echo '#!/bin/bash' > $HOME/ar echo '#!/bin/bash' > $HOME/ar
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/ar echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/ar
echo 'i586-mingw32msvc-ar "$@"' >> $HOME/ar echo '$HOST-ar "$@"' >> $HOME/ar
chmod +x $HOME/ar chmod +x $HOME/ar
#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
@ -56,4 +60,4 @@ script: |
# as zip stores file timestamps, use faketime to intercept stat calls to set dates for all files to reference date # as zip stores file timestamps, use faketime to intercept stat calls to set dates for all files to reference date
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
zip -r $OUTDIR/qt-win32-4.8.3-gitian-r3.zip * zip -r $OUTDIR/qt-win32-4.8.3-gitian-r4.zip *

Loading…
Cancel
Save