Graham Dumpleton wrote: > > On 03/12/2006, at 1:41 PM, Eric Brunson wrote: > >>> Can you explain properly what that one line is achieving. >> >> The change is causing mod_python to be linked with the same libs that >> python was when it was built, in the absence of the Makefile. > > If you have the python-dev package installed which does include the > Makefile, > does it work without requiring your fiddle?
First of all, apologies for a mistake in my last email, it got it backwards, the change in the configure script causes the addition of -lpthread, not the removal of it. There doesn't seem to be a "python-dev" package in FreeBSD, as there is in linux. The python-2.4.2 package include headers and config. Looking at the Makefile that is distributed in the package, it appears to disagree with the link options of the binary in the same package: $ grep "^LIB[SMC]=" /usr/local/lib/python2.4/config/Makefile | cut -f2 -d= | tr '\011\012\015' ' ' -lutil -lm vs: $ ldd /usr/local/bin/python2.4 | sed -n 's,^.* => [^ ]*/lib\(.*\)\.so[^ ]* \((.*)\),-l\1,p' | grep -v '^-lc' | xargs echo -lutil -lstdc++ -lm -lpthread At first I thought this may be a flaw in the Makefile in the package, but I think it's still our problem... grep "^LIB[SMC]=" /usr/local/lib/python2.4/config/Makefile LIBS= -lutil LIBM= -lm LIBC= But: grep "^LDFLAGS=" /usr/local/lib/python2.4/config/Makefile LDFLAGS= -pthread we're clearly missing that important library. So, maybe our change just needs to be: grep -e "^LIB[SMC]=" -e "^LDFLAGS=" /usr/local/lib/python2.4/config/Makefile | cut -f2 -d= | tr '\011\012\015' ' ' which yields: -pthread -lutil -lm What do you think of that? > > I am not even sure why the Makefile would be missing because to even > compile > mod_python requires the Python header files be available which generally > implies that the 'config' directory in the Python library directory > would be > present, including the Makefile. > > It seems to me a bit like this is a fiddle to workaround that your > Python installation > is incomplete or broken. Note that the list of libraries to link is > potentially not the > only thing that is obtained from the Makefile so not having it could > cause other > problems. So doing a fiddle to workaround it not being there seems > wrong to me. > > Why is the Makefile not present in the first place? > > Graham