Pages:
Author

Topic: Building headless Bitcoin and Bitcoin-qt on Windows - page 55. (Read 419390 times)

hero member
Activity: 772
Merit: 500
So that makes 4 of us!  Grin (nitro,chad,you and me)

If I understand you correctly, I download the small (166K) file mingw-builds-install.exe and somehow apply to the mingw environment I already have?

I'm downloading that monster ~600MB
qt-windows-opensource-5.1.0-mingw48_opengl-x86-offline.exe from somewhere off of your link
https://qt-project.org/downloads

But I won't "upgrade" until I've asked a few more questions, especially about mingW, or I'm forced to, or I'm desparate or bored Smiley

Ron

I need to clarify a little, I'm sure you can use the Qt 5.1 bundle, which contains a MinGW 4.8 ready to use, but I chose mingw-builds-install.exe and downloaded 4.8.1-x32-posix-dwarf-2 and installed to D:\MinGW and I am using this one (You need to add this to your PATH environment variable: D:\MinGW\mingw32\bin).

I built ICU, OpenSSL as prequsites for Qt 5.1, then built Qt Creator and then the whole Bitcoin-stuff.

Dia
hero member
Activity: 924
Merit: 1005
Product Marketing & Promotion / Software Developer
How about a guide for how to clone Bitcoin? There is one for scrypt and it is very detailed but not much for Bitcoin. That is why we are seeing so many Scrypts.

I am working on a SHA-256 development project but being on Windows is a pain in the F-ing ass and Linux GPU driver suck.

Can we brainstorm and work together?

I can compile Bitcoin not problem but I cannot make any changes to it, as the compile then fails. I will try again tomorrow I think.
sr. member
Activity: 260
Merit: 251
 Grin
I only use the MSYS environment from http://sourceforge.net/projects/mingw/ and use a MinGW compiler version from http://sourceforge.net/projects/mingwbuilds/, namely a similar one that is mentioned on the Qt 5.1 download page (https://qt-project.org/downloads - The MinGW binary package includes a 32 bit MinGW-builds (gcc 4.8.0, dwarf exception handing, posix threading) toolchain.).

I'm a pure Windows-guy btw. ^^.

