[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: Problem building under Cygwin

The configure script I think is the problem as it is finding both
winsock2.h and the Cygwin headers as well. Undefining _WIN32 doesn't
look like it will work as the configure script looks for
winsock/winsock2 regardless of if this defined or not.


-----Original Message-----
From: Howard Chu [mailto:hyc@symas.com] 
Sent: Thursday, 15 August 2002 4:06 AM
To: Mark Sztainbok; openldap-software@OpenLDAP.org
Subject: RE: Problem building under Cygwin

Cygwin duplicates a Unix environment on a Windows platform. When you're
using Cygwin you should undefine _WIN32 or any other macros that try to
bring in Windows-specific code.

Personally I would build natively instead, using the MinGW headers in a
Cygwin shell. My experience with the Cygwin DLL in prior versions has
been that it's too slow and too unstable. Stability may have improved,
but it will always be a drain on performance.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support 

> -----Original Message-----
> From: owner-openldap-software@OpenLDAP.org
> [mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Mark 
> Sztainbok

> I'm trying to build OpenLDAP 2.1.3 under Cygwin and I am having a 
> problem when liblutil is built. I get following error message:
> /usr/include/w32api/winsock2.h:512: parse error before `('
> /usr/include/w32api/winsock2.h:512: parse error before `?'
> /usr/include/w32api/winsock2.h:513: parse error before `('
> /usr/include/w32api/winsock2.h:513: parse error before `?'
> /usr/include/w32api/winsock2.h:514: parse error before `('
> /usr/include/w32api/winsock2.h:514: parse error before `?'
> /usr/include/w32api/winsock2.h:515: parse error before `('
> /usr/include/w32api/winsock2.h:515: parse error before `?'
> /usr/include/w32api/winsock2.h:516: conflicting types for `select'
> /usr/include/sys/select.h:29: previous declaration of `select'
> make[2]: *** [base64.o] Error 1
> make[2]: Leaving directory 
> `/usr/local/src/openldap-2.1.3/libraries/liblutil'
> make[1]: *** [all-common] Error 1
> make[1]: Leaving directory `/usr/local/src/openldap-2.1.3/libraries'
> make: *** [all-common] Error 1
> I also get a lot of warnings about winsock2.h redefining macros that 
> are defined in other Cygwin headers.
> I'm using the following configure command line: ./configure 
> --disable-ldbm --enable-ldap --enable-passwd --enable-shell
> I have the latest versions of the Cygwin DLL installed and respective 
> programs and also have Berkeley DB 4, SASL 2 and OpenSSL installed.
> Has anyone encountered this problem?
> If so, what did you do to fix it?
> Any help would be greatly appreciated.
> Thanks,
> Mark