Issue Details (XML | Word | Printable)

Key: MODPYTHON-186
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Graham Dumpleton
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
mod_python

Build process not using correct values from Python config Makefile.

Created: 27/Aug/06 05:48 AM   Updated: 06/Jan/08 03:16 AM
Return to search
Component/s: core
Affects Version/s: 3.3.x, 3.2.10
Fix Version/s: None

Time Tracking:
Not Specified


 Description  « Hide
As found by Justin Erenkrantz, the build process for mod_python is using LINKFORSHARED from the Python config Makefile. On Mac OS X though this results in a expansion of:

LDFLAGS= -Wl,-framework,Python -u __dummy -u _PyMac_Error -framework System
$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) -framework
CoreServices -framework Foundation -Wl,-F. -Wl,-F.

where PYTHONFRAMEWORKDIR, VERSION and PYTHONFRAMEWORK aren't defined at the point of expansion. Thus the compile executes with options:

.../libtool --silent --mode=link ccache gcc -o mod_python.la -rpath
.../httpd-trunk/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 -Wl,-framework,Python -u
__dummy -u _PyMac_Error -framework System /Versions// -framework CoreServices
-framework Foundation -Wl,-F. -Wl,-F. -lm -framework Python -ldl

Ie., '/Versions//' gets passed as an option.

So far this has been working without a problem, but looks like the version of gcc which has been supplied with version of XCode distributed around time of Apple WWDC in August 06 no longer will accept this and produces the error:

powerpc-apple-darwin8-gcc-4.0.1: /Versions//: No such file or directory

Last known version of gcc to accept it is:

gcc version 4.0.1 (Apple Computer, Inc. build 5341)

Version that no longer accepts it is:

gcc version 4.0.1 (Apple Computer, Inc. build 5363)

Suggestion was that LDSHARED should be used instead of LINKFORSHARED. Apparently Subversion had had to address similar problem so can learn from what they have done.

Should be fixed for 3.3 and back ported to 3.2.x or we are going to start getting a lot of complaints.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Graham Dumpleton added a comment - 21/Oct/06 12:41 AM
Defer fixing of this issue until have someone with the affected platform who can assist.

Graham Dumpleton added a comment - 14/Nov/06 11:17 PM
Someone has successfuly built mod_python on Mac OS X using:

  gcc version 4.0.1 (Apple Computer, Inc. build 5367)

Thus, may have been a problem with the particular persons setup, or some issue has been fixed in newer version of XCode.

bob pasker added a comment - 06/Jan/08 03:12 AM - edited
i am having the same problem on OS X 10.5 (leopard). if anyone has a work-around, I would love to hear it. please write me if you have any questions or suggestions. thanks

rbp% make

Compiling for DSO.

/usr/sbin/apxs -I/Users/rbp/Downloads/python stuff/mod_python-3.3.1/src/include -I/usr/include/apache2 -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/p\
ython2.5 -c mod_python.c _apachemodule.c requestobject.c tableobject.c util.c serverobject.c connobject.c filterobject.c hlist.c hlistobject.c finfoobject.c -Wl,-framework\
,Python -u _PyMac_Error -framework Python -Wl,-F. -lm -framework Python -ldl
Usage: apxs -g [-S <var>=<val>] -n <modname>
       apxs -q [-S <var>=<val>] <query> ...
       apxs -c [-S <var>=<val>] [-o <dsofile>] [-D <name>[=<value>]]
               [-I <incdir>] [-L <libdir>] [-l <libname>] [-Wc,<flags>]
               [-Wl,<flags>] [-p] <files> ...
       apxs -i [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...
       apxs -e [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...

rbp% gcc -v
Using built-in specs.
Target: powerpc-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program\
-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --program-prefix= --host=powerpc-apple\
-darwin9 --target=powerpc-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5465)

rbp% python -V
Python 2.5.1

rbp% httpd -v
httpd -v
Server version: Apache/2.2.6 (Unix)
Server built: Sep 23 2007 18:07:19