[Python-bugs-list] [ python-Bugs-589429 ] libpython.a with PIC objects

noreply@sourceforge.net noreply@sourceforge.net
Sat, 03 Aug 2002 04:05:10 -0700


Bugs item #589429, was opened at 2002-08-01 02:17
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=589429&group_id=5470

Category: Build
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Matthias Klose (doko)
Assigned to: Nobody/Anonymous (nobody)
Summary: libpython.a with PIC objects

Initial Comment:
when configuring with --enable-shared, the "static" 
library libpython.a is build with PIC-compiled objects.
Using the option --enable-shared builds a shared library 
in addition to the static library (with objects compiled 
without PIC).


----------------------------------------------------------------------

>Comment By: Martin v. L÷wis (loewis)
Date: 2002-08-03 13:05

Message:
Logged In: YES 
user_id=21627

I personally think that all the other packages are "wrong",
or perhaps address different usage scenarios:

If you have a PIC-compiled static library, you can link this
static library into other DSOs. Not having a PIC-compiled
library causes problems. 

E.g. on Solaris, people building Python extension modules
frequently find that they only have a static version of
libreadline or OpenSSL, which they then cannot integrate
into the readline or socket Python modules (because you need
PIC code for a DSO).

So, a PIC static library can support use cases that a
non-PIC static library cannot. The downside is that the PIC
library might be less efficient. User using --enable-shared
have already accepted less efficient code (since the shared
library is also PIC), so they should accept PIC code in the
static library as well.

In addition, not building non-PIC objects simplifies the
build process: you don't have to compile everything twice,
just because somebody may want non-PIC objects. If somebody
really requires non-PIC objects for reasons I cannot see,
they need to recompile Python separately.

----------------------------------------------------------------------

Comment By: Matthias Klose (doko)
Date: 2002-08-02 20:24

Message:
Logged In: YES 
user_id=60903

I expect (as mostly known from other GNU libraries on Linux
systems), that I get an additional library with
--enable-shared, not a changed static library.
Currently the option really is
--enable-shared-and-build-static-with-pic.


----------------------------------------------------------------------

Comment By: Martin v. L÷wis (loewis)
Date: 2002-08-02 15:49

Message:
Logged In: YES 
user_id=21627

What is the bug here?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=589429&group_id=5470