Subject: pkg/34963: ap2-python fails to build on linux
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 11/01/2006 20:05:00
>Number:         34963
>Category:       pkg
>Synopsis:       ap2-python fails to build on linux
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 01 20:05:00 +0000 2006
>Originator:     Bartosz Luczynski
Linux foo #1 Sat Sep 9 01:11:49 CDT 2006 i686 pentium4 i386 GNU/Linux
ap2-python errors out on parentheses in the configure script on Linux (Slackware 11).  The problem is somewhere else.  Here is the output:

/usr/pkgsrc/www/ap2-python# bmake package
=> Required installed package digest>=20010302: digest-20060826 found
===> Checking for vulnerabilities in ap2-py24-python-3.2.8nb1
=> Checksum SHA1 OK for mod_python-3.2.8.tgz
=> Checksum RMD160 OK for mod_python-3.2.8.tgz
===> Configuring for ap2-py24-python-3.2.8nb1
=> Modifying GNU configure scripts to avoid --recheck
=> Replacing config-guess with pkgsrc versions
=> Replacing config-sub with pkgsrc versions
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking for i386-slackware-linux-gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for ar... ar
checking for a BSD-compatible install... /usr/bin/install -c -o root -g root
checking whether make sets $(MAKE)... yes
checking for main in -lm... yes
checking for an ANSI C-conforming const... yes
checking your blood pressure... a bit high, but we can proceed
configure: checking whether apxs is available...
checking for --with-apxs... /usr/pkg/sbin/apxs executable, good
checking Apache version... 2.0.59
checking for Apache libexec directory... /usr/pkg/lib/httpd
checking for Apache include directory... -I/usr/pkg/include/httpd
checking for --with-python... /usr/pkg/bin/python2.4
checking Python version... 2.4
checking Python install prefix... /usr/pkg
checking checking where python libraries are installed... /usr/pkg/lib/python2.4
checking for Py_NewInterpreter in -lpython2.4... yes
checking what libraries Python was linked with... -lpython2.4   -lpthread -ldl -ldb4 -lutil   -lm
checking linker flags used to link Python...
checking where Python include files are... -I/usr/pkg/include/python2.4
./configure: line 3427: syntax error near unexpected token `('
./configure: line 3427: `  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`'
*** Error code 2

bmake: stopped in /usr/pkgsrc/www/ap2-python
*** Error code 1

bmake: stopped in /usr/pkgsrc/www/ap2-python

The error seems to be in the way the script gets the mod_python version number.

Here is something that works for me:

/usr/pkgsrc/www/ap2-python# diff work/mod_python-3.2.8/ work/mod_python-3.2.8/
< MP_VERSION=`echo $MP_VERSION` # shell removes leading/trailing "'s, yes?      
> MP_VERSION=`echo $MP_VERSION | sed s/\\"//g`                                  

/usr/pkgsrc/www/ap2-python# pushd work/mod_python-3.2.8/ && autoreconf && popd

(More specifically attempting to exec:

echo "3.2.8" | sed s/\\"//g

just hangs on the commandline introducing the configure error.  And seems unnecessary when the shell already strips the leading/trailing characters (I'd imagine this might vary from system to system).)