NetBSD Problem Report #18940

Received: (qmail 24196 invoked by uid 605); 5 Nov 2002 12:10:12 -0000
Message-Id: <20021105120955.2B814807F@iller.boquist.net>
Date: Tue,  5 Nov 2002 13:09:55 +0100 (CET)
From: urban@boquist.net
Sender: gnats-bugs-owner@netbsd.org
Reply-To: urban@boquist.net
To: gnats-bugs@gnats.netbsd.org
Subject: some packages fail to build if /usr/pkg/bin is not in PATH
X-Send-Pr-Version: 3.95

>Number:         18940
>Category:       pkg
>Synopsis:       some packages fail to build if /usr/pkg/bin is not in PATH
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    cjep
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 05 12:11:00 +0000 2002
>Closed-Date:    Mon Dec 09 00:09:16 +0000 2002
>Last-Modified:  Mon Dec 09 00:09:16 +0000 2002
>Originator:     Urban Boquist
>Release:        NetBSD 1.6K
>Organization:
Carlstedt Research & Technology AB, Sweden
>Environment:
System: NetBSD iller 1.6K NetBSD 1.6K (ILLER-$Revision: 1.51 $) #0: Sat Nov 2 15:39:05 CET 2002 root@iller:/usr/src/sys/arch/i386/compile/ILLER i386
Architecture: i386
Machine: i386
>Description:
I just built some packages in a chroot (using pkgsrc/mk/bulk/mksandbox)
and somehow ended up with a shell where /usr/pkg/bin was not in
PATH. The following packages failed to build:

archivers/zip (tries to run "unzip")
print/teTeX-bin (tries to run "texconfig")
devel/php4-gettext (mysterious error)
databases/php4-mysql (mysterious error)

adding /usr/pkg/bin to PATH and restarting the build solved all the problems.

>How-To-Repeat:
Build packages using pkgsrc/mk/bulk/mksandbox.

>Fix:
Not sure, but it seems to me that if some package require /usr/pkg/bin
in PATH this should "just work", no matter what the shell that I start
the build from is set to. Especially since this was the default that I
got from "mksandbox".

It also seems that this somehow ought to be handled by bsd.pkg.mk, and
not in individual packages (the ones above are just those I happened
to stumble upon, I built far from the entire pkgsrc). I haven't looked
at the code at all though, maybe there already is some special PATH handling.
>Release-Note:
>Audit-Trail:

From: Urban Boquist <urban@boquist.net>
To: gnats-bugs@gnats.netbsd.org
Cc: netbsd-bugs@netbsd.org
Subject: Re: pkg/18940: some packages fail to build if /usr/pkg/bin is not in PATH
Date: Tue, 5 Nov 2002 13:25:40 +0100

 Following up to myself...

 >> Synopsis: some packages fail to build if /usr/pkg/bin is not in PATH

 urban> I haven't looked at the code at all though, maybe there already
 urban> is some special PATH handling.

 Duh, I guess I should have taken the minute it took to browse through
 bsd.pkg.mk before I sent that PR, there is _a lot_ of special PATH
 handling in there...

 ${LOCALBASE}/bin is already added to MAKE_ENV, CONFIGURE_ENV and
 SCRIPTS_ENV as far as I can see. But I guess somehow these packages
 must do something that makes that PATH get lost. I'll try to
 investigate this more when I get some time.

 Can anyone else reproduce this problem?

 Kind regards,

         -- Urban
State-Changed-From-To: open->analyzed 
State-Changed-By: cjep 
State-Changed-When: Sun Nov 10 10:05:01 PST 2002 
State-Changed-Why:  
Looking at teTeX-bin and zip, we really should use ${PREFIX}/bin/ before 
the commands (not only to fix your PR, but also to avoid using unintended 
commands in the PATH). I'll commit fixes to these for now and look at the other 
packages you mention soon. 


Responsible-Changed-From-To: pkg-manager->cjep 
Responsible-Changed-By: cjep 
Responsible-Changed-When: Sun Nov 10 10:05:01 PST 2002 
Responsible-Changed-Why:  
i'll take this. 
State-Changed-From-To: analyzed->feedback 
State-Changed-By: cjep 
State-Changed-When: Sat Dec 7 10:43:56 PST 2002 
State-Changed-Why:  
i've fixed teTeX-bin and zip to behave better. devel/php4-gettext is 
failing in this case because it tries to run libtoolize. I've reproduced  
this with a sh without /usr/pkg/bin in it. 

On the basis that it is not unreasonable to have /usr/pkg/bin in the 
PATH when one is building packages, are you happy if I close this PR? 

best wishes, 
Chris 
State-Changed-From-To: feedback->closed 
State-Changed-By: cjep 
State-Changed-When: Sun Dec 8 16:08:59 PST 2002 
State-Changed-Why:  
Submitter is happy for this PR to be closed. 
>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.