NetBSD Problem Report #34963

From www@NetBSD.org  Wed Nov  1 20:01:06 2006
Return-Path: <www@NetBSD.org>
Received: by narn.NetBSD.org (Postfix, from userid 31301)
	id 057BD63BA73; Wed,  1 Nov 2006 20:01:06 +0000 (UTC)
Message-Id: <20061101200106.057BD63BA73@narn.NetBSD.org>
Date: Wed,  1 Nov 2006 20:01:06 +0000 (UTC)
From: bluczyns@gmail.com
Reply-To: bluczyns@gmail.com
To: gnats-bugs@NetBSD.org
Subject: ap2-python fails to build on linux
X-Send-Pr-Version: www-1.0

>Number:         34963
>Category:       pkg
>Synopsis:       ap2-python fails to build on linux
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 01 20:05:00 +0000 2006
>Closed-Date:    Sat Nov 18 18:45:31 +0000 2006
>Last-Modified:  Sat Nov 18 18:50:01 +0000 2006
>Originator:     Bartosz Luczynski
>Release:        
>Organization:
>Environment:
Linux foo 2.6.17.13 #1 Sat Sep 9 01:11:49 CDT 2006 i686 pentium4 i386 GNU/Linux
>Description:
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

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

Stop.
bmake: stopped in /usr/pkgsrc/www/ap2-python
>How-To-Repeat:

>Fix:
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/configure.in work/mod_python-3.2.8/configure.in.old
290c290
< 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).)

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: jschauma@netbsd.org
State-Changed-When: Sat, 18 Nov 2006 18:45:31 +0000
State-Changed-Why:

The package was updated to version 3.2.10, which includes a fix for this
known problem in bash 3.1.x.  Please update your sources and everything
should work.  Thanks for the PR!



From: Jan Schaumann <jschauma@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: PR/34963 CVS commit: pkgsrc/www/ap2-python
Date: Sat, 18 Nov 2006 18:43:00 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	jschauma
 Date:		Sat Nov 18 18:43:00 UTC 2006

 Modified Files:
 	pkgsrc/www/ap2-python: Makefile distinfo

 Log Message:
 update to 3.2.10 to address PR pkg/34963 by Bartosz Luczynski:
  bash 3.1.x gets shell quoting wrong, causing configure to fail on platforms
  that use this shell

 New in this version according to
 http://www.modpython.org/live/mod_python-3.2.10/doc-html/node98.html:
 - Added support for Apache 2.2.
 - New req.is_https() and req.ssl_var_lookup() methods. These communicate
   direct with the Apache mod_ssl module, allowing it to be determined if
   the connection is using SSL/TLS and what the values of internal ssl
   variables are.
 - New req.server.get_options() method. This returns the subset of Python
   options set at global scope within the Apache configuration. That is,
   outside of the context of any VirtualHost, Location, Directory or Files
   directives.
 - The directory used for mutex locks can now be specified at at compile
   time using ./configure --with-mutex-dir value or at run time with
   PythonOption mod_python.mutex_directory value.
 - The number of mutex locks can now be specified at run time with
   PythonOption mod_python.mutex_locks value.
 - Fixed three memory leaks that were found in _apachemodule.parse_qsl,
   req.readlines and util.cfgtree_walk.

 - Third party C modules that use the simplified API for the Global Interpreter
   Lock (GIL), as described in PEP 311, can now be used. The only requirement
   is that such modules can only be used in the context of the "main_interpreter".
 - DbmSession unit test no longer uses the default directory for the dbm file,
   so the test will not interfer with the user's current apache instance.
 - Added additional debugging and logging output for where mod_python cannot
   initialise itself properly due to Python or mod_python version mismatches or
   missing Python module code files.

 - Fixed configure problem when using bash 3.1.x.
 - Fixed DbmSession to create db file with mode 0640.
 - Fixed request.sendfile() bug for symlinked files on Win32.


 To generate a diff of this commit:
 cvs rdiff -r1.18 -r1.19 pkgsrc/www/ap2-python/Makefile
 cvs rdiff -r1.3 -r1.4 pkgsrc/www/ap2-python/distinfo

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.