pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/48068: lang/python27 fails to build with `ImportError: No module named _sysconfigdata'

>Number:         48068
>Category:       pkg
>Synopsis:       lang/python27 fails to build with `ImportError: No module 
>named _sysconfigdata'
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 19 16:10:00 +0000 2013
>Originator:     LItvinov Sergey
>Release:        Ubuntu Linux
Linux acer 3.8.0-26-generic #38-Ubuntu SMP Mon Jun 17 21:43:33 UTC 2013 x86_64 
x86_64 x86_64 GNU/Linux
`bmake build' fails with the following error

===> Building for python27-2.7.5
--- sharedmods ---
Traceback (most recent call last):
  File "/home/vital303/pkgsrc/lang/python27/work/Python-2.7.5/Lib/", 
line 548, in <module>
  File "/home/vital303/pkgsrc/lang/python27/work/Python-2.7.5/Lib/", 
line 530, in main
    known_paths = addusersitepackages(known_paths)
  File "/home/vital303/pkgsrc/lang/python27/work/Python-2.7.5/Lib/", 
line 266, in addusersitepackages
    user_site = getusersitepackages()
  File "/home/vital303/pkgsrc/lang/python27/work/Python-2.7.5/Lib/", 
line 241, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/home/vital303/pkgsrc/lang/python27/work/Python-2.7.5/Lib/", 
line 231, in getuserbase
    USER_BASE = get_config_var('userbase')
"/home/vital303/pkgsrc/lang/python27/work/Python-2.7.5/Lib/", line 
516, in get_config_var
    return get_config_vars().get(name)
"/home/vital303/pkgsrc/lang/python27/work/Python-2.7.5/Lib/", line 
468, in get_config_vars
"/home/vital303/pkgsrc/lang/python27/work/Python-2.7.5/Lib/", line 
352, in _init_posix
    from _sysconfigdata import build_time_vars
ImportError: No module named _sysconfigdata
*** [sharedmods] Error code 1

bmake: stopped in /home/vital303/pkgsrc/lang/python27/work/Python-2.7.5
1 error

I think those reports are relevant ( was backported
to python2 from python3):
[Python 3.3] Most of Python's startup time is sysconfig
[Python 3.3] doesn't support multiple build configurations
[Python 3.3, 3.4] _sysconfigdata is generated in srcdir, not builddir

I copied 
cp ./work/Python-2.7.5/build/lib.linux-x86_64-2.7/ 
and did
bmake build

The build goes further but fails with the following error during installation

/usr/bin/install -c -o vital303 -g vital303 -m 755 ./Lib/plat-linux2/regen 
/usr/bin/install -c -o vital303 -g vital303 -m 644 ./LICENSE 
if test -d 
 then  /usr/bin/install -c -o vital303 -g vital303 -m 644 ./Modules/xxmodule.c  
 ;  fi
./python -E -Wi -tt 
  -d /home/vital303/netbsd/lib/python2.7 -f  -x 
Traceback (most recent call last):
 line 16, in <module>
    import struct
 line 1, in <module>
    from _struct import *
ImportError: No module named _struct
*** Error code 1

I found the following bug report
[Python 2.7] make install error: ImportError: No module named _struct

I can get the same error message if I do
./work/Python-2.7.5/python -c "import struct"
ImportError: No module named _struct

But if I copy python binary to another directory:
cp ./work/Python-2.7.5/python .
./python -c "import struct"
gives no error

If I revert `lang/python27' to python 2.7.4 installation goes without

`bmake build' in lang/python27

Home | Main Index | Thread Index | Old Index