Title: Problems compiling Bitcoin 0.4.0 in Windows 7 x64 (MinGW Environment) Post by: ChaosFox on September 26, 2011, 12:35:30 PM Greetings once again. :)
Yesterday I decided the pick the (somewhat daunting) task to compile Bitcoin from source. So, I grabbed my tools, downloaded all the dependencies with the versions indicated in the build-msw.txt file (https://github.com/bitcoin/bitcoin/blob/master/doc/build-msw.txt), used this thread as a reference for the trickier stuff (https://bitcointalk.org/index.php?topic=5851.0;all) (Only changing the versions for the dependencies where it was relevant), compiled them (Screw you, Boost) and then... nada. Here's the output: Code: C:\bitcoin-bitcoin-f8937b2\src>mingw32-make bitcoin.exe bitcoind.exe -f makefile Also, here's my MinGW version info, provided by this batch file (http://forums.codeblocks.org/index.php/topic,9054.msg65050.html), in case it becomes relevant. Code: MINGWBASEDIR=C:\MinGW This is not the first time I've tried compiling something like this, but certainly it is the first I've tried to do so in Windows, and the first time I've tried with a project this big, so I know I was asking for trouble. ;D From the output, the first I thought about (Given the declaration conflict) was that the headers were being added in the wrong order, but I tinkered a bit with that, no dice. Any more ideas? :-[ Thanks in advance! Title: Re: Problems compiling Bitcoin 0.4.0 in Windows 7 x64 (MinGW Environment) Post by: piotr_n on October 22, 2011, 06:33:07 PM I'm having exactly the same problem.
Any ideas how to deal with it? Title: Re: Problems compiling Bitcoin 0.4.0 in Windows 7 x64 (MinGW Environment) Post by: JoelKatz on October 22, 2011, 06:43:33 PM I don't believe you can compile the Windows GUI version under MinGW. You should be able to compile the daemon version -- just don't tell it that it's compiling under Windows -- use the standard UNIX makefile. Some tweaks might be needed.
Title: Re: Problems compiling Bitcoin 0.4.0 in Windows 7 x64 (MinGW Environment) Post by: piotr_n on October 22, 2011, 07:08:26 PM I can compile 0.3.x in my MinGW - both GUI and the daemon. No problems with that.
And for 0.4.0 this error happens no matter if I try to compile GUI or the daemon - it actually crashes while compiling the first source file. Code: $ make bitcoind.exe Title: Re: Problems compiling Bitcoin 0.4.0 in Windows 7 x64 (MinGW Environment) Post by: JoelKatz on October 22, 2011, 08:37:46 PM Well, you can use quick hacks to solve these specific issues. Remove the definition of 'pthread_t' from the header file and remove the test of the return value of 'CreateThread'.
Title: Re: Problems compiling Bitcoin 0.4.0 in Windows 7 x64 (MinGW Environment) Post by: piotr_n on October 22, 2011, 08:59:04 PM Thanks!
Your advise made me thinking... and I figured how to fix it. :) The problem is in the db.h from the berkeley database - it includes ptherad.h, which screws things up. All you have to do is just append -D__NO_SYSTEM_INCLUDES at the DEFS= in makefile.mingw Now it compiles Title: Re: Problems compiling Bitcoin 0.4.0 in Windows 7 x64 (MinGW Environment) Post by: ChaosFox on October 24, 2011, 12:13:13 AM Thanks! Your advise made me thinking... and I figured how to fix it. :) The problem is in the db.h from the berkeley database - it includes ptherad.h, which screws things up. All you have to do is just append -D__NO_SYSTEM_INCLUDES at the DEFS= in makefile.mingw Now it compiles Thanks a lot! I'll try this as soon as I get to my home PC. ;D Title: Re: Problems compiling Bitcoin 0.4.0 in Windows 7 x64 (MinGW Environment) Post by: shakezula on May 17, 2013, 04:35:58 PM Thanks! Your advise made me thinking... and I figured how to fix it. :) The problem is in the db.h from the berkeley database - it includes ptherad.h, which screws things up. All you have to do is just append -D__NO_SYSTEM_INCLUDES at the DEFS= in makefile.mingw Now it compiles Thanks a lot! I'll try this as soon as I get to my home PC. ;D I know this is waaay old news, but this fixed it for me too, thanks! |