NetBSD Problem Report #4021
Received: (qmail 9023 invoked from network); 20 Aug 1997 20:50:41 -0000
Message-Id: <199708202038.WAA01212@rumolt.teuto.de>
Date: Wed, 20 Aug 1997 22:38:28 +0200 (MEST)
From: Martin Husemann <martin@rumolt.teuto.de>
Reply-To: martin@rumolt.teuto.de
To: gnats-bugs@gnats.netbsd.org
Subject: kernel build uses absolute paths
X-Send-Pr-Version: 3.95
>Number: 4021
>Category: kern
>Synopsis: it's not possible to build a kernel alternating in different mount points
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Aug 20 14:05:01 +0000 1997
>Closed-Date: Fri May 07 14:33:26 +0000 1999
>Last-Modified: Fri May 07 14:35:06 +0000 1999
>Originator: Martin Husemann
>Release: current as of Aug 17 1997
>Organization:
UP-Vision Computergraphik GmbH
>Environment:
System: NetBSD rumolt.teuto.de 1.2G NetBSD 1.2G (RUMOLT) #0: Sun Aug 17 10:09:23 MEST 1997 root@hwart.teuto.de:/usr/src/sys-local/arch/i386/compile/RUMOLT i386
>Description:
If you mount a kernel compile directory on /mnt/usr/src/sys/arch/i386/...,
config and compile it there, you cannot go to the fileserver (where it is
mounted as /usr/src/sys/arch/i386) and compile a new kernel there, because
there are absolute paths in lib/kern/.depend and lib/compat/.depend.
You have to edit these files manually and replace the absolute by relative
paths.
>How-To-Repeat:
See above.
>Fix:
Sorry, none available right now.
>Release-Note:
>Audit-Trail:
From: Jason Thorpe <thorpej@nas.nasa.gov>
To: martin@rumolt.teuto.de
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: kern/4021: kernel build uses absolute paths
Date: Thu, 21 Aug 1997 06:15:43 -0700
On Wed, 20 Aug 1997 22:38:28 +0200 (MEST)
Martin Husemann <martin@rumolt.teuto.de> wrote:
> If you mount a kernel compile directory on /mnt/usr/src/sys/arch/i386/...,
> config and compile it there, you cannot go to the fileserver (where it is
> mounted as /usr/src/sys/arch/i386) and compile a new kernel there, because
> there are absolute paths in lib/kern/.depend and lib/compat/.depend.
>
> You have to edit these files manually and replace the absolute by relative
> paths.
Actually, if you just remove the .depend files, and "make depend" again, the
right thing will happen.
Jason R. Thorpe thorpej@nas.nasa.gov
NASA Ames Research Center Home: +1 408 866 1912
NAS: M/S 258-6 Work: +1 415 604 0935
Moffett Field, CA 94035 Pager: +1 415 428 6939
From: Martin Husemann <martin@rumolt.teuto.de>
To: thorpej@nas.nasa.gov
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: kern/4021: kernel build uses absolute paths
Date: Fri, 22 Aug 1997 06:29:02 +0200 (MEST)
> Actually, if you just remove the .depend files, and "make depend" again, the
> right thing will happen.
No, it won't.
It will get the "new" absolute paths in there, so you can not change
back to the other mount point without reruning make depend (which takes
quite some time on some machines).
Note that we have relative paths in ./.depend, but absolute ones in
./lib/kern/.depend and ./lib/compat/.depend.
So with a little Makefile-magic it should be possible to trick mkdepend
into doing the right thing!
Martin
State-Changed-From-To: open->feedback
State-Changed-By: fair
State-Changed-When: Sat Apr 3 01:48:23 PST 1999
State-Changed-Why:
If you submit a suggested change to config and/or the Makefiles, perhaps
this problem will get addressed. As it is, there doesn't seem to be much
enthusiasm for fixing it.
From: "Martin Husemann" <martin@rumolt.teuto.de>
To: <fair@netbsd.org>, <gnats-admin@netbsd.org>
Cc: Subject: RE: kern/4021
Date: Sat, 3 Apr 1999 12:58:38 +0200
> If you submit a suggested change to config and/or the Makefiles, perhaps
> this problem will get addressed. As it is, there doesn't seem to be much
> enthusiasm for fixing it.
Hmmh - I had a look at it and found a realy easy and quick solution for my
situation:
In sys/arch/i386/conf/Makefile.i386 change
---8<---
# source tree is located via $S relative to the compilation directory
.ifndef S
S!= cd ../../../..; pwd
.endif
--->8---
to
---8<---
# source tree is located via $S relative to the compilation directory
.ifndef S
S!= ../../../..
.endif
--->8---
This is still not the optimal solution, as it generates ../../../.. in the
compile directories .depend file and /usr/src/sys/ in the lib/compat and
lib/kern .depend files, but at least it does not resolve symlinks names any
more (the later would have been /a/usr/src/... when config was run on my
file server).
This is all in the Makefiles and Makefile-templates, config is not involved.
It's not easy to fix without breaking other stuff, for example
sys/compat/common/Makefile.inc does cd to sys/compat/common before doing
"make depend" for reasons I do not fully understand.
Martin
State-Changed-From-To: feedback->closed
State-Changed-By: drochner
State-Changed-When: Fri May 7 07:33:26 PDT 1999
State-Changed-Why:
changed Makefiles to deal better with this
>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.