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

RE: Compile Issues on AIX 5.1



Thanks for offering some support with this mutex/threading issue, Howard.

I have done some more looking into the situation, and have entered some
comments in the original message below....

On Thu, 15 May 2003, Howard Chu wrote:

> > -----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.

It appears that when I originally built the BDB 4.1.25, I used the configure switch
--enable-posixmutexes=no.  I then followed up with the OpenLDAP configure using the
--without-threads.

Given that BDB depends on thread functions, it must have built itself with alternate
mutex support on AIX 4.3.3.

> I just started running into this problem on a few platforms with BDB 4.1.25;

I see in the BDB 4.1.24 changelog that changes were made to introduce both the
--with-mutex configure option, and changes to the way AIX 4.3 and 5.x builds
are configured.

> 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 this case then, we can build BDB with threading support that relies on
a different set of shared mutex primitives than the default of POSIX mutexes ?

> 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...

Thanks for this suggestion....I primarily want to build my OpenLDAP distribution
with full thread support so that I can get slurpd running in my AIX environment.

Corey

=========================================
Corey Scholefield - coreys@uvic.ca
Unix Systems Administrator
University of Victoria Computing Services
Victoria, B.C. Canada