[issue9631] Python 2.7 installation issue for Linux gcc-4.1.0-3 (Fedora Core 5?)

2012-02-16 Thread miro ilias

miro ilias  added the comment:

Hi, 

with the fresh downloadable version of Python 2.7.2 I got the same error.


/usr/bin/install -c -m 644 ./Lib/curses/wrapper.py 
/home/ilias/bin/python_static/lib/python2.7/curses
/usr/bin/install -c -m 644 ./Lib/pydoc_data/__init__.py 
/home/ilias/bin/python_static/lib/python2.7/pydoc_data
/usr/bin/install -c -m 644 ./Lib/pydoc_data/topics.py 
/home/ilias/bin/python_static/lib/python2.7/pydoc_data
/usr/bin/install -c -m 644 ./Lib/plat-linux3/IN.py 
/home/ilias/bin/python_static/lib/python2.7/plat-linux3
/usr/bin/install -c ./Lib/plat-linux3/regen 
/home/ilias/bin/python_static/lib/python2.7/plat-linux3
/usr/bin/install -c -m 644 ./LICENSE 
/home/ilias/bin/python_static/lib/python2.7/LICENSE.txt
PYTHONPATH=/home/ilias/bin/python_static/lib/python2.7   \
./python -Wi -tt 
/home/ilias/bin/python_static/lib/python2.7/compileall.py \
-d /home/ilias/bin/python_static/lib/python2.7 -f \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
/home/ilias/bin/python_static/lib/python2.7
Traceback (most recent call last):
  File "/home/ilias/bin/python_static/lib/python2.7/compileall.py", line 16, in 

import struct
  File "/home/ilias/bin/python_static/lib/python2.7/struct.py", line 1, in 

from _struct import *
ImportError: No module named _struct
make: *** [libinstall] Chyba 1

--
nosy: +miro_ilias

___
Python tracker 
<http://bugs.python.org/issue9631>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9631] Python 2.7 installation issue for Linux gcc-4.1.0-3 (Fedora Core 5?)

2012-03-18 Thread miro ilias

miro ilias  added the comment:

Dear Space, 

On my Ubuntu 11.10 x86_64 Linux I have static python buildup prescription:
./configure LDFLAGS="-static -static-libgcc"  --disable-shared   
CPPFLAGS=-static --prefix=/home/ilias/bin/python_static

with *static* in Modules/Setup

but 'make' failes, getting errors like:

collect2: ld returned 1 exit status
/usr/bin/ld: error: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtbeginT.o: requires 
dynamic R_X86_64_32 reloc against '__DTOR_END__' which may overflow at runtime; 
recompile with -fPIC
collect2: ld returned 1 exit status
/usr/bin/ld: error: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtbeginT.o: requires 
dynamic R_X86_64_32 reloc against '__DTOR_END__' which may overflow at runtime; 
recompile with -fPIC
collect2: ld returned 1 exit status
.
.
.
/home/ilias/bin/python_static/Python-2.7.2/Modules/_ctypes/libffi/src/dlmalloc.c:
 In function ‘mmap_resize’:
/home/ilias/bin/python_static/Python-2.7.2/Modules/_ctypes/libffi/src/dlmalloc.c:3193:5:
 warning: implicit declaration of function ‘mremap’ 
[-Wimplicit-function-declaration]
/home/ilias/bin/python_static/Python-2.7.2/Modules/_ctypes/libffi/src/dlmalloc.c:3193:16:
 warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
/home/ilias/bin/python_static/Python-2.7.2/Modules/_ctypes/libffi/src/dlmalloc.c:
 In function ‘sys_trim’:
/home/ilias/bin/python_static/Python-2.7.2/Modules/_ctypes/libffi/src/dlmalloc.c:3612:62:
 warning: comparison between pointer and integer [enabled by default]
/usr/bin/ld: error: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtbeginT.o: requires 
dynamic R_X86_64_32 reloc against '__DTOR_END__' which may overflow at runtime; 
recompile with -fPIC
collect2: ld returned 1 exit status

Python build finished, but the necessary bits to build these modules were not 
found:
_bsddb _curses_curses_panel   
_sqlite3   _ssl   _tkinter
bsddb185   bz2dbm 
dl gdbm   imageop 
linuxaudiodev  ossaudiodevreadline
sunaudiodevzlib   
To find the necessary bits, look in setup.py in detect_modules() for the 
module's name.

Failed to build these modules:
_bisect_codecs_cn _codecs_hk  
_codecs_iso2022_codecs_jp _codecs_kr  
_codecs_tw _collections   _csv
_ctypes_ctypes_test   _elementtree
_functools _heapq _hotshot
_io_json  _locale 
_lsprof_md5   _multibytecodec 
_multiprocessing   _random_sha
_sha256_sha512_socket 
_struct_testcapi  array   
audioopbinascii   cmath   
cPicklecrypt  cStringIO   
datetime   fcntl  future_builtins 
grpitertools  math
mmap   nisoperator
parser pyexpatresource
select spwd   strop   
syslog termiostime
unicodedata 

Any help, please ?


From: Space Li [rep...@bugs.python.org]
Sent: Wednesday, February 29, 2012 2:49 AM
To: Ilias Miroslav
Subject: [issue9631] Python 2.7 installation issue for Linux gcc-4.1.0-3
(Fedora Core 5?)

Space Li  added the comment:

Hi,

I recently compiled Python 2.7.2 and got an ImportError on struct module during 
'make install'.

What I found working for me is just to 'make'. Before doing 'make install', 
copy the lib.linux-x directory in 'build' to {prefix}/lib/python2.7 and 
rename it as lib-dynload.

Then find something that looks like followings:
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST) -f \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
$(DESTDIR)$(LIBDEST)
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST) -f \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
$(DESTDIR)$(LIBDEST)
-PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST)/site-packages -f \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
-PYTHONPATH=$(DESTDIR)$(LIBDEST):$(DESTSHARED) $(RUNSHA