Summary: | python failed, load_dynamic problem | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | erik johnson <ebjohnso> |
Component: | Current packages | Assignee: | Python Gentoo Team <python> |
Status: | RESOLVED DUPLICATE | ||
Severity: | blocker | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
python emerge log
The second log file Third log file config.log |
Description
erik johnson
2006-03-19 15:40:47 UTC
There is a python on your system that does not support .so extension modules. This may not be the "normal" system python though: the backtrace you posted contains /root/Python-2.2.3/ which is (a) ancient and (b) not supposed to be picked up by an attempt to build python 2.4.2. Does moving that out of the way fix the attempt to emerge? If it does not, what does the following give you: python -c "import os,string,types,signal,fcntl,errno,time" (that's the first couple of portage imports). Also, you forgot to paste emerge --info as instructed by the bug report form. Please provide that as well. emerge --info !!! Failed to complete python imports. There are internal modules for !!! python and failure here indicates that you have a problem with python !!! itself and thus portage is not able to continue processing. !!! You might consider starting python with verbose flags to see what has !!! gone wrong. Here is the information we got for this exception: No module named fcntl When I try: python -c "import os,string,types,signal,fcntl,errno,time" The following results: Traceback (most recent call last): File "<string>", line 1, in ? ImportError: No module named fcntl I have been trying to fix this all day, and I think there may be something going on with the dynamic loading of modules. Sorry, should have realised you need portage working to provide emerge --info. It's late... Can you run python -v -c "import os,string,types,signal,fcntl" and provide the output? Also, what does "which python" give? Thanks for checking this out. I miss Portage. Here are the commands your requested: python -v -c "import os,string,types,signal,fcntl" # installing zipimport hook import zipimport # builtin # installed zipimport hook # /usr/lib/python2.4/site.pyc matches /usr/lib/python2.4/site.py import site # precompiled from /usr/lib/python2.4/site.pyc # /usr/lib/python2.4/os.pyc matches /usr/lib/python2.4/os.py import os # precompiled from /usr/lib/python2.4/os.pyc import posix # builtin # /usr/lib/python2.4/posixpath.pyc matches /usr/lib/python2.4/posixpath.py import posixpath # precompiled from /usr/lib/python2.4/posixpath.pyc # /usr/lib/python2.4/stat.pyc matches /usr/lib/python2.4/stat.py import stat # precompiled from /usr/lib/python2.4/stat.pyc # /usr/lib/python2.4/UserDict.pyc matches /usr/lib/python2.4/UserDict.py import UserDict # precompiled from /usr/lib/python2.4/UserDict.pyc # /usr/lib/python2.4/copy_reg.pyc matches /usr/lib/python2.4/copy_reg.py import copy_reg # precompiled from /usr/lib/python2.4/copy_reg.pyc # /usr/lib/python2.4/types.pyc matches /usr/lib/python2.4/types.py import types # precompiled from /usr/lib/python2.4/types.pyc # /usr/lib/python2.4/warnings.pyc matches /usr/lib/python2.4/warnings.py import warnings # precompiled from /usr/lib/python2.4/warnings.pyc # /usr/lib/python2.4/linecache.pyc matches /usr/lib/python2.4/linecache.py import linecache # precompiled from /usr/lib/python2.4/linecache.pyc import encodings # directory /usr/lib/python2.4/encodings # /usr/lib/python2.4/encodings/__init__.pyc matches /usr/lib/python2.4/encodings/__init__.py import encodings # precompiled from /usr/lib/python2.4/encodings/__init__.pyc # /usr/lib/python2.4/codecs.pyc matches /usr/lib/python2.4/codecs.py import codecs # precompiled from /usr/lib/python2.4/codecs.pyc import _codecs # builtin # /usr/lib/python2.4/encodings/aliases.pyc matches /usr/lib/python2.4/encodings/aliases.py import encodings.aliases # precompiled from /usr/lib/python2.4/encodings/aliases.pyc # /usr/lib/python2.4/encodings/ascii.pyc matches /usr/lib/python2.4/encodings/ascii.py import encodings.ascii # precompiled from /usr/lib/python2.4/encodings/ascii.pyc Python 2.4.2 (#1, Mar 19 2006, 09:17:21) [GCC 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7. on linux2 Type "help", "copyright", "credits" or "license" for more information. # /usr/lib/python2.4/string.pyc matches /usr/lib/python2.4/string.py import string # precompiled from /usr/lib/python2.4/string.pyc # /usr/lib/python2.4/re.pyc matches /usr/lib/python2.4/re.py import re # precompiled from /usr/lib/python2.4/re.pyc # /usr/lib/python2.4/sre.pyc matches /usr/lib/python2.4/sre.py import sre # precompiled from /usr/lib/python2.4/sre.pyc # /usr/lib/python2.4/sre_compile.pyc matches /usr/lib/python2.4/sre_compile.py import sre_compile # precompiled from /usr/lib/python2.4/sre_compile.pyc import _sre # builtin # /usr/lib/python2.4/sre_constants.pyc matches /usr/lib/python2.4/sre_constants.py import sre_constants # precompiled from /usr/lib/python2.4/sre_constants.pyc # /usr/lib/python2.4/sre_parse.pyc matches /usr/lib/python2.4/sre_parse.py import sre_parse # precompiled from /usr/lib/python2.4/sre_parse.pyc Traceback (most recent call last): File "<string>", line 1, in ? ImportError: No module named fcntl # clear __builtin__._ # clear sys.path # clear sys.argv # clear sys.ps1 # clear sys.ps2 # clear sys.exitfunc # clear sys.exc_type # clear sys.exc_value # clear sys.exc_traceback # clear sys.last_type # clear sys.last_value # clear sys.last_traceback # clear sys.path_hooks # clear sys.path_importer_cache # clear sys.meta_path # restore sys.stdin # restore sys.stdout # restore sys.stderr # cleanup __main__ # cleanup[1] site # cleanup[1] encodings # cleanup[1] sre_constants # cleanup[1] _codecs # cleanup[1] zipimport # cleanup[1] string # cleanup[1] warnings # cleanup[1] encodings.ascii # cleanup[1] codecs # cleanup[1] types # cleanup[1] sre # cleanup[1] signal # cleanup[1] linecache # cleanup[1] posix # cleanup[1] encodings.aliases # cleanup[1] exceptions # cleanup[1] sre_parse # cleanup[1] sre_compile # cleanup[1] _sre # cleanup[1] re # cleanup[2] copy_reg # cleanup[2] posixpath # cleanup[2] os.path # cleanup[2] stat # cleanup[2] UserDict # cleanup[2] os # cleanup sys # cleanup __builtin__ # cleanup ints: 9 unfreed ints in 1 out of 4 blocks # cleanup floats which python /usr/bin/python Ok, so it seems to be the "normal" system python that is missing dlopen support, not some other python that's getting picked up. It is probably best to grab a binary python tar from http://dev.gentoo.org/~avenj/bins/ (README there has installation instructions) then try to merge python like this: PORT_LOGDIR=/var/log/portage FEATURES=test python2.3 emerge -va python (create /var/log/portage if it does not exist or use a different dir). If this produces another malfunctioning python provide the generated logfile. First I ran this command as PORT_LOGDIR=/var/log/portage FEATURES=test python2.3 emerge -va python but it simply opened a python session, so I ran with quotes and got the following : PORT_LOGDIR=/var/log/portage FEATURES="test python2.3" emerge -va python !!! Failed to complete python imports. There are internal modules for !!! python and failure here indicates that you have a problem with python !!! itself and thus portage is not able to continue processing. !!! You might consider starting python with verbose flags to see what has !!! gone wrong. Here is the information we got for this exception: No module named fcntl Unfortunately, there was no log file generated in either instance. Did I do this wrong? Bah, my command was wrong, should be: PORT_LOGDIR=/var/log/portage FEATURES=test python2.3 /usr/bin/emerge -va python Thank you for the help with this problem. I got portage to work again by doing the following cd /usr/bin ln -sf python2.3 python However, after running emerge python Portage breaks again with the same error message as before. I can replicate this more if it is desired Here is the emerge --info Portage 2.0.54 (default-linux/x86/2005.1, gcc-3.3.5-20050130, glibc-2.3.4.20040808-r1, 2.6.7-gentoo-r8 i686) ================================================================= System uname: 2.6.7-gentoo-r8 i686 Pentium III (Katmai) Gentoo Base System version 1.4.16 distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] dev-lang/python: 2.3.4, 2.4.2-r1 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r1 sys-devel/libtool: 1.4.3-r4, 1.5.18-r1 virtual/os-headers: 2.4.21-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -fpic -march=pentium3" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/grass60/etc /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -fpic -march=pentium3" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distcc distlocks sandbox sfperms" GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://mirror.tucdemonic.org/gentoo/ http://gentoo.osuosl.org/ ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X acl alsa apache2 apm arts audiofile avi berkdb bitmap-fonts bonobo bzip2 cdr crypt cups curl directfb dri eds emboss encode esd ethereal exif expat f77 fam flac foomaticdb fortran gd gdbm gif glut gnome gpm gstreamer gtk gtk2 gtkhtml guile idn imagemagick imlib ipv6 jack java jpeg junit kde lcms ldap libg++ libwww lua mad mhash mikmod mng motif mp3 mpeg mysql ncurses nls objc odbc ogg oggvorbis opengl oss pam pcre pdflib perl php png postgres python qt quicktime readline recode samba sdl slang spell sqlite ssl svga tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts vorbis xml xml2 xmms xv xvid zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY Can you provide a build log of python? "PORT_LOGDIR=/var/log/portage emerge -va python" should produce one in /var/log/portage (create the dir if it does not exist). Created attachment 82696 [details]
python emerge log
There were three log files. This was the largest.
Created attachment 82698 [details]
The second log file
Created attachment 82699 [details]
Third log file
checking for dlopen in -ldl... no That should definitely be a "yes". Can you also provide /var/tmp/portage/python-2.4.2/work/Python-2.4.2/config.log? I do not have the config.log file My /var/temp/portage/Python-2.4.2-r1 directoy only has temp listed as a directory. Abort the emerge (of python) after the configure stage finishes or run "ebuild /usr/portage/dev-lang/python/python-2.4.2.ebuild clean unpack compile" and you should have that file. Created attachment 82815 [details]
config.log
Thanks for the patience
Here is the log file
No problem, and thanks for your patience in providing tons of data on this problem :) So, the config.log says (apologies for the wrapping): configure:10553: i686-pc-linux-gnu-gcc -o conftest -O3 -fpic -march=pentium3 conftest.c -ldl >&5 /var/tmp/portage/python-2.4.2/temp/cc2dHRTK.o(.text+0x18): In function `main': : warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /mnt/hdb3/usr/i686-pc-linux-gnu/gcc-bin/3.3.5-20050130/../../../lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../libdl.a(dlerror.o)(.text+0x26d): In function `_dlerror_run': : undefined reference to `_dl_catch_error' collect2: ld returned 1 exit status Which isn't right: it should not be picking up a libdl.a, it should pick up libdl.so. Most likely /usr/lib/libdl.so to be more precise. So next is: Does /usr/lib/libdl.so or /lib/libdl.so exist? What are they? Here /usr/lib/libdl.so is a symlink to ../../lib/libdl.so.2 (and there is no /lib/libdl.so) What is the output of gcc -print-search-dirs? The libdl.a it picks up now is /mnt/hdb3/usr/lib/libdl.a and I don't think /mnt/hdb3/usr/lib/ is supposed to be on the library search path. And (probably) unrelated, but why do you have -fpic in CFLAGS? That's probably not a good idea. Here is the output gcc -print-search-dirs install: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/ programs: =/mnt/hdb3/usr/i686-pc-linux-gnu/gcc-bin/3.3.5-20050130/../../../lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/:/mnt/hdb3/usr/i686-pc-linux-gnu/gcc-bin/3.3.5-20050130/../../../lib/gcc-lib/:/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/:/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/:/usr/lib/gcc-lib/i686-pc-linux-gnu/:/usr/lib/gcc/i686-pc-linux-gnu/3.3.5-20050130/:/usr/lib/gcc/i686-pc-linux-gnu/:/mnt/hdb3/usr/i686-pc-linux-gnu/gcc-bin/3.3.5-20050130/../../../lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../../i686-pc-linux-gnu/bin/i686-pc-linux-gnu/3.3.5-20050130/:/mnt/hdb3/usr/i686-pc-linux-gnu/gcc-bin/3.3.5-20050130/../../../lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../../i686-pc-linux-gnu/bin/:/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../../i686-pc-linux-gnu/bin/i686-pc-linux-gnu/3.3.5-20050130/:/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../../i686-pc-linux-gnu/bin/ libraries: =/mnt/hdb3/usr/i686-pc-linux-gnu/gcc-bin/3.3.5-20050130/../../../lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/:/mnt/hdb3/usr/i686-pc-linux-gnu/gcc-bin/3.3.5-20050130/../../../lib/gcc-lib/:/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/:/usr/lib/gcc/i686-pc-linux-gnu/3.3.5-20050130/:/mnt/hdb3/usr/i686-pc-linux-gnu/gcc-bin/3.3.5-20050130/../../../lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../../i686-pc-linux-gnu/lib/i686-pc-linux-gnu/3.3.5-20050130/:/mnt/hdb3/usr/i686-pc-linux-gnu/gcc-bin/3.3.5-20050130/../../../lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../../i686-pc-linux-gnu/lib/:/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../../i686-pc-linux-gnu/lib/i686-pc-linux-gnu/3.3.5-20050130/:/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../../i686-pc-linux-gnu/lib/:/mnt/hdb3/usr/i686-pc-linux-gnu/gcc-bin/3.3.5-20050130/../../../lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../i686-pc-linux-gnu/3.3.5-20050130/:/mnt/hdb3/usr/i686-pc-linux-gnu/gcc-bin/3.3.5-20050130/../../../lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../:/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../i686-pc-linux-gnu/3.3.5-20050130/:/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../:/lib/i686-pc-linux-gnu/3.3.5-20050130/:/lib/:/usr/lib/i686-pc-linux-gnu/3.3.5-20050130/:/usr/lib/ I also got rid of the -fpic flag; I added that yesterday out of desperation. normpathed version of your library search path: ['/mnt/hdb3/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130', '/mnt/hdb3/usr/lib/gcc-lib', '/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130', '/usr/lib/gcc/i686-pc-linux-gnu/3.3.5-20050130', '/mnt/hdb3/usr/i686-pc-linux-gnu/lib/i686-pc-linux-gnu/3.3.5-20050130', '/mnt/hdb3/usr/i686-pc-linux-gnu/lib', '/usr/i686-pc-linux-gnu/lib/i686-pc-linux-gnu/3.3.5-20050130', '/usr/i686-pc-linux-gnu/lib', '/mnt/hdb3/usr/lib/i686-pc-linux-gnu/3.3.5-20050130', '/mnt/hdb3/usr/lib', '/usr/lib/i686-pc-linux-gnu/3.3.5-20050130', '/usr/lib', '/lib/i686-pc-linux-gnu/3.3.5-20050130', '/lib', '/usr/lib/i686-pc-linux-gnu/3.3.5-20050130', '/usr/lib'] Any idea how all those /mnt/hdb3 references got there? What *is* /mnt/hdb3? Does umounting it help (assuming it's not supposed to be needed)? Do you have any libdl.so files anywhere and what are they (symlinks? to where?)? Nice, it looks as though this may be the problem. First off, the /mnt/hdb3 is is link going to second hardrive, where I copied the /usr folder to. I did this becuase I have my main installation on an 8 gig drive and needed more space. Unfortunately, I also have the /home folder on this same drive so I do not think that I can update this in /etc/fstab. >locate libdl.so /lib/libdl.so.2 /mnt/hdb3/usr/lib/libdl.so >ls -l /mnt/hdb3/usr/lib/libdl* -rw-r--r-- 1 root root 11516 Dec 8 2004 libdl.a lrwxrwxrwx 1 root root 20 Mar 21 10:38 libdl.so -> ../../lib/libdl.so.2 So, it does not look at if I have libdl.so anywhere. Followed this link all the way back..
>ls -l libdl*
libdl-2.3.5.so
libdl.so.2 -> libdl-2.3.5.so
So let me see if I understood everything correctly: /mnt/hdb3 contains /mnt/hdb3/home and /mnt/hdb3/usr, nothing else. /usr is a symlink to /mnt/hdb3/usr, /home is a symlink to /mnt/hdb3/home. /mnt/hdb3/usr/lib/libdl.so is a symlink to ../../lib/libdl.so.2, but since /mnt/hdb3/lib does not exist this symlink is broken. /lib/libdl.so.2 does exist (symlink to libdl-2.3.5.so) so if all this happened on a "real" /usr things would work. If the above is accurate I think you should switch to using mount --bind for getting /usr/ from hdb3 (see also bug 112413) and probably remerge gcc to get the search paths fixed up. Thanks. I will give this a shot. Okay, so I used the mount --bind command and reemerged gcc However, the links in the /usr/lib directory were still pointing to the /mnt... So, I attempted to manually update my links and ended up deleting the file libdl.2.3.5.so My system died, and I managed to get an old version of libdl from another box that I have running libdl.2.3.2.so However, when I try to run emerge now, I get the following error: /usr/bin/python: relocation error: /lib/libdl.so.2: symbol _dl_catch_error, version GLIBC_PRIVATE not defined in file ld-linux.so.2 with link time reference Clearly, I made a major gaffe. Is there anyway to fix this. Thanks for helping me get this issue resolved, it is sooo close! (In reply to comment #25) > Okay, so I used the mount --bind command > and reemerged gcc > > However, the links in the /usr/lib directory were still pointing to the > /mnt... "Still"? As far as I understood the links in /usr/lib were pointing to ../../lib, which should work? The reason I asked for a gcc remerge is /mnt/hdb3 was listed in gcc -print-search-dirs (it should not be in there). > So, I attempted to manually update my links and ended up deleting the file > > libdl.2.3.5.so Ick! > My system died, and I managed to get an old version of libdl from another box > that I have running > > libdl.2.3.2.so > > However, when I try to run emerge now, I get the following error: > > /usr/bin/python: relocation error: /lib/libdl.so.2: symbol _dl_catch_error, > version GLIBC_PRIVATE not defined in file ld-linux.so.2 with link time > reference You'll hit that on just about anything using libdl most likely. Grabbing a binary glibc from dev.gentoo.org/~avenj/bins might help to get things going again. Just to throw in my two cents... I had a similar problem after emerging python earlier. My usr directory was linked to a separate mount point. Binding instead of linking solved the problem for me. I'm going to close this as a duplicate of bug 112413 because that seems to be the actual problem here, reopen if you disagree. *** This bug has been marked as a duplicate of 112413 *** |