Bitcoin Forum
December 09, 2016, 07:31:23 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 3 »  All
  Print  
Author Topic: [COLLECTED] 100 BTC Bounty For Windows Build Instructions  (Read 16218 times)
NghtRppr
Sr. Member
****
Offline Offline

Activity: 476


View Profile
April 15, 2011, 02:22:12 AM
 #1

I'm running Windows XP on VMWare with a clean install. I need a complete step-by-step guide for what I need to download, what commands I need to run, etc. I've tried it myself and read all the directions but I keep getting errors and a Google search doesn't tell me how to fix it. I'll pay 100 BTC to whoever enables me to build a working bitcoind binary from source.
1481311883
Hero Member
*
Offline Offline

Posts: 1481311883

View Profile Personal Message (Offline)

Ignore
1481311883
Reply with quote  #2

1481311883
Report to moderator
1481311883
Hero Member
*
Offline Offline

Posts: 1481311883

View Profile Personal Message (Offline)

Ignore
1481311883
Reply with quote  #2

1481311883
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
dishwara
Legendary
*
Offline Offline

Activity: 1386

Truth may get delay, but NEVER fails


View Profile
April 15, 2011, 02:33:18 AM
 #2

http://bitcointalk.org/index.php?topic=4750.0
http://www.megaupload.com/?d=UMGIGSYM

You already checked this post, still problem to build?
gjs278
Jr. Member
*
Offline Offline

Activity: 33


View Profile
April 15, 2011, 03:23:02 AM
 #3

you can also build the binary using mingw if you're more familar with linux
Matt Corallo
Hero Member
*****
expert
Offline Offline

Activity: 751


View Profile
April 15, 2011, 06:00:42 PM
 #4

Kind of sad that 100 BTC has to be offered for this, someone really needs to rewrite the build process.  Oh well, here goes:

Install:

Download:

Note that the reason for using the binary miniupnpc release is that I was unable to get it to build on my system.

Add C:\MinGW\bin to your PATH environment variable (Google is your friend as it depends on your Windows Version).
In the DOS Shell:
wxWidgets:
Code:
cd \wxWidgets-2.9.1-mgw\build\msw
mingw32-make -f makefile.gcc

Boost:
Code:
cd \boost-1.43.0-mgw
\bjam\bjam.exe toolset=gcc --build-type=complete stage

In the msys Shell (MinGW shell in your start folder or C:\MinGW\msys\1.0\msys.bat):
OpenSSL:
Code:
cd /c/openssl-1.0.0c-mgw
./config
make
perl util/mkdef.pl 32 libeay enable-static-engine > libeay32.def
dllwrap --dllname libeay32.dll --output-lib libeay32.a --def libeay32.def libcrypto.a -lws2_32 -lgdi32
Copy the libeay32.dll file to the folder where you are building/running bitcoin.

Berkeley DB:
Code:
cd /c/db-4.7.25.NC-mgw/build_unix
sh ../dist/configure --enable-mingw --enable-cxx
make

Bitcoin
If you wish to use git to pull keep a local repository, you'll have to download msgit from http://code.google.com/p/msysgit/downloads/detail?name=Git-1.7.4-preview20110204.exe&can=2&q=.
Otherwise, you can download the latest zip of bitcoin from https://github.com/bitcoin/bitcoin/zipball/master
In the msys shell, cd to the unzipped location and
Code:
make -f makefile.mingw
Run with ./bitcoin.exe (make sure you have the libeay32.dll in bitcoin folder)

Bitcoin Ubuntu PPA maintainer - donate to me personally: 1JBMattRztKDF2KRS3vhjJXA7h47NEsn2c
http://bitcoinrelaynetwork.org maintainer
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
NghtRppr
Sr. Member
****
Offline Offline

Activity: 476


View Profile
April 16, 2011, 01:46:47 AM
 #5

http://blockexplorer.com/address/1EDMf3UATY1HMwfAHAvgRGCUcpFxtSVfha

Thanks!
dmp1ce
Member
**
Offline Offline

Activity: 69


View Profile WWW
April 24, 2011, 03:49:36 PM
 #6

@BlueMatt Thank you very much for the instructions, I'm following them to build Namecoin.  Just a note, I'm building on Windows 7 64bit and I had to add the "address-module=32" parameters to the boost build in order for it to compile without error.

Code:
\bjam\bjam.exe toolset=gcc address-model=32 --build-type=complete stage

