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

P. Alejandro Lopez-Valencia dradul at yahoo.com
Tue Apr 16 11:02:50 EDT 2002


"Martin v. Löwis" <loewis at informatik.hu-berlin.de> escribió en el
mensaje news:j43cxwm1o4.fsf at informatik.hu-berlin.de...
> Hugh Sasse Staff Elec Eng <hgs at dmu.ac.uk> writes:
>
> > > But this is really strange; mathmodule.so must have imported at
some
> > > point, or setup.py would have deleted it...
> >
> > Hmm.  I don't know.  Anyway, here is the result of re-making the
> > Python, but not the make test, after removing that file...
> >
> > Script started on Mon Apr 15 13:57:01 2002
> > neelix hgs 1 %> gmake
> > gcc -shared  Modules/mathmodule.o   -o Modules/mathmodule.so
>
> That explains it: he has enabled mathmodule.c in the *shared* section
> of Setup.
>
> I recommend to build Python from original sources, in a fresh
> directory.

And while you are at it... You have not compiled python itself as PIC
code. No, gcc -shared *doesn't* work in Solaris unless you are using GNU
Binutils instead of the native linker and assembler, something *not
recommended at all*. Solaris' linker can't bild a dynamic loading
library/module using object code compiled in position dependent mode.

This means, that you need to have all external libraries compiled with
the -fPIC flag, even if they are static. Ahh! And make sure that you
give the linker the actual library paths you use with an -R flag, else
the dynamic loader won't find them and you'll have to use an explicit
LD_LIBRARY_PATH environment variable for each invocation invocation of
the internpreter.




More information about the Python-list mailing list