[elephant-devel] Start of 0.6.1 Beta Cycle

Ian Eslick eslick at csail.mit.edu
Fri Mar 23 13:19:49 UTC 2007


Ah yes, there's a problem with db.h and mingw that we need to  
document in the INSTALL instructions.  I'm not sure if there is a  
tasteful way around this, but sys/types.h defines ssize_t differently  
than db.h, so they appear to be incompatible.

Frank Schorr had this solution, but it isn't ideal:

At first, there was this error:

In file included from libberkeley-db.c:165:
/c/Programme/Oracle/Berkeley DB 4.5.20/include/db.h:99: error:  
conflicting types
  for 'ssize_t'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/ 
include/sys/types
.h:104: error: previous declaration of 'ssize_t' was here


I commented these lines out in C:\cygwin\usr\include\mingw\sys\types.h:

/*
  *#ifndef _SSIZE_T_
  *#define _SSIZE_T_
  *typedef long _ssize_t;
  *
  *#ifndef	_NO_OLDNAMES
  *typedef _ssize_t ssize_t;
  *#endif
  *#endif * Not _SSIZE_T_ *
*/

apparently this this did not cooperate with

#ifdef _WIN64
typedef int64_t ssize_t;
#else
typedef int32_t ssize_t;
#endif

in db.h.

After that he had a working build.  Any ideas for a better solution  
on your end?  I have to admit to an extreme dislike of cygwin after a  
nasty summer in it's company some years back.

Ian

On Mar 23, 2007, at 8:47 AM, Edi Weitz wrote:

> On Fri, 23 Mar 2007 07:30:38 -0400, Ian Eslick  
> <eslick at csail.mit.edu> wrote:
>
>> I believe you can download a pre-built BDB Windows DLL distribution
>> from Oracle.
>
> Yeah, I had that installed, but I wasn't aware that I could expect an
> automatic build because I originally saw lots of errors flying by.  I
> tried to track that down now and the problem was that you're using
> "/C" for the C: drive in Cygwin.  I had to create this mount point
> manually, AFAIK this is not the default in Cygwin.  I'd propose to use
> "/cygdrive/c" instead to be on the safe side - this mount point should
> always exist.
>
>> The rest of the libraries should be built automatically using cygwin
>> during the ASDF loads of elephant and ele-bdb if you select the
>> :cygwin compiler option and provide paths to the BDB distribution.
>> We've verified both Allegro 8 and Lispworks 5 using this
>> configuration and the downloaded BDB.
>
> Doesn't work for me.  The compilation attempt breaks like this:
>
>   edi at Groucho:~/lisp/elephant/src/db-bdb$ gcc -L'/C/Program Files/ 
> Oracle/Berkeley DB 4.5.20/bin/' -I'/C/Program Files/Oracle/Berkeley  
> DB 4.5.20/include/' -ldb45 -mno-cygwin -mwindows -Wall -c -std=c99  
> "c:\home\lisp\elephant\src\db-bdb\libberkeley-db.c"
>   In file included from c:\home\lisp\elephant\src\db-bdb 
> \libberkeley-db.c:165:
>   /C/Program Files/Oracle/Berkeley DB 4.5.20/include/db.h:99:  
> error: conflicting types for 'ssize_t'
>   /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/ 
> include/sys/types.h:104: error: previous declaration of 'ssize_t'  
> was here
>   c:\home\lisp\elephant\src\db-bdb\libberkeley-db.c: In function  
> `case_cmp':
>   c:\home\lisp\elephant\src\db-bdb\libberkeley-db.c:1236: warning:  
> implicit declaration of function `_strnicmp'
>
> This is on Windows XP pro SP2 with BerkeleyDB 4.5.20 and LWW 5.0.1,
> Cygwin updated from the Internet half an hour ago.
>
> BTW, I'd suggest to use another LispWorks command for the compilation
> steps, so the user can actually see error messages like this one -
> patch attached.
>
> Cheers,
> Edi.
>
> <elephant.diff>
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel




More information about the elephant-devel mailing list