BTCmon - Support great bitcoin apps
Gallop
Newbie
*
Offline Offline

Activity: 3



View Profile
April 27, 2011, 01:43:58 AM
 #7

Nice work.

So I followed the steps on an XP machine and during the final compilation of Bitcoin, I get this error message:

Code:
g++ -mthreads -O2 -w -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH -DSTATICLIB
-DUSE_UPNP=0 -I"C:\boost-1.43.0-mgw" -I"C:\db-4.7.25.NC-mgw\build_unix" -I"C:\openssl-1.0.0c-mgw\include" -I"C:\wxWidget
s-2.9.1-mgw\lib\gcc_lib\mswud" -I"C:\wxWidgets-2.9.1-mgw\include" -I"C:\upnpc-exe-win32-20110215" -mwindows -Wl,--subsys
tem,windows -o bitcoin.exe -L"C:\boost-1.43.0-mgw\stage\lib" -L"C:\db-4.7.25.NC-mgw\build_unix" -L"C:\openssl-1.0.0c-mgw
" -L"C:\wxWidgets-2.9.1-mgw\lib\gcc_lib" -L"C:\upnpc-exe-win32-20110215" obj/util.o obj/script.o obj/db.o obj/net.o obj/
irc.o obj/main.o obj/rpc.o obj/init.o cryptopp/obj/sha.o cryptopp/obj/cpu.o obj/ui.o obj/uibase.o obj/ui_res.o -l wxmsw2
9ud_html -l wxmsw29ud_core -l wxmsw29ud_adv -l wxbase29ud -l wxtiffd -l wxjpegd -l wxpngd -l wxzlibd -l boost_system-mgw
45-mt-s-1_43 -l boost_filesystem-mgw45-mt-s-1_43 -l boost_program_options-mgw45-mt-s-1_43 -l boost_thread-mgw45-mt-s-1_4
3 -l db_cxx -l eay32 -l miniupnpc -l iphlpapi -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32
 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l shlwapi
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -ldb_cxx
collect2: ld returned 1 exit status
make: *** [bitcoin.exe] Error 1

Probably something fishy with Berkeley DB, but I'm not clear how to fix this. Thanks for any help.


Matt Corallo
Hero Member
*****
expert
Offline Offline

Activity: 751


View Profile
April 27, 2011, 09:08:25 AM
 #8

Code:
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -ldb_cxx
Don't know, never seen it.  Make sure you have a libdb_cxx.a in C:\db-4.7.25.NC-mgw\build_unix. 

Bitcoin Ubuntu PPA maintainer - donate to me personally: 1JBMattRztKDF2KRS3vhjJXA7h47NEsn2c
http://bitcoinrelaynetwork.org maintainer
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
Gallop
Newbie
*
Offline Offline

Activity: 3



View Profile
April 27, 2011, 10:16:12 PM
 #9

Don't know, never seen it.  Make sure you have a libdb_cxx.a in C:\db-4.7.25.NC-mgw\build_unix. 

There was no libdb_cxx.a indeed. I recompiled C:\db-4.7.25.NC-mgw\ and the file was there now. Not sure what happened. Anyway, the good news is that it compiled successfully! Thanks.

90MB .exe but it seems to work fine.
Matt Corallo
Hero Member
*****
expert
Offline Offline

Activity: 751


View Profile
April 27, 2011, 10:22:23 PM
 #10

90MB .exe but it seems to work fine.
You should strip bitcoin.exe.  That should help.

Bitcoin Ubuntu PPA maintainer - donate to me personally: 1JBMattRztKDF2KRS3vhjJXA7h47NEsn2c
http://bitcoinrelaynetwork.org maintainer
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
Gallop
Newbie
*
Offline Offline

Activity: 3



View Profile
April 27, 2011, 10:49:17 PM
 #11

You should strip bitcoin.exe.  That should help.

Gotcha. A more manageable 7.5MB now. Cheers!
lulzplzkthx
Sr. Member
****
Offline Offline

Activity: 322



View Profile WWW
May 01, 2011, 06:35:51 AM
 #12

Just to let you know, I had to modify makefile.mingw and change the following lines:

Code:
LIBS= \
 -l boost_system-mgw45-mt-s-1_43 \
 -l boost_filesystem-mgw45-mt-s-1_43 \
 -l boost_program_options-mgw45-mt-s-1_43 \
 -l boost_thread-mgw45-mt-s-1_43 \
 -l db_cxx \
 -l eay32

