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

RE: Compile Issues on AIX 5.1



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

> However, the link attempt for 'db-4.1' was a little more enlightening;
>
> configure:18063: checking for Berkeley DB link (-ldb-4.1)
> configure:18120: /usr/vac/bin/xlc_r -o conftest -g
> -I/usr/local/ssl/include -I/usr/local/BerkeleyD
> B.4.1/include -I/usr/local/include -I/usr/include
> -L/usr/local/ssl/lib -L/usr/local/BerkeleyDB.4.1
> /lib -L/usr/local/lib -L/usr/lib conftest.c -ldb-4.1   -lc_r
> -lssl -ldb 1>&5
> ld: 0711-317 ERROR: Undefined symbol: .mutex_lock
> ld: 0711-317 ERROR: Undefined symbol: .cond_signal
> ld: 0711-317 ERROR: Undefined symbol: .mutex_unlock
> ld: 0711-317 ERROR: Undefined symbol: .mutex_trylock
> ld: 0711-317 ERROR: Undefined symbol: .cond_wait
> ld: 0711-317 ERROR: Undefined symbol: .mutex_init
> ld: 0711-317 ERROR: Undefined symbol: .cond_init
> ld: 0711-317 ERROR: Undefined symbol: .mutex_destroy
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain
> more information.
>
> So perhaps threading support is an issue here that I also
> need to look into.  I note
> that configure --without-threads produces the same result.

This means your BerkeleyDB library itself needs to be rebuilt. If you want to
build --without-threads but BDB has dependencies on thread functions,
obviously you're hosed... Take a look at the config.log output from the build
of BerkeleyDB, you'll probably see that it decided to use POSIX mutexes
instead of a platform-specific shared memory mutex.

I just started running into this problem on a few platforms with BDB 4.1.25;
not sure why since it doesn't look like the configure script has changed that
much since BDB 4.1.17. Rather than let the script autodetect which mutexes to
use, you'll have to scan the script visually, choose the most appropriate
mutex support, and explicitly specify it using --with-mutex=<whatever>. For
AIX you might want either AIX/_check_lock or UNIX/msem_init, not sure which
would be better in your case.

In general I use whatever platform-specific mutex support BDB provides
instead of the POSIX mutexes. This approach prevents the BDB library from
becoming dependent on the pthreads library, first of all. Also, not all
platforms with POSIX thread support have shared mutex support, which makes
them useless when multiple processes are working with a single BDB
environment. You need shared mutex support to enable making reliable hot
backups of active databases...

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