NetBSD Problem Report #34966
From www@NetBSD.org Thu Nov 2 05:49:33 2006
Return-Path: <www@NetBSD.org>
Received: by narn.NetBSD.org (Postfix, from userid 31301)
id C150463B8CA; Thu, 2 Nov 2006 05:49:33 +0000 (UTC)
Message-Id: <20061102054933.C150463B8CA@narn.NetBSD.org>
Date: Thu, 2 Nov 2006 05:49:33 +0000 (UTC)
From: ogould@cs.stevens.edu
Reply-To: ogould@cs.stevens.edu
To: gnats-bugs@NetBSD.org
Subject: CC set in pkgtools/bootstrap-mk-files breaks math/gap install
X-Send-Pr-Version: www-1.0
>Number: 34966
>Category: pkg
>Synopsis: CC set in pkgtools/bootstrap-mk-files breaks math/gap install
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 02 05:50:00 +0000 2006
>Closed-Date: Sat Nov 11 18:31:57 +0000 2006
>Last-Modified: Sat Nov 11 18:31:57 +0000 2006
>Originator: Oliver Gould
>Release:
>Organization:
Stevens Institute of Techmology
>Environment:
Darwin absolute 8.8.1 Darwin Kernel Version 8.8.1: Mon Sep 25 19:42:00 PDT 2006; root:xnu-792.13.8.obj~1/RELEASE_I386 i386 i386
>Description:
/usr/pkg/share/mk/sys.mk sets CC to "gcc -pipe" or "cc
-pipe". When math/gap appends the compiler to the package
name (math/gap/Makefile:31), the command line during the
install phase gets mangled due to the unexpected space
character. Furthermore, /usr/pkg/bin/gap (a shell script)
becomes misconfigured (and fails to run) due to the space in
the pathname configured based on the CC variable.
>How-To-Repeat:
cd pkgtools/bootstrap-mk-files
make install
...
cd ../../math/gap
make install
...
/usr/bin/install -d -o root -g wheel -m 755
/usr/pkg/lib/gap4.3/bin/i386-apple-darwin8-gcc -pipe
/usr/bin/install -c -s -o root -g wheel -m 555 /usr/pkgsrc/math/gap/work/gap4r3/bin/i386-apple-darwin8-gcc -pipe/gap /usr/pkg/lib/gap4.3/bin/i386-apple-darwin8-gcc -pipe
install: /usr/pkgsrc/math/gap/work/gap4r3/bin/i386-apple-darwin8-gcc:
Inappropriate file type or format
*** Error code 71
>Fix:
--- pkg/share/mk/sys.mk 2006-10-18 17:17:20.000000000 -0400
+++ /home/ogould/work/sys.mk 2006-11-01 13:07:03.000000000 -0500
@@ -21,12 +21,12 @@
LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
.if exists(/usr/bin/gcc)
-CC?= gcc -pipe
+CC?= gcc
.else
-CC?= cc -pipe
+CC?= cc
.endif
DBG?= -O2
-CFLAGS?= ${DBG}
+CFLAGS?= -pipe ${DBG}
COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c
LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
>Release-Note:
>Audit-Trail:
From: Jan Schaumann <jschauma@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: PR/34966 CVS commit: pkgsrc/pkgtools/bootstrap-mk-files
Date: Sat, 11 Nov 2006 18:24:52 +0000 (UTC)
Module Name: pkgsrc
Committed By: jschauma
Date: Sat Nov 11 18:24:52 UTC 2006
Modified Files:
pkgsrc/pkgtools/bootstrap-mk-files: Makefile
pkgsrc/pkgtools/bootstrap-mk-files/files/mods: Darwin.sys.mk
Interix.sys.mk UnixWare.sys.mk
Log Message:
Address PR pkg/34966 as suggested by Oliver Gould and apply the same
logic to all platforms:
Some packages (such as math/gap) create wrappers based on the name of
the compiler, so ${CC} should not contain any flags. Move flags into
CFLAGS.
To generate a diff of this commit:
cvs rdiff -r1.2 -r1.3 pkgsrc/pkgtools/bootstrap-mk-files/Makefile
cvs rdiff -r1.1.1.1 -r1.2 \
pkgsrc/pkgtools/bootstrap-mk-files/files/mods/Darwin.sys.mk \
pkgsrc/pkgtools/bootstrap-mk-files/files/mods/Interix.sys.mk \
pkgsrc/pkgtools/bootstrap-mk-files/files/mods/UnixWare.sys.mk
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: jschauma@netbsd.org
State-Changed-When: Sat, 11 Nov 2006 18:31:57 +0000
State-Changed-Why:
Patch applied - thanks for the PR.
>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.