[Python-bugs-list] [ python-Bugs-775850 ] pybsddb build fails
SourceForge.net
noreply@sourceforge.net
Fri, 25 Jul 2003 07:28:35 -0700
Bugs item #775850, was opened at 2003-07-22 20:21
Message generated for change (Comment added) made by zooko
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=775850&group_id=5470
Category: Build
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Zooko O'Whielacronx (zooko)
Assigned to: Nobody/Anonymous (nobody)
Summary: pybsddb build fails
Initial Comment:
This is either a bug in the build, or a bug in the
build docs, or me being dumb.
I read Modules/Setup and it said Berkeley DB 4.1 wasn't
supported, but I later realized that this statement was
out of date. Then I read somewhere -- I'm sorry I
can't find this doc now that I'm writing this report --
that Berkeley DB 4.1 would be detected by the setup.py
script after the interpreter was built during "make".
So I installed Berkeley DB 4.1 and ran "make". It
*did* detect that I had Berkeley DB installed, and
attempted to build the wrapper, but failed like this:
building '_bsddb' extension
gcc -pthread -DNDEBUG -g -fPIC -fno-strict-aliasing -I.
-I/home/zooko/playground/python/python/dist/src/./Include
-I/usr/local/stow/python-g/include -I/usr/local/include
-I/home/zooko/playground/python/python/dist/src/Include -I/home/zooko/playground/python/python/dist/src -c /home/zooko/playground/python/python/dist/src/Modules/_bsddb.
c -o build/temp.linux-i686-2.3/_bsddb.o
gcc -pthread -shared build/temp.linux-i686-2.3/_bsddb.o
-L/usr/local/stow/python-g/lib -L/usr/local/lib
-ldb-4.1 -o build/lib.linux-i686-2.3/_bsddb.so
*** WARNING: renaming "_bsddb" since importing it
failed: build/lib.linux-i686-2.3/_bsddb.so: undefined
symbol: db_create
----------------------------------------------------------------------
>Comment By: Zooko O'Whielacronx (zooko)
Date: 2003-07-25 14:28
Message:
Logged In: YES
user_id=52562
Here's some more details about my system:
* Debian unstable/testing
* Linux pion 2.4.21 #1 Sat Jul 19 10:21:24 EDT 2003 i686
unknown unknown GNU/Linux
* gcc (GCC) 3.3.1 20030626 (Debian prerelease)
* GNU Make 3.80
* AMD Athlon XP 1600+
----------------------------------------------------------------------
Comment By: Zooko O'Whielacronx (zooko)
Date: 2003-07-25 12:57
Message:
Logged In: YES
user_id=52562
I don't know if this is important, but I still can't build
the bsddb3 module on my system without manually editing my
/etc/ld.so.conf, and even after I do manually edit my
/etc/ld.so.conf the tests seem to fail.
----------------------------------------------------------------------
Comment By: Zooko O'Whielacronx (zooko)
Date: 2003-07-23 12:59
Message:
Logged In: YES
user_id=52562
Could you tell me how to find out why distutils doesn't use
the -R/-rpath option?
Could it be that it assumes /usr/local/lib is already going
to be in the ld path?
By the way, having manually added /usr/local/lib to my
/etc/ld.so.conf, it compiles with no errors, but make test
yields the following:
HACK pion:~/playground/python/python/dist/src$ grep -i -E
--regex="bsddb|berk|db[^A-Za-z]"
/tmp/zooko/logs/make.test.python
test_bsddb
test_bsddb185
test_bsddb185 skipped -- No module named bsddb185
test_bsddb3
test_bsddb3 skipped -- Use of the `bsddb' resource not enabled
test_aepack test_al test_bsddb185 test_bsddb3 test_bz2
test_cd
test_bsddb
test_bsddb185
test_bsddb185 skipped -- No module named bsddb185
test_bsddb3
test_bsddb3 skipped -- Use of the `bsddb' resource not enabled
test_aepack test_al test_bsddb185 test_bsddb3 test_bz2
test_cd
Is that right?
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2003-07-22 21:05
Message:
Logged In: YES
user_id=21627
Ok. Can you try to find out why distutils fails to use the
-R/-rpath option?
----------------------------------------------------------------------
Comment By: Zooko O'Whielacronx (zooko)
Date: 2003-07-22 21:02
Message:
Logged In: YES
user_id=52562
Okay, I've tried these. -Wl,verbose tells me, as I expected:
attempt to open /usr/local/stow/python-g/lib/libdb-4.1.so failed
attempt to open /usr/local/stow/python-g/lib/libdb-4.1.a failed
attempt to open /usr/local/lib/libdb-4.1.so succeeded
-ldb-4.1 (/usr/local/lib/libdb-4.1.so)
nm tells me, as expected, that db_create is present:
MAIL pion:~$ nm /usr/local/lib/libdb-4.1.so | grep db_create
0001a554 T __bam_db_create
000783cc T __ham_db_create
000a5fe0 T __qam_db_create
000492c8 T db_create
Adding /usr/local/lib to my /etc/ld.so.conf and running
ldconfig *did* fix it.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2003-07-22 20:41
Message:
Logged In: YES
user_id=21627
Please collect the following information:
1. Invoke the linker line with -Wl,--verbose (manually), to
find out the path it uses for the -ldb-4.1 command line
option. In particular, find out whether it uses a shared or
static library (.so or .a)
2. Perform nm on that library|grep db_create
The symbol really should be there; it is on all copies of
-ldb-something that I can get hold of. If it is not in your
copy, you somehow messed up the BerkeleyDB build.
----------------------------------------------------------------------
Comment By: Barry A. Warsaw (bwarsaw)
Date: 2003-07-22 20:40
Message:
Logged In: YES
user_id=12800
I'm betting that _bsddb couldn't be imported because the
runtime location of the library couldn't be found. I
thought at one time we were adding the proper -R flag to get
that compiled in, but it doesn't look like that's getting
added for you.
You could try adding /usr/local/BerkeleyDB.4.1/lib to your
/etc/ld.so.conf file and run ldconfig. If that "fixes" it,
then we should try to figure out why setup.py isn't adding
-R/usr/local/BerkeleyDB.4.1/lib to the link line.
You can also try moving
build/lib.linux-i686-2.3/_bsddb.so.failed back to _bsddb.so
and doing an "import _bsddb". You'll get more information
about why the import failed.
----------------------------------------------------------------------
Comment By: Zooko O'Whielacronx (zooko)
Date: 2003-07-22 20:28
Message:
Logged In: YES
user_id=52562
I should mention that I installed the current bsddb4.1 from
sleepycat: db-4.1.25.tar.gz, and I just cvs up'ed Python a
few minutes ago.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=775850&group_id=5470