Bug 129019 - mod_python.so to dynamically link against libpython2.3.so
mod_python.so to dynamically link against libpython2.3.so
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: mod_python (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
: FutureFeature
Depends On:
Blocks: FC4Blocker
  Show dependency treegraph
 
Reported: 2004-08-02 20:33 EDT by Blair Zajac
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 3.1.3-8
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-02-01 11:25:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Blair Zajac 2004-08-02 20:33:54 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7)
Gecko/20040707 Firefox/0.9.2

Description of problem:
The latest RPM for python builds python with a shared library in
/usr/lib/libpython2.3.so.1.0.  However, rebuilding mod_python
against this new python RPM doesn't have the mod_python.so 
automatically dynamically link against libpython2.3.so because the
link step is:

/bin/sh /usr/lib/apr/build/libtool --silent --mode=link gcc -o 
mod_python.la
-I/export/home1/blair/RPMs/build/BUILD/mod_python-3.1.3/src/include 
-I/usr/include/httpd -I/usr/include/python2.3 -rpath 
/usr/lib/httpd/modules -module -avoid-version hlistobject.lo hlist.lo
filterobject.lo connobject.lo serverobject.lo util.lo tableobject.lo
requestobject.lo _apachemodule.lo mod_python.lo
-L/usr/lib/python2.3/config -Xlinker -export-dynamic 
-L/usr/kerberos/lib -lm -lpython2.3 -lpthread -ldl -lutil -lm

And in /usr/lib/python2.3/config there is a static libpython2.3.a,
which is picked up before the libpython2.3.so in /usr/lib because
of the -L/usr/lib/python2.3/config.

This minor patch to the spec file gets mod_python to dynamically
link against libpython2.3.so by adding /usr/lib before
/usr/lib/python2.3/config.  There may be a better way of doing this,
but it does the trick.

% diff -u mod_python.spec.FCS mod_python.spec
--- mod_python.spec.FCS 2004-07-12 23:50:34.000000000 -0700
+++ mod_python.spec     2004-08-02 17:25:11.110915509 -0700
@@ -30,6 +30,7 @@
 %patch10 -p1 -b .lib64

 %build
+export LDFLAGS=-L/usr/lib
 %configure --with-apxs=%{_sbindir}/apxs
 make %{?_smp_mflags}

Blair


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.
2.
3.
    

Additional info:
Comment 1 Joe Orton 2005-02-01 11:25:26 EST
That method would be wrong, but I've done this in a different way for
Raw Hide.   Thanks for the report.

Note You need to log in before you can comment on or make changes to this bug.