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

Martin v. Löwis loewis at informatik.hu-berlin.de
Thu Apr 18 07:12:00 EDT 2002


"P. Alejandro Lopez-Valencia" <dradul at yahoo.com> writes:

> But binary output is not 100% compatible with system libraries. If you
> use the native linker and assembler, the code will be compatible. This
> has been considered as "God given truth" in the sun-managers list for
> more than 10 years (since I first subscribed). 

That is unfortunate, since the truth has changed over the
years. Certain binutils releases don't work correctly on certain
releases of Solaris; later binutils releases have been corrected.

Likewise, certain Solaris versions contain bugs that only show up when
used with gcc; both in Solaris /usr/ccs/bin/as and /usr/ccs/bin/ld.
Furthermore, Solaris (in all versions) is missing features that make
GNU ld superior to /usr/ccs/bin/ld for certain applications.

Hence, on the gcc list, the "God given truth" for the last five years
is that gcc is best used with a recent binutils release.

> > Actually, you *can* talk the Solaris linker to incorporate non-PIC
> > text into a shared library. For that, it will make the text segment
> > writable. The -mimpure-text option of gcc triggers that feature.
> 
> And open a full can of worms. Why hack the linker flags when you can
> impose yourself some discipline in your administration tasks and
> make life easier in the future? :)

Because /usr/ccs/bin/ld fails to link the extension otherwise. It's a
work-around, but your choices are to either have the extension
available, or not to be able to use the extension.

> BTW, this advice of yours does apply to the curses modules under
> Solaris, as they are compiled as non-PIC code.

Can you elaborate? /usr/lib/libcurses.so is PIC enough for me...

> > If you link static libraries into Python, I recommend to make the
> > modules that use them also static. Then you don't need PIC code for
> > those.
> 
> And still they won't work. As is the case of the curses modules and the
> readline modules in 2.1 and 2.2...

This is not true. If you compile both curses and readline as static
modules, it is irrelevant whether the libraries themselves are
available as static or shared libraries - either setup works just fine.

To compile a module as static, you edit Modules/Setup appropriately
before making Python.

Regards,
Martin



More information about the Python-list mailing list