NetBSD Problem Report #40709

From www@NetBSD.org  Sat Feb 21 12:51:51 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id D7A0163BB35
	for <gnats-bugs@gnats.netbsd.org>; Sat, 21 Feb 2009 12:51:51 +0000 (UTC)
Message-Id: <20090221125151.AA54D63B8C3@narn.NetBSD.org>
Date: Sat, 21 Feb 2009 12:51:51 +0000 (UTC)
From: adrianp@stindustries.net
Reply-To: adrianp@stindustries.net
To: gnats-bugs@NetBSD.org
Subject: pdksh and escaped quotes
X-Send-Pr-Version: www-1.0

>Number:         40709
>Category:       pkg
>Synopsis:       pdksh and escaped quotes
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    schmonz
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 21 12:55:00 +0000 2009
>Closed-Date:    Sun Feb 22 11:21:44 +0000 2009
>Last-Modified:  Sun Feb 22 11:21:44 +0000 2009
>Originator:     Adrian Portelli
>Release:        OpenSolaris 2008.11 (x86)
>Organization:
>Environment:
OpenSolaris 2008.11 (x86)
>Description:
I've come across some weirdness trying to build misc/php-mbstring on
OpenSolaris.  I've built a number of other php extensions and packages
but this is the only one exhibiting this strange behaviour.  Basically
when running the configure target I get the following:

....
../configure[7963]: cd:
/var/scratch/pkgsrc.obj/misc/php-mbstring/work/php-5.2.8/ext/mbstring/"." -
No such file or directory
../configure[7963]: cd:
/var/scratch/pkgsrc.obj/misc/php-mbstring/work/php-5.2.8/ext/mbstring/"." -
No such file or directory
../configure[7963]: cd:
/var/scratch/pkgsrc.obj/misc/php-mbstring/work/php-5.2.8/ext/mbstring/"./libmbfl"
- No such file or directory
....

And during the make target:

....
/usr/pkg/bin/pdksh
/var/scratch/pkgsrc.obj/misc/php-mbstring/work/php-5.2.8/ext/mbstring/libtool
--mode=compile gcc  -DNOT_RUBY -DHAVE_CONFIG_H -I.
-I/var/scratch/pkgsrc.obj/misc/php-mbstring/work/php-5.2.8/ext/mbstring
-DPHP_ATOM_INC
-I/var/scratch/pkgsrc.obj/misc/php-mbstring/work/php-5.2.8/ext/mbstring/include
-I/var/scratch/pkgsrc.obj/misc/php-mbstring/work/php-5.2.8/ext/mbstring/main
-I/var/scratch/pkgsrc.obj/misc/php-mbstring/work/php-5.2.8/ext/mbstring
-I/usr/pkg/include/php -I/usr/pkg/include/php/main
-I/usr/pkg/include/php/TSRM -I/usr/pkg/include/php/Zend
-I/usr/pkg/include/php/ext -I/usr/pkg/include/php/ext/date/lib
-I/var/scratch/pkgsrc.obj/misc/php-mbstring/work/php-5.2.8/ext/mbstring/oniguruma
-I/oniguruma"
-I/var/scratch/pkgsrc.obj/misc/php-mbstring/work/php-5.2.8/ext/mbstring/libmbfl
-I/libmbfl"
-I/var/scratch/pkgsrc.obj/misc/php-mbstring/work/php-5.2.8/ext/mbstring/libmbfl/mbfl
-I/mbfl"  -I/usr/pkg/include/php -DHAVE_CONFIG_H  -O -I/usr/pkg/include
-I/usr/include   -c
/var/scratch/pkgsrc.obj/misc/php-mbstring/work/php-5.2.8/ext/mbstring/oniguruma/regcomp.c
-o oniguruma/regcomp.lo
/usr/pkg/bin/pdksh: no closing quote
*** Error code 1
....

I've tracked this down to the following lines in the generated ./configure:

7819: ep_realdir="`(cd \"$ep_dir\" && pwd)`"
7820: ai_p="$ep_realdir/`basename \"$ext_builddir/$dir\"`"

Basically think pdksh dislikes likes the escaped double quotes around
$ep_dir and $ext_builddir/$dir.  If I change the lines as follows:

ep_realdir="`(cd $ep_dir && pwd)`"
ai_p="$ep_realdir/`basename $ext_builddir/$dir`"

Then the world is a happy place.  OpenSolaris runs /usr/pkg/bin/pdksh as
CONFIG_SHELL which is probably making all the difference.  The generated
configure on NetBSD and OpenSolaris is identical so the only thing I'm
left with is the interaction of the shell and ./configure.

This problem is also reported as a part of PR#39775 in which the problem shows up when building print/ghostscript.
>How-To-Repeat:
cd misc/php-mbstring && bmake
>Fix:
Not known

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->schmonz
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Sat, 21 Feb 2009 12:59:48 +0000
Responsible-Changed-Why:
Over to maintainer.


From: Adrian Portelli <adrianp@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40709 CVS commit: pkgsrc/misc/php-mbstring
Date: Sat, 21 Feb 2009 12:56:12 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	adrianp
 Date:		Sat Feb 21 12:56:12 UTC 2009

 Modified Files:
 	pkgsrc/misc/php-mbstring: Makefile

 Log Message:
 Work around for pdksh bug documented in PR#40709
 This should work on at least SunOS 5.10 and 5.11


 To generate a diff of this commit:
 cvs rdiff -r1.9 -r1.10 pkgsrc/misc/php-mbstring/Makefile

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

From: Adrian Portelli <adrianp@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40709 CVS commit: pkgsrc/misc/php-mbstring
Date: Sun, 22 Feb 2009 11:08:20 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	adrianp
 Date:		Sun Feb 22 11:08:20 UTC 2009

 Modified Files:
 	pkgsrc/misc/php-mbstring: Makefile

 Log Message:
 Remove work around for PR#40709 as pdksh has been fixed


 To generate a diff of this commit:
 cvs rdiff -r1.10 -r1.11 pkgsrc/misc/php-mbstring/Makefile

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

From: Adrian Portelli <adrianp@stindustries.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/40709: pdksh and escaped quotes
Date: Sun, 22 Feb 2009 11:14:06 +0000

 For the record this is the commit that fixed the issue:

 -------- Original Message --------
 Subject: CVS commit: pkgsrc/shells/pdksh
 Date: Sat, 21 Feb 2009 20:06:30 +0000 (UTC)
 From: Tobias Nygren <tnn@netbsd.org>
 Reply-To: tnn@netbsd.org
 To: pkgsrc-changes@NetBSD.org


 Module Name:	pkgsrc
 Committed By:	tnn
 Date:		Sat Feb 21 20:06:30 UTC 2009

 Modified Files:
 	pkgsrc/shells/pdksh: Makefile
 	pkgsrc/shells/pdksh/files: c_ulimit.c lex.c

 Log Message:
 Merge the following revisions from NetBSD src:
 c_ulimit.c 1.9: avoid sign extension problem
 lex.c 1.13: bugfix related to nested quotes
 Bump PKGREVISION.


 To generate a diff of this commit:
 cvs rdiff -r1.17 -r1.18 pkgsrc/shells/pdksh/Makefile
 cvs rdiff -r1.3 -r1.4 pkgsrc/shells/pdksh/files/c_ulimit.c \
     pkgsrc/shells/pdksh/files/lex.c

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

State-Changed-From-To: open->closed
State-Changed-By: adrianp@NetBSD.org
State-Changed-When: Sun, 22 Feb 2009 11:21:44 +0000
State-Changed-Why:
This has been fixed in pkgsrc HEAD and a pullup to stable is pending.


>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.