NetBSD Problem Report #28772

From www@netbsd.org  Fri Dec 24 12:01:31 2004
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
	id 955CE63B400; Fri, 24 Dec 2004 12:01:31 +0000 (UTC)
Message-Id: <20041224120131.955CE63B400@narn.netbsd.org>
Date: Fri, 24 Dec 2004 12:01:31 +0000 (UTC)
From: adrianp@stindustries.net
Reply-To: adrianp@stindustries.net
To: gnats-bugs@netbsd.org
Subject: INSTALL_UNSTRIPPED getting ignored on Darwin ?
X-Send-Pr-Version: www-1.0

>Number:         28772
>Category:       pkg
>Synopsis:       INSTALL_UNSTRIPPED getting ignored on Darwin ?
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    darwin-pkg-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 24 12:03:00 +0000 2004
>Closed-Date:    Fri Mar 18 18:17:51 +0000 2005
>Last-Modified:  Fri Mar 18 18:17:51 +0000 2005
>Originator:     Adrian Portelli
>Release:        n/a
>Organization:
STIndustries
>Environment:
Darwin monty.local 7.6.0 Darwin Kernel Version 7.6.0: Sun Oct 10 12:05:27 PDT 2004; root:xnu/xnu-517.9.4.obj~1/RELEASE_PPC  Power Macintosh powerpc
>Description:
I'm going to pick on the python package as that's where i've seen it:

for python24-pth:
$ bmake show-var VARNAME=INSTALL_UNSTRIPPED
yes
$ bmake show-var VARNAME=_STRIPFLAG_INSTALL
-s
$ bmake show-var VARNAME=_STRIPFLAG_CC
-Wl,-x

Now I thought with INSTALL_UNSTRIPPED=yes _STRIPFLAG_INSTALL and _STRIPFLAG_CC were supposed to be set to NULL.  Well, that's what I'm assuming from mk/platform/Darwin.mk.

I've got two extra packages in wip that are doing the exact same thing which are unrealircd and ettercap-NG.  The programs will compile and install OK on Darwin but as soon as you begin to use them they crap out.  Now installing them unstripped fixes the problem.  However:

.if ${OPSYS} == "Darwin"
INSTALL_UNSTRIPPED=     yes
.endif

just gets ignored and the packages are installed stripped and don't work.  If I do this:

INSTALL_UNSTRIPPED=     yes

To make it the default regardless of platform it works and the binaries are ok.  This is clearly not the way to go as stripping the binaries is fine on other platforms e.g. x86.

So it looks like INSTALL_UNSTRIPPED is being ignored.
>How-To-Repeat:
try insalling and running either:

wip/ettercap-NG
wip/unrealircd

without the _STRIPFLAG_* hacks currently in the Makefiles.
>Fix:
You can bypass the issue by either of the following methods on a package-by-package basis:

.if ${OPSYS} == "Darwin"
_STRIPFLAG_CC=
_STRIPFLAG_INSTALL=
.endif

or a global

INSTALL_UNSTRIPPED=yes

These are clearly _not_ long term fixes.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->darwin-pkg-people
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Mon, 27 Dec 2004 21:58:16 +0000
Responsible-Changed-Why:
Darwin pkgsrc problem.


From: Todd Vierling <tv@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/28772 CVS commit: pkgsrc/mk
Date: Fri, 18 Mar 2005 18:16:35 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	tv
 Date:		Fri Mar 18 18:16:35 UTC 2005

 Modified Files:
 	pkgsrc/mk: bsd.pkg.mk
 	pkgsrc/mk/platform: AIX.mk BSDOS.mk Darwin.mk DragonFly.mk FreeBSD.mk
 	    IRIX.mk Interix.mk Linux.mk NetBSD.mk OSF1.mk OpenBSD.mk SunOS.mk
 	    UnixWare.mk

 Log Message:
 Fix a gleaming illustration of why using YES/NO variables everywhere
 possible, just for the sake of doing so, is not a good thing to do:

 The platform files define _STRIPFLAG_* to determine whether to strip things.
 But since this is included in bsd.prefs.mk, ".if ..." checks cannot take
 things set in the Makefile into account.  So convert INSTALL_UNSTRIPPED=YES
 to a defined/undefined variable check in bsd.pkg.mk, and use the :D:U idiom
 in the _STRIPFLAG_* variables.

 This should fix PR pkg/28772 and PR pkg/29031.


 To generate a diff of this commit:
 cvs rdiff -r1.1599 -r1.1600 pkgsrc/mk/bsd.pkg.mk
 cvs rdiff -r1.11 -r1.12 pkgsrc/mk/platform/AIX.mk \
     pkgsrc/mk/platform/OpenBSD.mk
 cvs rdiff -r1.7 -r1.8 pkgsrc/mk/platform/BSDOS.mk \
     pkgsrc/mk/platform/Darwin.mk pkgsrc/mk/platform/FreeBSD.mk \
     pkgsrc/mk/platform/NetBSD.mk pkgsrc/mk/platform/UnixWare.mk
 cvs rdiff -r1.9 -r1.10 pkgsrc/mk/platform/DragonFly.mk \
     pkgsrc/mk/platform/IRIX.mk pkgsrc/mk/platform/Linux.mk \
     pkgsrc/mk/platform/SunOS.mk
 cvs rdiff -r1.24 -r1.25 pkgsrc/mk/platform/Interix.mk
 cvs rdiff -r1.2 -r1.3 pkgsrc/mk/platform/OSF1.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: tv@netbsd.org
State-Changed-When: Fri, 18 Mar 2005 18:17:51 +0000
State-Changed-Why:
Fixed.  I "introduced" the problem, and I've put in a workaround-fix.


>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.