Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 90660 - python-2.3.5: No module named fcntl
Summary: python-2.3.5: No module named fcntl
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High blocker (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
: 144188 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-04-27 14:28 UTC by Thomas Bettler
Modified: 2007-05-07 07:46 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log for python 2.3.5 (2557-python-2.3.5.log,414.97 KB, text/plain)
2005-05-12 18:57 UTC, Brian Harring (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Bettler 2005-04-27 14:28:07 UTC
I just upgraded today to a new python-2.3.5 (previous state was updated yesterday; python-2.3.4-r1)

Now python seems broken, driving me inable to use portage or whatever.

Reproducible: Always
Steps to Reproduce:
# emerge -p portage
Actual Results:  
!!! 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 no 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 

Expected Results:  
nice and friendly emerge as ever  

Ask for everything you need to know. Since I'm no developer, I don't even know where to start 
looking...
Comment 1 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-04-27 16:38:03 UTC
I believe we discussed this on IRC with dsd_.

From what I recall the python install was horked ( fnctl.so ) and we suggested a reinstall.  Try a quickpkg from http://dev.gentoo.org/~avenj/ or if you use buildpkg a quickpkg of an old python version and re-emerge python.  As to why it broke.... :)....:(....who knows ;)
Comment 2 Thomas Bettler 2005-04-27 16:41:21 UTC
Yes, works now for me.

I really can't imaging how it was broken. But it's fixed now, and doesn't seem to reapper, that makes me glad again.
Comment 3 Brian Harring (RETIRED) gentoo-dev 2005-05-12 16:43:28 UTC
I know how to correct it (binpkg), I'm not liking having hit this twice however :)
Comment 4 Brian Harring (RETIRED) gentoo-dev 2005-05-12 17:42:35 UTC
hokay.  so, poking about with imp
imp.get_suffixes() doesn't even report module.so, nor is a load_dynamic function avaiable... best I can figure is the bugger somehow compiled itself w/out shared support, which doesn't add up.
Comment 5 Brian Harring (RETIRED) gentoo-dev 2005-05-12 18:00:14 UTC
HAVE_DYNAMIC_LOADING is getting flipped off somehow.
Comment 6 Brian Harring (RETIRED) gentoo-dev 2005-05-12 18:57:59 UTC
Created attachment 58789 [details]
build log for python 2.3.5

Entire build log from the corrupted build that lacked dynload.	what's
interesting is that DYNLOADFILE is properly detected, exempting trailing
whitespace possibility...
Comment 7 Alastair Tse (RETIRED) gentoo-dev 2005-05-13 05:54:21 UTC
very interesting. so in configure, at first it says :

checking CFLAGSFORSHARED... $(CCSHARED)
checking SHLIBS... $(LIBS)
checking for dlopen in -ldl... (cached) yes
checking for shl_load in -ldld... (cached) no

then further on, just before it sets HAVE_DYNAMIC_LOADING, it says:

checking for --with-sgi-dl... no
checking for --with-dl-dld... no
checking for dlopen... (cached) no

however, on my box, both dlopen checks return yes. something funny is going on there, any chance you have the config.log from that build?
Comment 8 Thomas Bettler 2005-05-13 10:59:44 UTC
No, it's already gone...

I propose to close this bug, since it works for me now.
Comment 9 Brian Harring (RETIRED) gentoo-dev 2005-05-14 03:57:10 UTC
No config log for it, grabbed the build log after the fact.

Regarding the "close it now", yeah, you have a working python installation, and so do I.  In the meantime, when it _occurs_, it's *really* a pisser to get it working again.  Mind you this isn't an unstable ebuild, it's expected to be behaved...

Meanwhile, I'll root about (got better backups this time around) and see if I can trigger it again.
Comment 10 Phil White 2005-10-02 09:44:20 UTC
Hey, I've got one of these on my sparc32.

I wanted to install gentoo on it, so I dug up an old 1.4 livecd for sparc32, 
dropped it on there, and did the normal unpacking of a stage3 and building up.

After getting the kernel and silo on, I did an emerge -u world.  I gather it 
was after the emerge -u python that things went bad.  I tried reverting back to 
my old python packages (2.3.5-r2) and reunpacking my new one (2.4.1-r1), but 
nothing's helping out.

This bug is in like 5-6 places on google and no place has an answer =/
Whenever I emerge, I get the same "Failed to complete python imports...No 
module named fcntl" message.
Comment 11 erik johnson 2006-03-19 13:23:36 UTC
I got a similar error in 2.4.2, and when I tried to make 2.2.3, this is the output.

Traceback (most recent call last):
  File "./setup.py", line 816, in ?
    main()
  File "./setup.py", line 811, in main
    scripts = ['Tools/scripts/pydoc']
  File "/root/Python-2.2.3/Lib/distutils/core.py", line 138, in setup
    dist.run_commands()
  File "/root/Python-2.2.3/Lib/distutils/dist.py", line 902, in run_commands
    self.run_command(cmd)
  File "/root/Python-2.2.3/Lib/distutils/dist.py", line 922, in run_command
    cmd_obj.run()
  File "/root/Python-2.2.3/Lib/distutils/command/build.py", line 107, in run
    self.run_command(cmd_name)
  File "/root/Python-2.2.3/Lib/distutils/cmd.py", line 330, in run_command
    self.distribution.run_command(command)
  File "/root/Python-2.2.3/Lib/distutils/dist.py", line 922, in run_command
    cmd_obj.run()
  File "/root/Python-2.2.3/Lib/distutils/command/build_ext.py", line 256, in run
    self.build_extensions()
  File "./setup.py", line 147, in build_extensions
    build_ext.build_extensions(self)
  File "/root/Python-2.2.3/Lib/distutils/command/build_ext.py", line 383, in build_extensions
    self.build_extension(ext)
  File "./setup.py", line 174, in build_extension
    imp.load_dynamic(ext.name, ext_filename)
AttributeError: 'module' object has no attribute 'load_dynamic'
make: *** [sharedmods] Error 1
Comment 12 Benny Pedersen 2006-06-29 17:25:09 UTC
sh-3.1# emerge --sync
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]


!!! Failed to complete python imports. These 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

Traceback (most recent call last):
  File "/usr/bin/emerge", line 12, in ?
    import portage
  File "/usr/lib/portage/pym/portage.py", line 20, in ?
    import os,string,types,signal,fcntl,errno
ImportError: No module named fcntl


got this after emergein xorg-x11 with gave me errors about LAZY linked Xorg

will python downgrade to 2.3 help me here ?

2.4 does not work at moment :(
Comment 13 Marien Zwart (RETIRED) gentoo-dev 2006-07-01 04:23:47 UTC
Please provide the output of "python -v -c 'import fcntl'".
Comment 14 Alastair Tse (RETIRED) gentoo-dev 2006-09-02 04:47:46 UTC
*** Bug 144188 has been marked as a duplicate of this bug. ***
Comment 15 Bryan Østergaard (RETIRED) gentoo-dev 2007-05-07 07:46:47 UTC
I think this is fixed with 2.3.6-r1.