Python-2.2.1, Solaris7, make test fails...

Hugh Sasse Staff Elec Eng hgs at dmu.ac.uk
Wed Apr 17 13:54:36 EDT 2002


On 17 Apr 2002, Martin v. [iso-8859-1] Löwis wrote:

> Hugh Sasse Staff Elec Eng <hgs at dmu.ac.uk> writes:
>
> > WARNING: removing "math" since importing it failed
> >         [...]
>
> > So even building statically doesn't work.
>
> You did not build statically. Instead, all extension modules are build
> by setup.py now.

I left *shared* commented out.  So that was not enough, and neither was
*static* apparently.
>
> It would be crucial to understand *why* the imports fail. For that, it
> would be crucial to perform the following actions:

OK, back to the complete beginning, (make distclean; configure)
not touching Modules/Setup at all.
I collect the commnands and re-invoke them by hand ...
>
> 1. Re-invoke the commands that are used to build the math module
>    manually (without invoking make; just invoking the compiler)
>
> 2. Invoke ./python
>
> 3. 'import math'
>
> 4. Report the errors you get when invoking math that way

Script started on Wed 17 Apr 2002 18:32:26 BST
neelix hgs 11 %> gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I. -I/home/hgs/Python-2.2.1/./Include -I/usr/local/include -IInclude -c /home/hgs/Python-2.2.1/Modules/mathmodule.c -o build/temp.solaris-2.7-sun4u-2.2/mathmodule.o
neelix hgs 12 %> gcc -shared build/temp.solaris-2.7-sun4u-2.2/mathmodule.o -L/usr/local/lib -lm -o build/lib.solaris-2.7-sun4u-2.2/math.so
neelix hgs 13 %> ./python
Python 2.2.1 (#1, Apr 17 2002, 17:39:20)
[GCC 2.95.3 20010315 (release)] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: ld.so.1: ./python: fatal: relocation error: file /home/hgs/Python-2.2.1/build/lib.solaris-2.7-sun4u-2.2/math.so: symbol PyExc_OverflowError: referenced symbol not found
>>>
neelix hgs 14 %> exit
neelix hgs 15 %>
script done on Wed 17 Apr 2002 18:43:06 BST
>
> 5. Report the command line used to link python.
Script started on Wed Apr 17 17:31:21 2002
neelix hgs 11 %> gmake
        [...]
ranlib libpython2.2.a
gcc   -o python \
		Modules/python.o \
		libpython2.2.a -lsocket -lnsl -ldl  -lpthread -lthread   -lm
case [....]
>
> Regards,
> Martin
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
        Thank you,
        Hugh






More information about the Python-list mailing list