NetBSD Problem Report #15935

Received: (qmail 27173 invoked from network); 15 Mar 2002 16:54:08 -0000
Message-Id: <200203151654.g2FGs6O18781@bandsept.script.jussieu.fr>
Date: Fri, 15 Mar 2002 17:54:06 +0100 (CET)
From: Stoned Elipot <seb@script.jussieu.fr>
To: gnats-bugs@gnats.netbsd.org
Subject: perl package's Config.pm holds unusable values for cpp and cppflags for

>Number:         15935
>Category:       pkg
>Synopsis:       perl package's Config.pm holds unusable values for cpp and cppflags
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    jlam
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 15 16:55:01 +0000 2002
>Closed-Date:    Fri Mar 22 06:59:03 +0000 2002
>Last-Modified:  Wed May 13 13:12:28 +0000 2015
>Originator:     Stoned Elipot
>Release:        NetBSD 1.5.x
>Organization:
SCRIPT, Paris VII University, France
>Environment:
System: NetBSD bandsept 1.5.2 NetBSD 1.5.2 (BANDSEPT) #0: Mon Oct 1 19:35:25 CEST 2001 seb@bandsept:/script/src/nbsd/kernels/build sparc
System: NetBSD runabout 1.5.2 NetBSD 1.5.2 (RUNABOUT) #0: Thu Mar 14 15:20:13 CET 2002 root@runabout:/usr/src/sys/arch/i386/compile/RUNABOUT i386
>Description:
Perl package's Config.pm holds cpp and cpp flags for module compilation -
and more ? (I am not a perl expert). On a 1.5.x systems those values
are not usable together. As an example latest CPAN module IO-Tty -as of this
writing it is at version 1.00, (c.f. http://search.cpan.org/search?dist=IO-Tty)
cannot be installed...
Note: on -current the values are the same but are usable...
>How-To-Repeat:
With a failry recent perl package installed try:
$ perl -V:cpp
cpp='cpp';
$ perl -V:cppflags  
cppflags='-fno-strict-aliasing -I/usr/pkg/include';
$ eval `perl -V:cpp`; eval `perl -V:cppflags` ; $cpp $cppflags /dev/null
cpp: Invalid option `-fno-strict-aliasing'
>Fix:
Unknown. Perhaps our perl's package maintainer should look after this (hint,
hint) ?
>Release-Note:
>Audit-Trail:

From: Johnny Lam <jlam@jgrind.org>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: Re: pkg/15935
Date: Fri, 15 Mar 2002 12:41:07 -0800

 ----- Forwarded message from Johnny Lam <jlam@jgrind.org> -----

 Delivered-To: jlam@jgrind.org
 Date: Fri, 15 Mar 2002 07:50:01 -0800
 From: Johnny Lam <jlam@jgrind.org>
 To: Stoned Elipot <seb@script.jussieu.fr>
 Subject: Re: perl's pkg Config.pm failure on branch-1-5 ?
 X-Mailer: Mutt 1.0pre3i
 In-Reply-To: <20020315104530.C4648@bandsept.script.jussieu.fr>

 On Fri, Mar 15, 2002 at 10:45:30AM +0100, Stoned Elipot wrote:
 > Hi,
 > I encountered the following problem.
 > Try to apply diffs from PR 15896 and start the build of this pkg,
 > on a 1.5.x system you should see it failing trying to use 
 > "perl -V:cpp" with args "perl -V:cppflags"...
 > 
 > On my 1.5 systems this is:
 > cpp -fno-strict-aliasing -I/usr/pkg/include
 > -> cpp: Invalid option `-fno-strict-aliasing'
 > 
 > This runs ok on a -current system hence the PR being valid as the submitter
 > use 1.5ZA.
 > 
 > I don't know how this should be fixed, I guess you'll have more clue than me :)

 This is an interesting problem.  The perl5 Configure script tries to strip
 away flags that cpp doesn't understand by testing each flag and checking
 whether cpp executed correctly.  Apparently something is going wrong with
 this check.  I'll need to check what's wrong and forward these back to the
 perl development people before the next 5.x release of perl is released.
 Could you please file a separate PR on this issue?  If you wish, you can
 just point the Responsible: person to me.

 	Thanks,

 	-- Johnny Lam <jlam@jgrind.org>

 ----- End forwarded message -----
Responsible-Changed-From-To: pkg-manager->jlam 
Responsible-Changed-By: jlam 
Responsible-Changed-When: Fri Mar 15 13:19:46 PST 2002 
Responsible-Changed-Why:  
I'm the maintainer. 

From: "Johnny C. Lam" <jlam@netbsd.org>
To: Stoned Elipot <seb@script.jussieu.fr>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/15935: perl package's Config.pm holds unusable values for cpp and cppflags for
Date: Thu, 21 Mar 2002 22:42:42 -0800

 On Fri, Mar 15, 2002 at 05:54:06PM +0100, Stoned Elipot wrote:
 > 
 > Perl package's Config.pm holds cpp and cpp flags for module compilation -
 > and more ? (I am not a perl expert). On a 1.5.x systems those values
 > are not usable together. As an example latest CPAN module IO-Tty -as of this
 > writing it is at version 1.00, (c.f. http://search.cpan.org/search?dist=IO-Tty)
 > cannot be installed...
 > Note: on -current the values are the same but are usable...
 > >How-To-Repeat:
 > With a failry recent perl package installed try:
 > $ perl -V:cpp
 > cpp='cpp';
 > $ perl -V:cppflags  
 > cppflags='-fno-strict-aliasing -I/usr/pkg/include';
 > $ eval `perl -V:cpp`; eval `perl -V:cppflags` ; $cpp $cppflags /dev/null
 > cpp: Invalid option `-fno-strict-aliasing'

 I've done some more investigation.  From the perl documentation for
 Config.pm (emphasis by me):

        "cpp"
            This variable is used internally by Configure to
            determine the full pathname (if any) of the cpp pro-
            gram.  After Configure runs, the value is reset to a
            plain "cpp" and *is* *not* *useful*.

 More reading shows that the correct way to invoke the preprocessor is:

 	# cppstdin=`perl -V:cppstdin`
 	# cppminus=`perl -V:cppminus`
 	# $cppstdin $cppminus < input > output

 Alternatively, you can also replace "cppstdin" with "cpprun" and "cppminus"
 with "cpplast".

 Judging from this, the bug is not in perl and is actually in the perl5
 module that incorrectly uses "cpp" instead of the way noted above.  I
 consider this PR closed.

 	Cheers,

 	-- Johnny Lam <jlam@netbsd.org>
State-Changed-From-To: open->closed 
State-Changed-By: jlam 
State-Changed-When: Thu Mar 21 22:58:34 PST 2002 
State-Changed-Why:  
As noted, the bug is not in perl but in the perl module. 

From: Stoned Elipot <seb@script.jussieu.fr>
To: "Johnny C. Lam" <jlam@netbsd.org>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/15935: perl package's Config.pm holds unusable values for cpp and cppflags for
Date: Fri, 22 Mar 2002 08:41:31 +0100

 On Thu, Mar 21, 2002 at 10:42:42PM -0800, Johnny C. Lam wrote:
 > Judging from this, the bug is not in perl and is actually in the perl5
 > module that incorrectly uses "cpp" instead of the way noted above.  I
 > consider this PR closed.

 Fine by me. Thanks for investigating this!

 Cheers, Stoned.

>Unformatted:
 1.5.x systems
 From: seb
 Reply-To: seb
 X-send-pr-version: 3.95

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.