[Python-bugs-list] [ python-Bugs-761504 ] Problem building site package bsddb3 on AIX
SourceForge.net
noreply@sourceforge.net
Sat, 28 Jun 2003 01:21:48 -0700
Bugs item #761504, was opened at 2003-06-27 00:24
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=761504&group_id=5470
Category: Build
Group: Python 2.2.2
>Status: Closed
>Resolution: Wont Fix
Priority: 5
Submitted By: Richard Wheeler (wheelrl)
Assigned to: Nobody/Anonymous (nobody)
Summary: Problem building site package bsddb3 on AIX
Initial Comment:
Help. Trying to build and install bsddb3-4.1.3 on AIX
4.3.2. Setup.py produce:
cc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -
I/mksDev/local/BerkeleyDB.4.1.25/include -
I/mksDev/local/include/python2.2 -c extsrc/_bsddb.c -o
build/temp.aix-4.3-2.2/_bsddb.o
which the -W options are not valid with IBM's version 5
compiler. Removed the -W options and was able to
compile _bsddb.o.
Linker runs next with:
/usr/local/lib/python2.2/config/ld_so_aix cc -
bI:/usr/local/lib/python2.2/config/python.exp
build/temp.aix-4.3-2.2/_bsddb.o -
L/mksDev/local/BerkeleyDB.4.1.25/lib -ldb -o build/lib.aix-
4.3-2.2/bsddb3/_bsddb.so
which uses the wrong prefix, replaced it with:
/mksDev/local/lib/python2.2/config/ld_so_aix cc -
bI:/mksDev/local/lib/python2.2/config/python.exp
build/temp.aix-4.3-2.2/_bsddb.o -
L/mksDev/local/BerkeleyDB.4.1.25/lib -ldb -o build/lib.aix-
4.3-2.2/bsddb3/_bsddb.so
now I get:
ld: 0711-317 ERROR: Undefined
symbol: .pthread_mutex_destroy
ld: 0711-317 ERROR: Undefined
symbol: .pthread_mutex_lock
ld: 0711-317 ERROR: Undefined
symbol: .pthread_cond_signal
ld: 0711-317 ERROR: Undefined
symbol: .pthread_mutex_unlock
ld: 0711-317 ERROR: Undefined
symbol: .pthread_mutex_trylock
ld: 0711-317 ERROR: Undefined
symbol: .pthread_cond_wait
ld: 0711-317 ERROR: Undefined
symbol: .pthread_mutexattr_init
ld: 0711-317 ERROR: Undefined
symbol: .pthread_mutexattr_setpshared
ld: 0711-317 ERROR: Undefined
symbol: .pthread_mutex_init
ld: 0711-317 ERROR: Undefined
symbol: .pthread_mutexattr_destroy
ld: 0711-317 ERROR: Undefined
symbol: .pthread_condattr_init
ld: 0711-317 ERROR: Undefined
symbol: .pthread_condattr_setpshared
ld: 0711-317 ERROR: Undefined
symbol: .pthread_cond_init
ld: 0711-317 ERROR: Undefined
symbol: .pthread_condattr_destroy
ld: 0711-345 Use the -bloadmap or -bnoquiet option to
obtain more information.
I could really use some help here. I have successfully
build the bsddb3 before with a prior version.
Thanks
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2003-06-28 10:21
Message:
Logged In: YES
user_id=21627
Finding BerkelyDB in other location than the standard
install locations is deliberately not supported in setup.py;
you need to edit Modules/Setup for non-standard installations.
As for the original bug: That looks like a BerkeleyDB or AIX
problem to me. Specifying -pthread should not be needed when
linking bsddb.so, instead, libbsdb-4.1.3 should be
self-contained.
Did you install BerkeleyDB with --enable-shared? If not:
linking static libraries to extension modules is not
supported in setup.py; you have to edit Modules/Setup for
such an installation (on some systems, this is not supported
at all, as the system disallows non-PIC code in shared
libraries).
Also, the 2.2 bsddbmodule.c is not longer recommended for
2.3. So I'm closing this as Won't fix; AIX experts may still
step forward and provide patches in that area.
----------------------------------------------------------------------
Comment By: Richard Wheeler (wheelrl)
Date: 2003-06-27 13:28
Message:
Logged In: YES
user_id=249546
Thanks for the reply.
Yes, Python 2.2.x runs fine on AIX 4.3.2. Been using it on aix
since about March of 2002. Recently upgraded to 2.2.2.
Finally figured out to add the -lpthread option last night.
bsddb3-4.1.3 now compliles fine on AIX 4.3.2. All tests
passed as well.
Had to run the complier and linker manually. DistUtils needs
some work with --prefix option if folks are going to use it for
distributing python modules.
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2003-06-27 04:59
Message:
Logged In: YES
user_id=33168
Have you got Python 2.2.x to work on AIX 4.2 or greater? I
don't believe it works out of the box.
It appears that bsddb requires the pthread library. You
will need to modify setup.py to add pthread to dblib around
line 444.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=761504&group_id=5470