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

Hugh Sasse Staff Elec Eng hgs at dmu.ac.uk
Thu Apr 18 08:03:30 EDT 2002


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

> "P. Alejandro Lopez-Valencia" <dradul at yahoo.com> writes:
>
>
> > > 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.
> >
> > OK, but shouldn't this sort of information be in the configure script?

I wrote that, actually.
>
> No. Using -mimpure-text has undesirable side effects, such as making
> the text segment writable (which in turn means that the shared library
> won't be shared across address spaces).

OK, for that case I agree. I was thinking that the more arcane aspects
of this are just those that the human installer will not want to track
down themselves...
>
> There is only so much that configure can find out automatically. If
> you have a slightly broken system, or one that lacks certain features,
> you need to give explicit instructions to your tools.

Yes.  Does this mean that my Solaris2.7 system is broken, or is this a
problem with Solaris2.7 generally?   If the latter, then I believe that
configure should either fail in a more informative manner, or do
something about the problem, a belief based on suns being widely used.
If I could do the more constructive thing of providing a fix then I would.
>
> > But seriously, Solaris is quirky, but no one contributes the appropriate
> > patches to CVS... (I am not going to, I have other things to worry about
> > presently).
>
> Patches that propose to replace -shared with -G when using gcc will be
> rejected, as they are plain wrong. Patches that always add
> -mimpure-text will be rejected as the cause performance degradation
> for extension modules that don't need relocations in their text
> segment.

Agreed, patches that do the wrong thing should be avoided.
>
> > > 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.
> >
> > Wouldn't this make the memory image of all python programs much larger?

I wrote that line too...
>
> What are "all python programs"? There is only one Python
> executable.

All programs written in Python, which use the said executable,
regardless of whether they use all the modules or just some.

>
> If you are concerned about the memory consumption of python processes:
> Since Solaris uses demand-paged memory, code of extensions won't be
> loaded into memory until somebody touches the page that has the code,
> which usually won't happen until the module is imported.

OK, that is reassuring.
        [...]
>
> Regards,
> Martin
> --
> http://mail.python.org/mailman/listinfo/python-list
>
        Thank you,
        Hugh






More information about the Python-list mailing list