Bug 129019 - mod_python.so to dynamically link against libpython2.3.so
Summary: mod_python.so to dynamically link against libpython2.3.so
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: mod_python
Version: rawhide
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Joe Orton
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC4Blocker
TreeView+ depends on / blocked
 
Reported: 2004-08-03 00:33 UTC by Blair Zajac
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version: 3.1.3-8
Clone Of:
Environment:
Last Closed: 2005-02-01 16:25:26 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Blair Zajac 2004-08-03 00:33:54 UTC
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 16:25:26 UTC
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.