Hi, gang.
Having a bit of trouble compiling OpenLDAP 2.4.16 under Fedora 10. I've built Berkeley DB 4.7 and installed it. I run configure with:
LDFLAGS="-L/usr/local/BerkeleyDB.4.7/lib" CPPFLAGS="-I/usr/local/BerkeleyDB.4.7/include" ./configure --enable-modules --enable-backends --enable-overlays=mod --enable-sql=no
(all one line). Despite what "./configure --help" says, it still tries to include the MySQL NDB stuff by default (and can't find the headers even if the mysql-devel RPM is installed, the "NdbApi.hpp" file is in /usr/include/mysql/ndb/ndbapi), so I've appended "--enable-ndb=no" as well to get past that (don't need MySQL anyway).
Beyond that, compilation bombs when it hits libraries/liblutil/lutil_getpeerid.c:
getpeereid.c: In function ‘lutil_getpeereid’: getpeereid.c:65: error: storage size of ‘peercred’ isn’t known
"struct ucred" is defined in <asm/socket.h> and the compile doesn't seem to be picking that up. Never had this issue with 2.4.10 or 2.4.11.
Hints? Suggestions? ---------------------------------------------------------------------- - Rick Stevens, Unix Geek rps2@socal.rr.com - - - - Polygon: A dead parrot (With apologies to John Cleese) - ----------------------------------------------------------------------
--On Tuesday, April 14, 2009 3:25 PM -0700 Rick Stevens rps2@socal.rr.com wrote:
Hi, gang.
Having a bit of trouble compiling OpenLDAP 2.4.16 under Fedora 10. I've built Berkeley DB 4.7 and installed it. I run configure with:
LDFLAGS="-L/usr/local/BerkeleyDB.4.7/lib" CPPFLAGS="-I/usr/local/BerkeleyDB.4.7/include" ./configure --enable-modules --enable-backends --enable-overlays=mod --enable-sql=no
(all one line). Despite what "./configure --help" says, it still tries to include the MySQL NDB stuff by default (and can't find the headers even if the mysql-devel RPM is installed, the "NdbApi.hpp" file is in /usr/include/mysql/ndb/ndbapi), so I've appended "--enable-ndb=no" as well to get past that (don't need MySQL anyway).
Hints? Suggestions?
Back-sql and back-ndb are different backends. You need to add --disable-ndb to your configure flags. See the output of ./configure --help.
--Quanah
--
Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc -------------------- Zimbra :: the leader in open source messaging and collaboration
Rick Stevens wrote:
Hi, gang.
Having a bit of trouble compiling OpenLDAP 2.4.16 under Fedora 10. I've built Berkeley DB 4.7 and installed it. I run configure with:
LDFLAGS="-L/usr/local/BerkeleyDB.4.7/lib" CPPFLAGS="-I/usr/local/BerkeleyDB.4.7/include" ./configure --enable-modules --enable-backends --enable-overlays=mod --enable-sql=no
(all one line). Despite what "./configure --help" says, it still tries to include the MySQL NDB stuff by default (and can't find the headers even if the mysql-devel RPM is installed, the "NdbApi.hpp" file is in /usr/include/mysql/ndb/ndbapi), so I've appended "--enable-ndb=no" as well to get past that (don't need MySQL anyway).
Beyond that, compilation bombs when it hits libraries/liblutil/lutil_getpeerid.c:
getpeereid.c: In function ‘lutil_getpeereid’: getpeereid.c:65: error: storage size of ‘peercred’ isn’t known
"struct ucred" is defined in <asm/socket.h> and the compile doesn't seem to be picking that up. Never had this issue with 2.4.10 or 2.4.11.
Add -D_GNU_SOURCE to your CPPFLAGS:
David Hawes wrote:
Rick Stevens wrote:
"struct ucred" is defined in<asm/socket.h> and the compile doesn't seem to be picking that up. Never had this issue with 2.4.10 or 2.4.11.
Add -D_GNU_SOURCE to your CPPFLAGS:
Don't add it indiscriminately. Just define it in the getpeereid.c file; playing with _GNU preprocessor symbols has been known to break a lot of builds in the past, which is why we don't define it by default.
Rick Stevens wrote:
Beyond that, compilation bombs when it hits libraries/liblutil/lutil_getpeerid.c:
getpeereid.c: In function ‘lutil_getpeereid’: getpeereid.c:65: error: storage size of ‘peercred’ isn’t known
"struct ucred" is defined in<asm/socket.h> and the compile doesn't seem to be picking that up. Never had this issue with 2.4.10 or 2.4.11.
It seems your libc must have changed since the last time you compiled this code. For whatever reason, you now need to define _GNU_SOURCE when compiling getpeerid.c. I've been opposed to adding this in our CVS but it looks like it's becoming a more frequent problem now.
Hints? Suggestions?
- Rick Stevens, Unix Geek rps2@socal.rr.com -
-
Polygon: A dead parrot (With apologies to John Cleese) -
openldap-software@openldap.org