NetBSD Problem Report #18485
Received: (qmail 21732 invoked by uid 605); 1 Oct 2002 10:56:49 -0000
Message-Id: <200210011100.g91B0rE28397@darkstar.local>
Date: Tue, 1 Oct 2002 13:00:53 +0200 (CEST)
From: jmmv@hispabsd.org
Sender: gnats-bugs-owner@netbsd.org
Reply-To: jmmv@hispabsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: aperture does not build if src is not in /usr/src
X-Send-Pr-Version: 3.95
>Number: 18485
>Category: pkg
>Synopsis: aperture does not build if src is not in /usr/src
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Oct 01 10:57:00 +0000 2002
>Closed-Date: Mon Oct 14 18:14:16 +0000 2002
>Last-Modified: Mon Oct 14 18:14:16 +0000 2002
>Originator:
>Release: NetBSD 1.6H
>Organization:
HispaBSD
>Environment:
System: NetBSD darkstar.local 1.6H NetBSD 1.6H (DARKSTAR) #0: Sat Sep 28 19:58:50 CEST 2002 jmmv@darkstar.local:/var/build/kernel/DARKSTAR i386
Architecture: i386
Machine: i386
>Description:
My source tree is in /s/src, instead of /usr/src. I've
BSDSRCDIR=/s/src
in my mk.conf to get things work properly, but sysutils/aperture
does not build with this setup.
If I link /s/src to /usr/src, the build does not break, and it
effectively uses the /s/src directory. Although, there is some step
during the build that tries to use /usr/src.
I've been investigating and found the problem. The $S variable is
defined in the top Makefile.inc. When this file is read, mk.conf
has not been readed yet (see bsd.init.mk), so BSDSRCDIR takes the
default value /usr/src.
>How-To-Repeat:
Just move your src tree to somewhere else, set BSDSRCDIR in your
mk.conf accordingly, remove /usr/src (if you have any link) and
then try to build aperture. It will fail in `depend ===> module'.
>Fix:
This fixes the problem for me (adding these two lines, we pass
the real value of BSDSRCDIR to make's environment, and is used
without needing to read any file):
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/aperture/Makefile,v
retrieving revision 1.22
diff -u -u -r1.22 Makefile
--- Makefile 2002/09/15 19:25:38 1.22
+++ Makefile 2002/10/01 10:50:54
@@ -37,6 +37,8 @@
BSDSRCDIR?= /nonexistent # to override <bsd.own.mk>, MUST be
# set this way BEFORE bsd.prefs.mk
+MAKE_ENV+= BSDSRCDIR=${BSDSRCDIR}
+
.include "../../mk/bsd.prefs.mk"
pre-extract:
>Release-Note:
>Audit-Trail:
From: Matthias Scheler <tron@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: pr/18485 CVS commit: pkgsrc/sysutils/aperture
Date: Mon, 14 Oct 2002 21:12:24 +0300 (EEST)
Module Name: pkgsrc
Committed By: tron
Date: Mon Oct 14 18:12:24 UTC 2002
Modified Files:
pkgsrc/sysutils/aperture: Makefile
Log Message:
Fix build problem on systems where the NetBSD source tree is not in
"/usr/src" as suggested by Julio Merino in PR pkg/18485.
To generate a diff of this commit:
cvs rdiff -r1.22 -r1.23 pkgsrc/sysutils/aperture/Makefile
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: tron
State-Changed-When: Mon Oct 14 11:13:26 PDT 2002
State-Changed-Why:
Fixed as suggested. Thanks.
>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.