Compiling python 2.2.2 with gcc 3.2

Nadav Horesh nadavh at envision.co.il
Thu Oct 17 12:13:53 EDT 2002


>>I tried to compile python2.2.2 under RH 7.2 with gcc 3.2. I got weired
>> error messages from
>> incopatibility between "fpos_t" and "int", to obsoleteness of "tmpname".
>> 
>> Did anyone succeed?

>
>Instead of saying that the messages are weired, could you perhaps just
>quote them literally?
>
>Regards,
>Martin

You right, but I found also the solution:
I finally converged to the following error message:

c++  -Xlinker -export-dynamic -o python \
        Modules/python.o \
        libpython2.2.a -ldl  -lpthread -lutil   -lm  
/usr/bin/ld: Dwarf Error: Invalid or unhandled FORM value: 14.
libpython2.2.a(posixmodule.o): In function `posix_tmpnam':
/tmp/pytest1/Python-2.2.2/Modules/posixmodule.c:4505: the use of `tmpnam_r' is dangerous, better use `mkstemp'
libpython2.2.a(posixmodule.o): In function `posix_tempnam':
/tmp/pytest1/Python-2.2.2/Modules/posixmodule.c:4455: the use of `tempnam' is dangerous, better use `mkstemp'
collect2: ld returned 1 exit status
make: *** [python] Error 1

The problem was that I had to update the original binutils that came with
RH7.2 from version 2.11 to version 2.13 as required by gcc 3.2.

Two observations that I would like to get comments:
1. The file size of python2.2.2 compiled under RH7.2 gcc3.2 is about 3MB
   compared with 800K of the python2.2.1 from the python-site RPM. 
   I made the minary by the following steps.
   ./configure # without any options
   .. edited the Makefile to add "-s -march=pentium3 -msse" to the OPT vatiable
    make

    thats all.

2. The gcc3.2 I got, compiled from the source seems to be more stable than
   the one comes with Mandrake 9.0

  Nadav.






More information about the Python-list mailing list