Compile-Error cuyry-imap2.1.12 and cyrus-imap2.1.9: Newbie

Simon Matter simon.matter at ch.sauter-bc.com
Thu Feb 6 11:28:03 EST 2003


Klaus Litfin schrieb:
> 
> Hallo to all,
> 
> I have problems to compile cyrus-imap-Server.
> I'm a newbie in Cyrus, but I read the mailing-Archives,  to see if there
> is a solution to the problem and havent seen any.
> Some hints were in changing the include of <db.h> in lib/cyrusdb_db3.c
> to a full path-incude. But this did not work for me.

I don't know anything about your linux distro. With cyrus-imapd-2.1.12,
I had to modify my rpm spec to build on RedHat 6.2 like this:

--with-bdb-incdir=%_includedir/%{_dbver}

which is expanded to

--with-bdb-incdir=/usr/include/db3/db.h

Just adopt to your situation.

HTH
Simon

> 
> Here is what i tried. I tried two nights without success. I would
> appreciate if someone could give me some help.
> Many Thancs in advance.
> 
> Klaus
> ---
> 
> I tried different combinations:
> For example i tried with (Berkley 4.0.14, cyrus-sasl-2.1.9, and
> cyrus-imapd-2.1.9)
> 
> The configure-Script of the cyrus-imapd failed, when analyzing the
> DB-Version.
> and stopped:
> 
> ./configure \
> --with-sasl=/usr/local/lib \
> --with-perl \
> --with-auth=unix \
> --with-openssl=/usr/local/openssl \
> --without-ucdsnmp
> 
> loading cache ./config.cache
> checking host system type... i686-pc-linux-gnu
> checking for makedepend... makedepend
> checking for gcc... gcc
> checking whether the C compiler (gcc  ) works... yes
> checking whether the C compiler (gcc  ) is a cross-compiler... no
> checking whether we are using GNU C... yes
> checking whether gcc accepts -g... yes
> checking for ranlib... ranlib
> checking whether make sets ${MAKE}... yes
> checking for a BSD compatible install... /usr/bin/ginstall -c
> checking how to run the C preprocessor... gcc -E
> checking for AIX... no
> checking for strerror in -lcposix... no
> checking for mawk... no
> checking for gawk... gawk
> checking for working const... yes
> checking for long file names... yes
> checking for __attribute__... yes
> checking for runpath switch... -Wl,-rpath,
> checking for unistd.h... yes
> checking for sys/select.h... yes
> checking for sys/param.h... yes
> checking for memmove... yes
> checking for strcasecmp... yes
> checking for ftruncate... yes
> checking for strerror... yes
> checking for getaddrinfo... yes
> checking for getnameinfo... yes
> checking for dirent.h that defines DIR... yes
> checking for opendir in -ldir... no
> checking whether struct tm is in sys/time.h or time.h... time.h
> checking for tm_zone in struct tm... yes
> checking for vprintf... yes
> checking for db_create in -ldb-4.0... no
> checking for db_create in -ldb-4... no
> checking for db_create in -ldb4.0... no
> checking for db_create in -ldb4... no
> checking for db_create in -ldb-3.3... no
> checking for db_create in -ldb3.3... no
> checking for db_create in -ldb-3.2... no
> checking for db_create in -ldb3.2... no
> checking for db_create in -ldb-3.1... no
> checking for db_create in -ldb3.1... no
> checking for db_create in -ldb-3... no
> checking for db_create in -ldb3... no
> checking for db_create in -ldb... no
> configure: error: this version requires Berkeley DB 3.x or later.
> (Get it from http://www.sleepycat.com/.)
> ----------------------------------------------
> 
> Is the configure-Script corrupt or did i make a mistake with the parameters?
> 
> A second/third  try was a combination of
> 
> (BerkleyDB 4.0.14, cyrus-sasl-2.1.12, and cyrus-imapd-2.1.12)
> 
> or with (BerkleyDB 4.1.25, cyrus-sasl-2.1.12, and cyrus-imapd-2.1.12).
> 
> At this time the configure-Script does not stop, but did not recognize
> the correct version of the database.
> ...
> checking for vprintf... (cached) yes
> checking for db.h... (cached) yes
> checking for db_create in -ldb-4.1... (cached) no
> checking for db_create in -ldb4.1... (cached) no
> checking for db_create in -ldb-4.0... (cached) no
> checking for db_create in -ldb4.0... (cached) no
> checking for db_create in -ldb-4... (cached) no
> checking for db_create in -ldb4... (cached) no
> checking for db_create in -ldb-3.3... (cached) no
> checking for db_create in -ldb3.3... (cached) no
> checking for db_create in -ldb-3.2... (cached) no
> checking for db_create in -ldb3.2... (cached) no
> checking for db_create in -ldb-3.1... (cached) no
> checking for db_create in -ldb3.1... (cached) no
> checking for db_create in -ldb-3... (cached) no
> checking for db_create in -ldb3... (cached) no
> checking for db_create in -ldb... (cached) no
> checking for db_open in -ldb... (cached) yes
> checking duplicate db database backend... db3_nosync
> ....
> In a little bit later the last step the compilation failed:
> 
> make depend
> 
> make all CFLAGS=-O
> ( I tried with export CPPFLAGS="-I/path-to-Berkley-includes" ) but it
> did not work in a correct way)
> The result:
> .....
> gcc -L/usr/local/openssl/lib -Wl,-rpath,/usr/local/openssl/lib
> -L/usr/local/lib -Wl,-rpath,/usr/local/lib  -Wall -g -O2   -o imapd \
>  ../master/service.o pushstats.o backend.o imapd.o index.o tls.o
> version.o libimap.a ../acap/libacap.a ../lib/libcyrus.a
> -L/usr/local/lib/lib  -Wl,-rpath,/usr/local/lib/lib -lsasl2   -ldl -lfl
> -lresolv   -ldb -lssl -lcrypto ../et/libcom_err.a -lwrap -lnsl
> ../lib/libcyrus.a(cyrusdb_db3.o): In function `init':
> cyrusdb_db3.o(.text+0xd7): undefined reference to `db_env_create'
> cyrusdb_db3.o(.text+0xea): undefined reference to `db_strerror'
> cyrusdb_db3.o(.text+0x17e): undefined reference to `db_strerror'
> cyrusdb_db3.o(.text+0x1b9): undefined reference to `db_strerror'
> cyrusdb_db3.o(.text+0x24b): undefined reference to `db_strerror'
> ../lib/libcyrus.a(cyrusdb_db3.o): In function `done':
> cyrusdb_db3.o(.text+0x2be): undefined reference to `db_strerror'
> ../lib/libcyrus.a(cyrusdb_db3.o)(.text+0x33e): more undefined references
> to `db_strerror' follow
> ../lib/libcyrus.a(cyrusdb_db3.o): In function `myopen':
> cyrusdb_db3.o(.text+0x69f): undefined reference to `db_create'
> cyrusdb_db3.o(.text+0x6dc): undefined reference to `db_strerror'
> ../lib/libcyrus.a(cyrusdb_db3.o): In function `myclose':
> cyrusdb_db3.o(.text+0x74e): undefined reference to `db_strerror'
> ../lib/libcyrus.a(cyrusdb_db3.o): In function `gettid':
> cyrusdb_db3.o(.text+0x7f4): undefined reference to `db_strerror'
> ../lib/libcyrus.a(cyrusdb_db3.o): In function `myfetch':
> cyrusdb_db3.o(.text+0x95d): undefined reference to `db_strerror'
> ../lib/libcyrus.a(cyrusdb_db3.o): In function `foreach':
> cyrusdb_db3.o(.text+0xaf7): undefined reference to `db_strerror'
> ../lib/libcyrus.a(cyrusdb_db3.o)(.text+0xc0f): more undefined references
> to `db_strerror' follow
> collect2: ld returned 1 exit status
> make[1]: *** [imapd] Error 1
> make[1]: Leaving directory `/usr/local/src/cyrus-imapd-2.1.12/imap'
> make: *** [all] Error 1
> -------------------------------
> Many Thanks in advance
> 
> Klaus




More information about the Info-cyrus mailing list