Bitcoin Forum
February 08, 2016, 01:54:46 AM *
News: Latest stable version of Bitcoin Core: 0.11.2 [Torrent]
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: How do you build Berkeley DB 4.8.30 in MinGW?  (Read 9227 times)
piotr_n
Legendary
*
Offline Offline

Activity: 1274


aka tonikt


View Profile WWW
September 24, 2011, 01:33:54 PM
 #1

According to build-msw.txt all one needs to do is:
Quote
MSYS shell:
cd /c/db-4.8.30.NC-mgw/build_unix
sh ../dist/configure --enable-mingw --enable-cxx
make

It worked just perfect with the previous version (4.7.25).
But with 4.8.30 it just crashesh like this:
Quote
$ make
./libtool --mode=compile gcc -c -I. -I../dist/..  -O3  ../dist/../mutex/mut_win32.c
libtool: compile:  gcc -c -I. -I../dist/.. -O3 ../dist/../mutex/mut_win32.c  -DDLL_EXPORT -DPIC -o .libs/mut_win32.o
In file included from ./db_int.h:886:0,
                 from ../dist/../mutex/mut_win32.c:12:
../dist/../dbinc/repmgr.h:502:13: error: two or more data types in declaration specifiers
../dist/../dbinc/repmgr.h:502:1: warning: useless type name in empty declaration
make: *** [mut_win32.lo] Error 1

So how do you build it?

Check out gocoin - my original project of a bitcoin client written in Go, with some unique features.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
COINROYALE BITCOIN CASINO GET UP TO 1 BTC FREE Use Code: FORUM100 PLAY NOW
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1454896486
Hero Member
*
Offline Offline

Posts: 1454896486

View Profile Personal Message (Offline)

Ignore
1454896486
Reply with quote  #2

1454896486
Report to moderator
1454896486
Hero Member
*
Offline Offline

Posts: 1454896486

View Profile Personal Message (Offline)

Ignore
1454896486
Reply with quote  #2

1454896486
Report to moderator
piotr_n
Legendary
*
Offline Offline

Activity: 1274


aka tonikt


View Profile WWW
October 03, 2011, 06:25:05 PM
 #2

Should I consider the lack of any answer more like 'works for me', 'we never compile windows client' or rather 'who the hell are you to ask me such questions?' Smiley

Check out gocoin - my original project of a bitcoin client written in Go, with some unique features.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
piotr_n
Legendary
*
Offline Offline

Activity: 1274


aka tonikt


View Profile WWW
October 06, 2011, 10:28:26 AM
 #3

I got it via PM:
Busted out of the newbie area to get you this.
I was able to compile db-4.8.30.NC by doing the following.

../dist/configure --disable-replication --enable-mingw --enable-cxx --prefix=/usr/local

db.h in build_unix/
@ Line 113 Replace

typedef pthread_t db_threadid_t;

with

typedef u_int32_t db_threadid_t;

Then did make. Hope it works for you!

It worked for me -  thanks Icy!

Check out gocoin - my original project of a bitcoin client written in Go, with some unique features.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
Diapolo
Hero Member
*****
Offline Offline

Activity: 769



View Profile WWW
July 07, 2012, 11:58:34 PM
 #4

If this works you are my hero Smiley, as I have the same error when doing:

../dist/configure --enable-mingw --enable-cxx

I try to compile on Windows 7 with MinGW (GCC 4.7).

Dia

Liked my former work for Bitcoin Core? Drop me a donation via:
1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x
bitcoin:1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x?label=Diapolo
Diapolo
Hero Member
*****
Offline Offline

Activity: 769



View Profile WWW
July 08, 2012, 10:49:04 AM
 #5

Holy fuck and shit, after fixing another small glitch (will report back later for investigation), it works.
I compiled my own BDB lib, compiled Bitcoin-Qt and it starts and works ... great stuff.

Dia

Liked my former work for Bitcoin Core? Drop me a donation via:
1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x
bitcoin:1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x?label=Diapolo
Diapolo
Hero Member
*****
Offline Offline

Activity: 769



View Profile WWW
July 08, 2012, 12:00:20 PM
 #6

I've got a question, in the 4.7 db.h line 113 reads:
typedef uintmax_t db_threadid_t;

In 4.8 they changed it to:
typedef pthread_t db_threadid_t;

While your version (which fixes the compilation errors with MinGW) is:
typedef u_int32_t db_threadid_t;

How large can thread IDs be? I'm just asking, if u_int32_t is sufficient here?

Dia

Liked my former work for Bitcoin Core? Drop me a donation via:
1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x
bitcoin:1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x?label=Diapolo
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1022


View Profile WWW
July 08, 2012, 12:37:31 PM
 #7

See http://msdn.microsoft.com/en-us/library/windows/desktop/ms683183(v=vs.85).aspx

Thread IDs are DWORDs on Windows, meaning 32 bits.

aka sipa, core dev team

Tips and donations: 1KwDYMJMS4xq3ZEWYfdBRwYG2fHwhZsipa
Diapolo
Hero Member
*****
Offline Offline

Activity: 769



View Profile WWW
July 08, 2012, 02:27:49 PM
 #8

See http://msdn.microsoft.com/en-us/library/windows/desktop/ms683183(v=vs.85).aspx

Thread IDs are DWORDs on Windows, meaning 32 bits.

Thank you!

Dia

Liked my former work for Bitcoin Core? Drop me a donation via:
1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x
bitcoin:1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x?label=Diapolo
Onichan
Jr. Member
*
Offline Offline

Activity: 47


View Profile
July 11, 2012, 01:02:51 AM
 #9

If you are trying to compile the client using windows then you might have some trouble. I know the last time I tried which was a while ago it had many problems. I write a quick guide on how to do it using a virtual and Ubuntu https://bitcointalk.org/index.php?topic=84984
Diapolo
Hero Member
*****
Offline Offline

Activity: 769



View Profile WWW
July 11, 2012, 04:59:18 AM
 #10

If you are trying to compile the client using windows then you might have some trouble. I know the last time I tried which was a while ago it had many problems. I write a quick guide on how to do it using a virtual and Ubuntu https://bitcointalk.org/index.php?topic=84984

It's compiling just fine on Windows 7 Smiley. Need to build BDB, OpenSSL and Boost libs, which I now figured out how to do it.

Dia

Liked my former work for Bitcoin Core? Drop me a donation via:
1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x
bitcoin:1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x?label=Diapolo
mightycount
Member
**
Offline Offline

Activity: 101



View Profile
December 04, 2012, 10:48:37 PM
 #11

I got it via PM:
Busted out of the newbie area to get you this.
I was able to compile db-4.8.30.NC by doing the following.

../dist/configure --disable-replication --enable-mingw --enable-cxx --prefix=/usr/local

db.h in build_unix/
@ Line 113 Replace

typedef pthread_t db_threadid_t;

with

typedef u_int32_t db_threadid_t;

Then did make. Hope it works for you!

It worked for me -  thanks Icy!

+1

Personal Bitcoin Black List - Companies and people to avoid!
````` Butterfly Labs...MtGox...ragingazn628...(reserved)...  `````
gremlinsinc
Newbie
*
Offline Offline

Activity: 1


View Profile
January 26, 2014, 03:26:14 AM
 #12

Having same problem... building a clone from Dogecoin source.Having this same issue, I think this solved it.. Now if I can get boost to build right, I might have this thing knocked together tonight.
hadi
Full Member
***
Offline Offline

Activity: 210


View Profile
March 18, 2014, 07:25:34 PM
 #13

I have similiar issue.i replaced typedef u_int32_t db_threadid_t; but not work

can any1 help me ?

c275
Hero Member
*****
Offline Offline

Activity: 700


View Profile
November 04, 2015, 06:40:39 PM
 #14

I have similiar issue.i replaced typedef u_int32_t db_threadid_t; but not work

can any1 help me ?



Same problem here. changing db.h dosen't work. Any help? Sad
Polyatomic
Sr. Member
****
Offline Offline

Activity: 249


View Profile
November 08, 2015, 09:21:01 PM
 #15

Dude, careful observers here may need more
say build env version, a full build log with the
crapout including the commands used verbatim.
Prolly use a paste site service and prolly not
pastebin.com, it's veritable crud.
YarkoL
Hero Member
*****
Offline Offline

Activity: 700



View Profile
November 13, 2015, 06:15:48 PM
 #16


@c275

Try reconfiguring with

../dist/configure --enable-cxx --enable-mingw --disable-pthread_api --disable-replication

Then make again.
Pages: [1]
  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!