On Tue, 06 Mar 2012 11:04:36 +0200
Lemon Lime <[email protected]> wrote:

> Without the sed, I get this error message at the end when running "make":
> 
> Failed to build these modules:
> dbm
> 
> This is how the "dbm" module is compiled:
> 
> gcc -pthread -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 
> -Wall -Wstrict-prototypes -DHAVE_NDBM_H -I. -IInclude -I./Include 
> -I/pkg/build/Python-2.7.2/Include -I/pkg/build/Python-2.7.2 -c 
> /pkg/build/Python-2.7.2/Modules/dbmmodule.c -o 
> build/temp.linux-i686-2.7/pkg/build/Python-2.7.2/Modules/dbmmodule.o
> gcc -pthread -shared 
> build/temp.linux-i686-2.7/pkg/build/Python-2.7.2/Modules/dbmmodule.o -L. 
> -lpython2.7 -o build/lib.linux-i686-2.7/dbm.so
> *** WARNING: renaming "dbm" since importing it failed: 
> build/lib.linux-i686-2.7/dbm.so: undefined symbol: dbm_nextkey
> 
> With the sed, "-lgdbm -lgdbm_compat" is added when linking the module,
> and I don't get the linker error or the error message at the end of the
> build.
> 
> I have installed all packages in LFS except for udev and vim, and from
> BLFS I have installed pciutils, libusb, usbutils, gperf, attr, acl,
> libffi, PCRE, and Berkeley DB. Maybe I need to install some other
> package to make it work?

No, I think you're right, the sed is correct, mea culpa, I'll put it
back on the python2 page.
Many thanks for your email, particularly the section of code above
showing the error. It led me to read Python-2.7.2/Modules/dbmmodule.c.
Long story short, I was still using gdbm-1.8.3 which doesn't
install /usr/include/ndbm.h (it's hard to keep everything up to date).
Without /usr/include/ndbm.h the sed had no effect, Python can't compile
the dbm module. Now I've installed gdbm-1.10 I can see that the sed is
needed to compile the dbm python module.

Andy
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to