NetBSD Problem Report #45949
From duck@shangtai.net Wed Feb 8 15:30:26 2012
Return-Path: <duck@shangtai.net>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id 05DBA63BD87
for <gnats-bugs@gnats.NetBSD.org>; Wed, 8 Feb 2012 15:30:25 +0000 (UTC)
Message-Id: <20120208153017.ADFBFA75C9@knightrider.shangtai.net>
Date: Wed, 8 Feb 2012 17:30:17 +0200 (EET)
From: duck+important@shangtai.net
Reply-To: duck+important@shangtai.net
To: gnats-bugs@gnats.NetBSD.org
Subject: bash build on IRIX fails due to missing -c99 flag in builtins
X-Send-Pr-Version: 3.95
>Number: 45949
>Category: pkg
>Synopsis: bash build on IRIX fails due to missing -c99 flag in builtins
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Feb 08 15:35:00 +0000 2012
>Closed-Date:
>Last-Modified: Mon Aug 20 06:42:14 +0000 2012
>Originator: duck+important@shangtai.net
>Release: pkgsrc-2011Q3
>Organization:
>Environment:
System: IRIX64 halo 6.5 6.5.29m 01090133 IP30
Architecture: mipseb
Machine: IP30
>Description:
Building bash fails because the Makefile rule for compiling mkbuiltins.o does
not use CFLAGS but a long meandering chain of other variables that somehow do
not pull in CFLAGS. This makes us lose the -c99 flag which is required for using
C99 standard headers with MIPSPro.
>How-To-Repeat:
Attempt to build bash on IRIX while for exampel testing a build of netpbm.
>Fix:
Make a new patch, like this. It takes care of the missing compiler flag. There
is a potential here for other systems to fail because of extraenous compiler
flags (I don't know, maybe they actually had a reason for not making it use
CFLAGS?)
I tested this and it works on IRIX, NetBSD 5.1/alpha, NetBSD 4.0/i386
--- builtins/Makefile.in.orig Tue Dec 21 15:37:18 2010
+++ builtins/Makefile.in Wed Feb 8 16:49:52 2012
@@ -56,7 +56,7 @@
PROFILE_FLAGS = @PROFILE_FLAGS@
CFLAGS = @CFLAGS@
-CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ @CROSS_COMPILE@
+CFLAGS_FOR_BUILD = @CFLAGS@ @CFLAGS_FOR_BUILD@ @CROSS_COMPILE@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
LOCAL_CFLAGS = @LOCAL_CFLAGS@ ${DEBUG}
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->wiz
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Wed, 15 Feb 2012 11:57:27 +0000
Responsible-Changed-Why:
Over to maintainer.
State-Changed-From-To: open->feedback
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 15 Feb 2012 13:36:43 +0000
State-Changed-Why:
asau asked a question
From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc:
Subject: Re: pkg/45949: bash build on IRIX fails due to missing -c99 flag in
builtins
Date: Wed, 15 Feb 2012 14:36:32 +0100
Forward misdirected mail.
----- Forwarded message from Aleksej Saushev <asau@inbox.ru> -----
Date: Thu, 09 Feb 2012 08:43:06 +0400
From: Aleksej Saushev <asau@inbox.ru>
To: pkg-bug-handler@NetBSD.org
Subject: Re: pkg/45949: bash build on IRIX fails due to missing -c99 flag in builtins
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix)
duck+important@shangtai.net writes:
> Make a new patch, like this. It takes care of the missing compiler flag. There
> is a potential here for other systems to fail because of extraenous compiler
> flags (I don't know, maybe they actually had a reason for not making it use
> CFLAGS?)
Yes, they do make it right, CFLAGS_FOR_BUILD and CFLAGS are flags for
different compilers. Could you send values for these variables without
your patch?
> I tested this and it works on IRIX, NetBSD 5.1/alpha, NetBSD 4.0/i386
It works because you're not cross-compiling.
----- End forwarded message -----
From: Staffan =?iso-8859-1?Q?Thom=E9n?= <duck+important@shangtai.net>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/45949: bash build on IRIX fails due to missing -c99 flag in
builtins
Date: Wed, 15 Feb 2012 18:38:50 +0200
On Wed, Feb 15, 2012 at 01:40:06PM +0000, Thomas Klausner wrote:
> The following reply was made to PR pkg/45949; it has been noted by GNATS.
>
> From: Thomas Klausner <wiz@NetBSD.org>
> To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
> Cc:
> Subject: Re: pkg/45949: bash build on IRIX fails due to missing -c99 flag in
> builtins
> Date: Wed, 15 Feb 2012 14:36:32 +0100
>
> Forward misdirected mail.
>
> ----- Forwarded message from Aleksej Saushev <asau@inbox.ru> -----
>
> Date: Thu, 09 Feb 2012 08:43:06 +0400
> From: Aleksej Saushev <asau@inbox.ru>
> To: pkg-bug-handler@NetBSD.org
> Subject: Re: pkg/45949: bash build on IRIX fails due to missing -c99 flag in builtins
> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix)
>
> duck+important@shangtai.net writes:
>
> > Make a new patch, like this. It takes care of the missing compiler flag. There
> > is a potential here for other systems to fail because of extraenous compiler
> > flags (I don't know, maybe they actually had a reason for not making it use
> > CFLAGS?)
>
> Yes, they do make it right, CFLAGS_FOR_BUILD and CFLAGS are flags for
> different compilers. Could you send values for these variables without
> your patch?
CFLAGS = -c99 -n32 -I/usr/include -I/usr/pkg/include
CFLAGS_FOR_BUILD = -g
> > I tested this and it works on IRIX, NetBSD 5.1/alpha, NetBSD 4.0/i386
>
> It works because you're not cross-compiling.
Does anyone in pkgsrc? I guess the other way to deal with it would be to fill
out the value from the pkgsrc Makefile,
.if !empty(OPSYS:MIRIX)
CONFIGURE_ENV+=CFLAGS_FOR_BUILD="$(CFLAGS)"
.endif
or perhaps
CFLAGS_FOR_BUILD?=$(CFLAGS)
CONFIGURE_ENV+=CFLAGS_FOR_BUILD="$(CFLAGS_FOR_BUILD)"
Is this better?
--
Staffan Thomén - ADB3 455F 10D5 86D1 78D6 048D 11BB D66E 7C7E 2EF8
Responsible-Changed-From-To: wiz->pkg-manager
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Mon, 20 Aug 2012 06:42:14 +0000
Responsible-Changed-Why:
Reset maintainer
State-Changed-From-To: feedback->open
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Mon, 20 Aug 2012 06:42:14 +0000
State-Changed-Why:
feedback provided, I think
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.