NetBSD Problem Report #10162
Received: (qmail 26866 invoked from network); 20 May 2000 22:05:04 -0000
Message-Id: <200005202205.PAA16441@Cup.DSG.Stanford.EDU>
Date: Sat, 20 May 2000 15:05:02 -0700 (PDT)
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
Reply-To: jonathan@DSG.Stanford.EDU
To: gnats-bugs@gnats.netbsd.org
Subject: gcc linking via collect2 fails when ld not in $PATH
X-Send-Pr-Version: 3.95
>Number: 10162
>Category: bin
>Synopsis: gcc linking via collect2 fails when ld not in $PATH
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat May 20 22:06:00 +0000 2000
>Closed-Date: Mon Dec 17 21:44:12 +0000 2001
>Last-Modified: Mon Dec 17 21:44:12 +0000 2001
>Originator:
>Release: netbsd-current as at approximately 2000-04-30
>Organization:
>Environment:
System: NetBSD Cup.DSG.Stanford.EDU 1.4.1 NetBSD 1.4.1 (GENERIC) #0: Tue Nov 9 12:18:04 PST 1999 jonathan@Cup.DSG.Stanford.EDU:/src/NetBSD/src/sys-1.4-release/src/sys/arch/i386/compile/GENERIC i386
I acutally verified this on i386 -current snapshots from ca. April 30.
>Description:
>How-To-Repeat:
do a from-scratch install of a 2000050x i386 snapshot.
install base and comp. install the tcsh package.
(the one I used dates back to 1.4S).
create a new user account by hand, using csh or tcsh as shell,
and log in as that user.
Note that PATH is not set, but {t,}csh defailts its $path to
include /bin and /usr/bin.
invoke cc on a hello-world program.
Observe that cc invokes cpp, cc1, and collect2 successfully,
but when collect2 attempts to exec ld, it fails.
>Fix:
a work-around is to simply do
set path=($path)
(!) which causes tcsh, at least, to export its default
$path to the environment as PATH.
The real problem I had with this was figuring out just why compiles
weren't working.
For consistency, I thikn we should really rework tcsh (and csh?)
to export their default "path" non-environment variable as a
sh-compatible PATH, at startup time -- just as they do
if the user does "set path =($path)".
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: tv
State-Changed-When: Mon Dec 17 13:43:21 PST 2001
State-Changed-Why:
This shouldn't be true of the new toolchain, at least, since many pathname
related bugs were fixed. Please open a new PR if the new toolchain
exhibits any unexpected behavior.
>Unformatted:
(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.