From 3b4f8ad71dfdd98d7a8066af616f7973125ad6e2 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 28 Oct 2012 17:38:22 -0400 Subject: [PATCH 1/4] Use && instead of ; in leveldb calls to makefile. --- bitcoin-qt.pro | 4 ++-- src/makefile.linux-mingw | 2 +- src/makefile.mingw | 2 +- src/makefile.osx | 2 +- src/makefile.unix | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro index cd9755e8f..9f24b5518 100644 --- a/bitcoin-qt.pro +++ b/bitcoin-qt.pro @@ -95,13 +95,13 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) { INCLUDEPATH += src/leveldb/include src/leveldb/helpers LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a !windows { - genleveldb.commands = cd $$PWD/src/leveldb ; $(MAKE) libleveldb.a libmemenv.a + genleveldb.commands = cd $$PWD/src/leveldb && $(MAKE) libleveldb.a libmemenv.a } else { # make an educated guess about what the ranlib command is called isEmpty(QMAKE_RANLIB) { QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib) } - genleveldb.commands = cd $$PWD/src/leveldb ; CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE CXXFLAGS="-I$$BOOST_INCLUDE_PATH" LDFLAGS="-L$$BOOST_LIB_PATH" $(MAKE) libleveldb.a libmemenv.a ; $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a ; $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a + genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE CXXFLAGS="-I$$BOOST_INCLUDE_PATH" LDFLAGS="-L$$BOOST_LIB_PATH" $(MAKE) libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a } genleveldb.target = $$PWD/src/leveldb/libleveldb.a genleveldb.depends = FORCE diff --git a/src/makefile.linux-mingw b/src/makefile.linux-mingw index f4adbb2bf..ef566b9cf 100644 --- a/src/makefile.linux-mingw +++ b/src/makefile.linux-mingw @@ -92,7 +92,7 @@ LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a DEFS += -I"$(CURDIR)/leveldb/include" DEFS += -I"$(CURDIR)/leveldb/helpers" leveldb/libleveldb.a: - @echo "Building LevelDB ..."; cd leveldb; TARGET_OS=OS_WINDOWS_CROSSCOMPILE CXXFLAGS="-I$(INCLUDEPATHS)" LDFLAGS="-L$(LIBPATHS)" make libleveldb.a libmemenv.a; cd .. + @echo "Building LevelDB ..." && cd leveldb && TARGET_OS=OS_WINDOWS_CROSSCOMPILE CXXFLAGS="-I$(INCLUDEPATHS)" LDFLAGS="-L$(LIBPATHS)" make libleveldb.a libmemenv.a && cd .. obj/leveldb.o: leveldb/libleveldb.a obj/build.h: FORCE diff --git a/src/makefile.mingw b/src/makefile.mingw index 945ec7709..a6008fa63 100644 --- a/src/makefile.mingw +++ b/src/makefile.mingw @@ -95,7 +95,7 @@ LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a DEFS += $(addprefix -I,$(CURDIR)/leveldb/include) DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers) leveldb/libleveldb.a: - cd leveldb; make libleveldb.a libmemenv.a; cd .. + cd leveldb && make libleveldb.a libmemenv.a && cd .. obj/leveldb.o: leveldb/libleveldb.lib obj/%.o: %.cpp $(HEADERS) diff --git a/src/makefile.osx b/src/makefile.osx index f3e17d0d1..9629545c0 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -128,7 +128,7 @@ LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a DEFS += $(addprefix -I,$(CURDIR)/leveldb/include) DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers) leveldb/libleveldb.a: - @echo "Building LevelDB ..."; cd leveldb; make libleveldb.a libmemenv.a; cd .. + @echo "Building LevelDB ..." && cd leveldb && make libleveldb.a libmemenv.a && cd .. obj/leveldb.o: leveldb/libleveldb.a # auto-generated dependencies: diff --git a/src/makefile.unix b/src/makefile.unix index df05f7990..653f512e8 100644 --- a/src/makefile.unix +++ b/src/makefile.unix @@ -144,7 +144,7 @@ LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a DEFS += $(addprefix -I,$(CURDIR)/leveldb/include) DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers) leveldb/libleveldb.a: - @echo "Building LevelDB ..."; cd leveldb; make libleveldb.a libmemenv.a; cd ..; + @echo "Building LevelDB ..." && cd leveldb && make libleveldb.a libmemenv.a && cd .. obj/leveldb.o: leveldb/libleveldb.a # auto-generated dependencies: From f53b125507ed85a7b7974525bbefc8f7db88c7aa Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 28 Oct 2012 17:46:34 -0400 Subject: [PATCH 2/4] Fix linux-mingw makefile's leveldb build by setting CXX. --- src/makefile.linux-mingw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/makefile.linux-mingw b/src/makefile.linux-mingw index ef566b9cf..f7483933c 100644 --- a/src/makefile.linux-mingw +++ b/src/makefile.linux-mingw @@ -92,7 +92,7 @@ LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a DEFS += -I"$(CURDIR)/leveldb/include" DEFS += -I"$(CURDIR)/leveldb/helpers" leveldb/libleveldb.a: - @echo "Building LevelDB ..." && cd leveldb && TARGET_OS=OS_WINDOWS_CROSSCOMPILE CXXFLAGS="-I$(INCLUDEPATHS)" LDFLAGS="-L$(LIBPATHS)" make libleveldb.a libmemenv.a && cd .. + @echo "Building LevelDB ..." && cd leveldb && CXX=i586-mingw32msvc-g++ TARGET_OS=OS_WINDOWS_CROSSCOMPILE CXXFLAGS="-I$(INCLUDEPATHS)" LDFLAGS="-L$(LIBPATHS)" make libleveldb.a libmemenv.a && cd .. obj/leveldb.o: leveldb/libleveldb.a obj/build.h: FORCE From 325a064c68cfd340903573987da2809b450d4983 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 28 Oct 2012 21:40:49 -0400 Subject: [PATCH 3/4] Upgrade to Qt 4.8.3 (because 4.8.2 was removed from qt repos?) --- contrib/gitian-descriptors/README | 2 +- contrib/gitian-descriptors/gitian-win32.yml | 6 +++--- contrib/gitian-descriptors/qt-win32.yml | 8 ++++---- doc/release-process.txt | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/contrib/gitian-descriptors/README b/contrib/gitian-descriptors/README index 1d3910b99..46c7668ab 100644 --- a/contrib/gitian-descriptors/README +++ b/contrib/gitian-descriptors/README @@ -31,7 +31,7 @@ Once you've got the right hardware and software: wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' wget 'https://downloads.sourceforge.net/project/libpng/zlib/1.2.6/zlib-1.2.6.tar.gz' wget 'https://downloads.sourceforge.net/project/libpng/libpng15/older-releases/1.5.9/libpng-1.5.9.tar.gz' - wget 'http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-4.8.2.tar.gz' + wget 'http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-4.8.3.tar.gz' cd ../.. cd gitian-builder diff --git a/contrib/gitian-descriptors/gitian-win32.yml b/contrib/gitian-descriptors/gitian-win32.yml index c5979614d..5271601ed 100644 --- a/contrib/gitian-descriptors/gitian-win32.yml +++ b/contrib/gitian-descriptors/gitian-win32.yml @@ -12,17 +12,17 @@ packages: - "faketime" reference_datetime: "2011-01-30 00:00:00" remotes: -- "url": "https://github.com/bitcoin/bitcoin.git" +- "url": "https://github.com/TheBlueMatt/bitcoin.git" "dir": "bitcoin" files: -- "qt-win32-4.8.2-gitian-r1.zip" +- "qt-win32-4.8.3-gitian-r1.zip" - "boost-win32-1.50.0-gitian2.zip" - "bitcoin-deps-0.0.5.zip" script: | # mkdir $HOME/qt cd $HOME/qt - unzip ../build/qt-win32-4.8.2-gitian-r1.zip + unzip ../build/qt-win32-4.8.3-gitian-r1.zip cd $HOME/build/ export PATH=$PATH:$HOME/qt/bin/ # diff --git a/contrib/gitian-descriptors/qt-win32.yml b/contrib/gitian-descriptors/qt-win32.yml index 87887dec8..0b711790e 100644 --- a/contrib/gitian-descriptors/qt-win32.yml +++ b/contrib/gitian-descriptors/qt-win32.yml @@ -11,15 +11,15 @@ packages: reference_datetime: "2011-01-30 00:00:00" remotes: [] files: -- "qt-everywhere-opensource-src-4.8.2.tar.gz" +- "qt-everywhere-opensource-src-4.8.3.tar.gz" script: | INSTDIR="$HOME/qt/" mkdir $INSTDIR SRCDIR="$INSTDIR/src/" mkdir $SRCDIR # - tar xzf qt-everywhere-opensource-src-4.8.2.tar.gz - cd qt-everywhere-opensource-src-4.8.2 + tar xzf qt-everywhere-opensource-src-4.8.3.tar.gz + cd qt-everywhere-opensource-src-4.8.3 sed 's/$TODAY/2011-01-30/' -i configure sed 's/i686-pc-mingw32-/i586-mingw32msvc-/' -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 @@ -51,4 +51,4 @@ script: | # 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 - zip -r $OUTDIR/qt-win32-4.8.2-gitian-r1.zip * + zip -r $OUTDIR/qt-win32-4.8.3-gitian-r1.zip * diff --git a/doc/release-process.txt b/doc/release-process.txt index 2a3eb17c2..02f0c47f4 100644 --- a/doc/release-process.txt +++ b/doc/release-process.txt @@ -30,12 +30,12 @@ wget 'ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.5.9.tar.gz' wget 'http://fukuchi.org/works/qrencode/qrencode-3.2.0.tar.bz2' wget 'http://downloads.sourceforge.net/project/boost/boost/1.50.0/boost_1_50_0.tar.bz2' - wget 'http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-4.8.2.tar.gz' + wget 'http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-4.8.3.tar.gz' cd .. ./bin/gbuild ../bitcoin/contrib/gitian-descriptors/boost-win32.yml mv build/out/boost-win32-1.50.0-gitian2.zip inputs/ ./bin/gbuild ../bitcoin/contrib/gitian-descriptors/qt-win32.yml - mv build/out/qt-win32-4.8.2-gitian-r1.zip inputs/ + mv build/out/qt-win32-4.8.3-gitian-r1.zip inputs/ ./bin/gbuild ../bitcoin/contrib/gitian-descriptors/deps-win32.yml mv build/out/bitcoin-deps-0.0.5.zip inputs/ From 38fe2e6a68e94e262ab8a0d0370f3a6f042ee3db Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 28 Oct 2012 22:33:35 -0400 Subject: [PATCH 4/4] Add missing calls to ranlib in Windows makefiles --- src/makefile.linux-mingw | 2 +- src/makefile.mingw | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/makefile.linux-mingw b/src/makefile.linux-mingw index f7483933c..64268dd0a 100644 --- a/src/makefile.linux-mingw +++ b/src/makefile.linux-mingw @@ -92,7 +92,7 @@ LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a DEFS += -I"$(CURDIR)/leveldb/include" DEFS += -I"$(CURDIR)/leveldb/helpers" leveldb/libleveldb.a: - @echo "Building LevelDB ..." && cd leveldb && CXX=i586-mingw32msvc-g++ TARGET_OS=OS_WINDOWS_CROSSCOMPILE CXXFLAGS="-I$(INCLUDEPATHS)" LDFLAGS="-L$(LIBPATHS)" make libleveldb.a libmemenv.a && cd .. + @echo "Building LevelDB ..." && cd leveldb && CC=i586-mingw32msvc-gcc CXX=i586-mingw32msvc-g++ TARGET_OS=OS_WINDOWS_CROSSCOMPILE CXXFLAGS="-I$(INCLUDEPATHS)" LDFLAGS="-L$(LIBPATHS)" make libleveldb.a libmemenv.a && i586-mingw32msvc-ranlib libleveldb.a && i586-mingw32msvc-ranlib libmemenv.a && cd .. obj/leveldb.o: leveldb/libleveldb.a obj/build.h: FORCE diff --git a/src/makefile.mingw b/src/makefile.mingw index a6008fa63..85d63e9ce 100644 --- a/src/makefile.mingw +++ b/src/makefile.mingw @@ -94,6 +94,7 @@ test check: test_bitcoin.exe FORCE LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a DEFS += $(addprefix -I,$(CURDIR)/leveldb/include) DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers) +# TODO: If this fails, try adding a ranlib libleveldb.a && ranlib libmemenv.a leveldb/libleveldb.a: cd leveldb && make libleveldb.a libmemenv.a && cd .. obj/leveldb.o: leveldb/libleveldb.lib