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

Re: conflicting types for 'bdb_db_config'



Taolizhong wrote:

Hello --
I was trying to compile openladp 2.2.23 on a Solaris 9 /X86 machine. The configure and make depend worked fine, however, when I tried to run make, it ended with the following error messages:
--------------------------------------------------------------------------------------------------------------------- gcc -g -O2 -I../../../include -I../../../include -I.. -I./.. -I/usr/local/include -I/usr/local/BerkeleyDB.4.3/include -I/usr/local/ssl/include -I/usr/local/ssl/include/openssl -I/usr/local/include/sasl -c config.c -fPIC -DPIC -o .libs/config.lo
config.c:36: error: conflicting types for 'bdb_db_config'
external.h:54: error: previous declaration of 'bdb_db_config' was here
config.c:36: error: conflicting types for 'bdb_db_config'
external.h:54: error: previous declaration of 'bdb_db_config' was here
make[3]: *** [config.lo] Error 1
make[3]: Leaving directory `/usr/local/source/openldap-2.2.17/servers/slapd/back-bdb'
make[2]: *** [.backend] Error 1
make[2]: Leaving directory `/usr/local/source/openldap-2.2.17/servers/slapd'
make[1]: *** [all-common] Error 1
make[1]: Leaving directory `/usr/local/source/openldap-2.2.17/servers'
make: *** [all-common] Error 1
----------------------------------------------------------------------------------------------------------------
The configure options I used:
./configure --enable-wrappers --enable-bdb --enable-perl --enable-ldap --enable
-rlookups --with-tls --with-cyrus-sasl --with-gnu-ld --enable-crypt --enable-per
l --enable-shell
The environment variables were set in configure file:
CC=gcc
CPPFLAGS="-I/usr/local/include -I/usr/local/BerkeleyDB.4.3/include -I/usr/local/
ssl/include -I/usr/local/ssl/include/openssl -I/usr/local/include/sasl"
LDFLAGS="-L/usr/local/lib -L/usr/local/BerkeleyDB.4.3/lib -R/usr/local/lib -R/us
r/local/BerkeleyDB.4.3/lib -L/usr/local/ssl/lib -L/usr/local/lib/sasl2"
export CPPFLAGS LDFLAGS
Other software, such as BerkeleyDB, openssl, cyrus-sasl were built and installed just fine. The version of gcc I was using is 3.4.3

I note that bdb_db_config is declared in back-bdb/external.h as BI_db_config, which is declared using Backend instead of BackendDB as in back-bdb/config.c; note that Backend is a typedef of BackendDB. Can you try changing the first arg of bdb_db_config() at line 31 of back-bdb/config.c into a Backend * instead of BackendDB *?


Unless it turns out to be a problem with your compiler, I suggest you file an ITS. I've been compiling with gcc 3.4 without problems on various flavors of Linux.

p.




SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497