To:

Code:
LIBS= \
 -l boost_system-mgw44-mt-s-1_43 \
 -l boost_filesystem-mgw44-mt-s-1_43 \
 -l boost_program_options-mgw44-mt-s-1_43 \
 -l boost_thread-mgw44-mt-s-1_43 \
 -l db_cxx \
 -l eay32

Also, like Gallop I had to recompile Berkley DB.

Thank you for the wonderful guide, BlueMatt.

~lulzplzkthx

Alex Beckenham
Full Member
***
Offline Offline

Activity: 154


View Profile
May 27, 2011, 12:51:42 PM
 #13

I went through all the steps and finally when I did make -f makefile.mingw I got this:

Code:
In file included from util.cpp:5:0:
headers.h:62:29: fatal error: boost/foreach.hpp: No such file or directory
compilation terminated.
make: *** [obj/util.o] Error 1

I tried copying the boost folder to the bitcoin src directory but got the same error... I don't know where I need to move it to in order for it to be found.

unfinishe
Full Member
***
Offline Offline

Activity: 126



View Profile
May 27, 2011, 08:44:16 PM
 #14

I went through all the steps and finally when I did make -f makefile.mingw I got this:

Code:
In file included from util.cpp:5:0:
headers.h:62:29: fatal error: boost/foreach.hpp: No such file or directory
compilation terminated.
make: *** [obj/util.o] Error 1

I tried copying the boost folder to the bitcoin src directory but got the same error... I don't know where I need to move it to in order for it to be found.

The makefile is looking for the boost folder at C:\boost-1.43.0-mgw . It's possible that there is a typo or something.

Check out the results from my Bitcoin Survey Project!
https://bitcointalk.org/index.php?topic=88927.0
Alex Beckenham
Full Member
***
Offline Offline

Activity: 154


View Profile
May 27, 2011, 09:25:38 PM
 #15

I went through all the steps and finally when I did make -f makefile.mingw I got this:

Code:
In file included from util.cpp:5:0:
headers.h:62:29: fatal error: boost/foreach.hpp: No such file or directory
compilation terminated.
make: *** [obj/util.o] Error 1

I tried copying the boost folder to the bitcoin src directory but got the same error... I don't know where I need to move it to in order for it to be found.

The makefile is looking for the boost folder at C:\boost-1.43.0-mgw . It's possible that there is a typo or something.

Wow you're right thanks, I didn't notice that until you mentioned it. I just extracted and added -mgw to the dir name without realising it's called boost_1_43_0-mgw.

Alex Beckenham
Full Member
***
Offline Offline

Activity: 154


View Profile
May 27, 2011, 09:42:29 PM
 #16

Awesome, that worked thanks Cheesy

@Unfinishe: Just sent you a coin using my new binary, plus an extra 1 for matt Cheesy

unfinishe
Full Member
***
Offline Offline

Activity: 126



View Profile
May 28, 2011, 10:45:26 PM
 #17

Awesome, that worked thanks Cheesy

@Unfinishe: Just sent you a coin using my new binary, plus an extra 1 for matt Cheesy


Thank you so much!  Smiley

Check out the results from my Bitcoin Survey Project!
https://bitcointalk.org/index.php?topic=88927.0
Matt Corallo
Hero Member
*****
expert
Offline Offline

Activity: 751


View Profile
May 28, 2011, 11:09:14 PM
 #18

@Unfinishe: Just sent you a coin using my new binary, plus an extra 1 for matt Cheesy
Thank you good sir.

Bitcoin Ubuntu PPA maintainer - donate to me personally: 1JBMattRztKDF2KRS3vhjJXA7h47NEsn2c
http://bitcoinrelaynetwork.org maintainer
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
grue
Global Moderator
Legendary
*
Offline Offline

Activity: 1932



View Profile
June 23, 2011, 04:49:29 PM
 #19

great guide! thank you very much

It is pitch black. You are likely to be eaten by a grue.

Tired of annoying signature ads? Ad block for signatures
vector76
Member
**
Offline Offline

Activity: 70


View Profile
July 01, 2011, 11:36:53 PM
 #20

Great guide!  TY!

The makefile now appears to look for C:\openssl-1.0.0d-mgw instead of C:\openssl-1.0.0c-mgw and it was failing on that.  But just a minor speed bump.

Again, thanks!
Pages: [1] 2 3 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!