Edit: You know, to upgrade the MinGW version shipping with the MSYS environment (if you installed it's compiler suite) you need to do a "mingw-get update" followed by a "mingw-get upgrade" in the MinGW Shell.

Dia

So that makes 4 of us!  Grin (nitro,chad,you and me)

If I understand you correctly, I download the small (166K) file mingw-builds-install.exe and somehow apply to the mingw environment I already have?

I'm downloading that monster ~600MB
qt-windows-opensource-5.1.0-mingw48_opengl-x86-offline.exe from somewhere off of your link
https://qt-project.org/downloads

But I won't "upgrade" until I've asked a few more questions, especially about mingW, or I'm forced to, or I'm desperate or bored Smiley

Ron
hero member
Activity: 772
Merit: 500
I only use the MSYS environment from http://sourceforge.net/projects/mingw/ and use a MinGW compiler version from http://sourceforge.net/projects/mingwbuilds/, namely a similar one that is mentioned on the Qt 5.1 download page (https://qt-project.org/downloads - The MinGW binary package includes a 32 bit MinGW-builds (gcc 4.8.0, dwarf exception handing, posix threading) toolchain.).

I'm a pure Windows-guy btw. ^^.

Edit: You know, to upgrade the MinGW version shipping with the MSYS environment (if you installed it's compiler suite) you need to do a "mingw-get update" followed by a "mingw-get upgrade" in the MinGW Shell.

Dia
sr. member
Activity: 260
Merit: 251
Just a small comment or question, I always used MinGW 4.7.2 (way before you've written this guide) and have now switched to 4.8.1 even and everything is still working fine. So why do you suggest MinGW 4.6? Also I'm using Qt 5.1 currently, which needs MinGW 4.8.1 to successfully compile Qt.

For building LevelDB I use this syntax in MinGW Shell:
cd /c/Users/Diapolo/bitcoin.Qt/src/leveldb
TARGET_OS=NATIVE_WINDOWS make libleveldb.a libmemenv.a

to clean old files before re-building:
TARGET_OS=NATIVE_WINDOWS make clean

Dia

It seems when us "Window-ers" go sourceforging for a mingw, all I see is
Download mingw-get-inst-20120426.exe (662.7 kB) at
http://sourceforge.net/projects/mingw/files/latest/download?source=files
And that "latest" one that I know about, is 4.6.2? So that is what I use on Windows. Perhaps you are Linux/Unix-ing a Windows version of bitcoind & bitcoin-qt?

Also, as I said, since I don't frequent
http://download.qt-project.org/official_releases/qt/5.1/5.1.0/
I didn't see the July 3rd release of
http://download.qt-project.org/official_releases/qt/5.1/5.1.0/qt-windows-opensource-5.1.0-mingw48_opengl-x86-offline.exe

Back in April of this year, the latest I found was
http://download.qt-project.org/official_releases/qt/4.8/4.8.4/qt-win-opensource-4.8.4-mingw.exe
at
http://download.qt-project.org/official_releases/qt/4.8/4.8.4/

and it worked for me, so I stayed with it so far.
I did download Qt creator 5.0.2, at that time, which seemed to be the latest for Windows,
actually it "abouts" as Qt Creator 2.7.0 based on Qt 5.0.2 (32 bit), built Apr 9 2013...

Interestingly, it opens up bitcoin-qt.pro and brings all the files up, etc. But it (Creator) seems to a be real performance dog, just like a Java Eclipse IDE. But I'm spoled by MS IDEs, free and otherwise! They can find all references, global search and replace etc. They just can't compile the code, yet! But that is a story for another day.

Ron

legendary
Activity: 1708
Merit: 1020
Just a small comment or question, I always used MinGW 4.7.2 (way before you've written this guide) and have now switched to 4.8.1 even and everything is still working fine. So why do you suggest MinGW 4.6? Also I'm using Qt 5.1 currently, which needs MinGW 4.8.1 to successfully compile Qt.
Hmm... I had a lot of odd trouble with MinGW 4.7 and 4.8, too. I wonder what's going wrong there.

I think for the official build they use MinGW 4.2? or 4.4 in the meantime? Anyway it was quite far behind.
hero member
Activity: 924
Merit: 1005
Product Marketing & Promotion / Software Developer
It seems that if i make and save a change like that and then compile the qt it throws up and error and even changing it back to what it was and trying a compile again throws up the same error and will not compile.

Only starting from a backed up Bitcoin master folder before the change actually compiles.

I can change things like the name and such in the .pro and it compiles but it does not like me editing that particular one, unless I am missing something?
hero member
Activity: 924
Merit: 1005
Product Marketing & Promotion / Software Developer
Well I got it working, just slipped the mingw dll in there. The client does show up with writing on it saying this is a test build, is that a built in safety measure? I am guessing so.

Take a look in clientversion.h @ #define CLIENT_VERSION_IS_RELEASE  false

Dia

I have already tried this and it would not compile, just threw up errors.
full member
Activity: 131
Merit: 108
Of course  Wink
hero member
Activity: 772
Merit: 500
Just a small comment or question, I always used MinGW 4.7.2 (way before you've written this guide) and have now switched to 4.8.1 even and everything is still working fine. So why do you suggest MinGW 4.6? Also I'm using Qt 5.1 currently, which needs MinGW 4.8.1 to successfully compile Qt.

I tried upgrading gcc/g++ using mingw-get, but when using versions other than 4.6.2 the compiled executable crashes immediately upon startup. Need to investigate more on this.

I'm sure you know you need to re-build ALL dependency libs when upgrading your compiler?

Dia
full member
Activity: 131
Merit: 108
Just a small comment or question, I always used MinGW 4.7.2 (way before you've written this guide) and have now switched to 4.8.1 even and everything is still working fine. So why do you suggest MinGW 4.6? Also I'm using Qt 5.1 currently, which needs MinGW 4.8.1 to successfully compile Qt.

I tried upgrading gcc/g++ using mingw-get, but when using versions other than 4.6.2 the compiled executable crashes immediately upon startup. Need to investigate more on this.

For building LevelDB I use this syntax in MinGW Shell:
cd /c/Users/Diapolo/bitcoin.Qt/src/leveldb
TARGET_OS=NATIVE_WINDOWS make libleveldb.a libmemenv.a

to clean old files before re-building:
TARGET_OS=NATIVE_WINDOWS make clean

Dia

Yes, it makes more sense, for some reason I used the TARGET_OS from bitcoin-qt.pro instead of the one in makefike.migw.
However, you can see the output binaries are the same (except for some timestamps), so I don't think using OS_WINDOWS_CROSSCOMPILE causes any problems  Wink
hero member
Activity: 772
Merit: 500
Well I got it working, just slipped the mingw dll in there. The client does show up with writing on it saying this is a test build, is that a built in safety measure? I am guessing so.

Take a look in clientversion.h @ #define CLIENT_VERSION_IS_RELEASE  false

Dia
hero member
Activity: 924
Merit: 1005
Product Marketing & Promotion / Software Developer
Well I got it working, just slipped the mingw dll in there. The client does show up with writing on it saying this is a test build, is that a built in safety measure? I am guessing so.
hero member
Activity: 772
Merit: 500
Just a small comment or question, I always used MinGW 4.7.2 (way before you've written this guide) and have now switched to 4.8.1 even and everything is still working fine. So why do you suggest MinGW 4.6? Also I'm using Qt 5.1 currently, which needs MinGW 4.8.1 to successfully compile Qt.

For building LevelDB I use this syntax in MinGW Shell:
cd /c/Users/Diapolo/bitcoin.Qt/src/leveldb
TARGET_OS=NATIVE_WINDOWS make libleveldb.a libmemenv.a

to clean old files before re-building:
TARGET_OS=NATIVE_WINDOWS make clean

Dia
hero member
Activity: 924
Merit: 1005
Product Marketing & Promotion / Software Developer
Ok sorted that and now just this one error right at the end:

c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../mingw32/bin/ld.exe: cannot find -lminiupnpc
collect2: ld returned 1 exit status
mingw32-make: *** [release\Bitcoin-QT.exe] Error 1

Forget this last, I managed to do it.

At last lol.
hero member
Activity: 924
Merit: 1005
Product Marketing & Promotion / Software Developer
Ok I did step 4.2 again and now I get a repeating loop looking like it is not happy with boost or something:

..\..\deps\boost_1_54_0/boost/thread/win32/shared_mutex.hpp:52:99: warning:
ferencing type-punned pointer will break strict-aliasing rules [-Wstrict-al

Any ideas?

Thanks for the help so far.
full member
Activity: 131
Merit: 108
New one now and this is compiling with QT 4.8.5 the very final step and I get this error:

C:\bitcoin\bitcoin-master>mingw32-make -f Makefile.Release
cd C:/bitcoin/bitcoin-master/src/leveldb && CC=gcc CXX=g++ TARGET_OS=OS_WINDOWS_
CROSSCOMPILE mingw32-make OPT="-pipe -D_FORTIFY_SOURCE=2 -O2" libleveldb.a libme
menv.a && ranlib C:/bitcoin/bitcoin-master/src/leveldb/libleveldb.a && ranlib C:
/bitcoin/bitcoin-master/src/leveldb/libmemenv.a
CC: error: =gcc: No such file or directory
CC: error: CXX=g++: No such file or directory
CC: error: TARGET_OS=OS_WINDOWS_CROSSCOMPILE: No such file or directory
CC: error: mingw32-make: No such file or directory
CC: error: OPT=-pipe -D_FORTIFY_SOURCE=2 -O2: No such file or directory
mingw32-make: *** [c:/bitcoin/bitcoin-master/src/leveldb/libleveldb.a] Error 1

I have search all over the place and tried some things that I can remember from back in the day but nothing solves this problem.

Can anyone help at all?

It fails trying to build leveldb. Build leveldb as per step 3.1 and make sure you strip genleveldb.commands for win32 from bitcoin-qt.pro (see step 4.2).
hero member
Activity: 924
Merit: 1005
Product Marketing & Promotion / Software Developer
Thanks again.

That do I do about the other errors. The OS error and the others?
sr. member
Activity: 260
Merit: 251
I remember having trouble finding a Qt 4.8.5, and so I have been using Qt 4.8.4 successfully. Again, did you add MinGW to your path, i.e. see step 1.3? SInce it can't find g++

Ron
hero member
Activity: 924
Merit: 1005
Product Marketing & Promotion / Software Developer
New one now and this is compiling with QT 4.8.5 the very final step and I get this error:

C:\bitcoin\bitcoin-master>mingw32-make -f Makefile.Release
cd C:/bitcoin/bitcoin-master/src/leveldb && CC=gcc CXX=g++ TARGET_OS=OS_WINDOWS_
CROSSCOMPILE mingw32-make OPT="-pipe -D_FORTIFY_SOURCE=2 -O2" libleveldb.a libme
menv.a && ranlib C:/bitcoin/bitcoin-master/src/leveldb/libleveldb.a && ranlib C:
/bitcoin/bitcoin-master/src/leveldb/libmemenv.a
CC: error: =gcc: No such file or directory
CC: error: CXX=g++: No such file or directory
CC: error: TARGET_OS=OS_WINDOWS_CROSSCOMPILE: No such file or directory
CC: error: mingw32-make: No such file or directory
CC: error: OPT=-pipe -D_FORTIFY_SOURCE=2 -O2: No such file or directory
mingw32-make: *** [c:/bitcoin/bitcoin-master/src/leveldb/libleveldb.a] Error 1

I have search all over the place and tried some things that I can remember from back in the day but nothing solves this problem.

Can anyone help at all?
Pages:
Jump to: