Subject: Re: error in compiling berkeleydb-4.2.52 in cygwin
From: "Gerrit P. Haase" <[email-masked]>
To: kevin J <[email-masked]>
Cc: [email-masked], bertrand marquis <[email-masked]>
Date: Tue, 12 Oct 2004 02:09:54 +0200

Hallo Kevin, hello Bertrand,

Am Freitag, 13. August 2004 um 20:43 schriebst du:

> Hi,

> I downloaded berkeleydb-4.2.52 and two patches from sleepycat.
> When I tried to compile it I got the errors from ../lock/lock_region.c
> as below.
> Anybody know what's wrong? 

> Thanks,
> Kevin
> --------------------------------------------------------------------------------------------------
> pas-lap-030210:/home/kihoonj/db-4.2.52/build_win32> make
> /usr/bin/sh ./libtool --mode=compile cc -c -I. -I../dist/..  
> -D_GNU_SOURCE -D_REENTRANT -O2 ../dist/../lock/lock_region.c
>  cc -c -I. -I../dist/.. -D_GNU_SOURCE -D_REENTRANT -O2 
> ../dist/../lock/lock_region.c  -DPIC -o .libs/lock_region.o
> ../lock/lock_region.c:98:49: macro "__lock_init" passed 2 arguments, but
> takes just 1

Coming back to this now since I got the same problem today when trying
to build evolution:-(

Ron Cohen found a solution (or better the cause for this problem).  I
shipped BDB-4.2.x compiled on an older cygwin release, there were
changes, __lock_init was added to the system headers / libraries and
this overrides now the BDB own definition, suggested fix copied from
here: 
http://www.talkaboutdatabases.com/group/comp.databases.berkeley-db/messages/1284.html

Modify lock_region.c in the lock directory.
Add this one line of code:

#undef __lock_init

Add that line of code after the includes and right before this line:

static int  __lock_init __P((DB_ENV *, DB_LOCKTAB *));

Gerrit
-- 
=^..^=

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/