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

RedHat 6.0 Compilation failure (detailed bug report)



(or, at least I hope its detailed enough...)

I downloaded this:

-----------------
ftp://contrib.redhat.com/libc6/SRPMS/openldap-1.2.1-1.src.rpm
-----------------

...and when I 'rpm -ba SPECS/openldap.spec' I get a *ton* of this:


-----------------
gcc -O2 -I../../include        -I../../include   -DHAVE_CONFIG_H    -c
ldbm.c -o ldbm.o
In file included from ldbm.c:18:
../../include/ac/string.h:54: macro `strdup' used without args
make[2]: *** [ldbm.o] Error 1
-----------------

Nothing else seems wrong but the "strdup" problem...

The relevant section of ldap/include/ac/string.h is:

-----------------
    49  #ifndef HAVE_STRDUP
    50          /* strdup() is missing, declare our own version */
    51          extern char *strdup LDAP_P(( const char *s ));
    52  #else
    53          /* some systems have strdup(), but fail to declare it */
    54          extern char *strdup();
    55  #endif
-----------------


The configure line is this (from the .spec):


-----------------
./configure --prefix=/usr --libexecdir=/usr/sbin --localstatedir=/var/run
--sysconfdir=/etc --datadir=/etc --enable-cldap --enable-phonetic
--with-kerberos --with-wrappers --enable-shared --with-subdir=ldap
-----------------

...and at some point in that whole process it says this:

-----------------
checking for strdup... yes
-----------------

I have read a load of documentation and the archives, and their appears to
be a lot of brew-ha-ha surrounding the dbm stuff. I don't know if its
useful or not, but just in case, info regarding that in my configure
output is this:

-----------------
checking for DB2 library... checking for db_open in -ldb... yes
-ldb
checking for db.h... yes
checking if db.h is DB2... yes
checking for Berkeley DB2... yes
-----------------

and my C library (for what its worth...):

-----------------
<minipeace>/usr/src/redhat/BUILD/ldap/include/ac % rpm -qf /usr/lib/libdb.a
glibc-devel-2.1.1-3
<minipeace>/usr/src/redhat/BUILD/ldap/include/ac %
-----------------

All of this worked *beautifully* on a RH5.2 system, no problems, other
programs are able to link off of it and run. I just don't grok LDAP and
the packages it relies on well enough to even know where to look for
differences...

When I remove the lines from include/ac/string.h that I mentioned above,
everything compiles cleanly, links into PHP and works just fine as a
client at least (I haven't tested it as a server and don't know how)

My main open source passion is the Horde/IMP project (which uses and loves
OpenLDAP, thanks guys), which doesn't use autoconf/configure, so I have no
idea how to fix this the Right Way.

I hope this helps though, and I'll help test any new configure scripts :-)

--Mike