From voland@unlink.catpipe.net  Fri Nov  9 08:04:34 2001
Return-Path: <voland@unlink.catpipe.net>
Received: from unlink.catpipe.net (unlink.catpipe.net [195.249.214.172])
	by hub.freebsd.org (Postfix) with ESMTP id F346437B418
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  9 Nov 2001 08:04:32 -0800 (PST)
Received: (from voland@localhost)
	by unlink.catpipe.net (8.11.6/8.11.6) id fA9G4Mg00878;
	Fri, 9 Nov 2001 17:04:22 +0100 (CET)
	(envelope-from voland)
Message-Id: <200111091604.fA9G4Mg00878@unlink.catpipe.net>
Date: Fri, 9 Nov 2001 17:04:22 +0100 (CET)
From: Vadim Belman <voland@catpipe.net>
Reply-To: Vadim Belman <voland@lflat.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Perl's Config.pm is broken with respect to system includes.
X-Send-Pr-Version: 3.113
X-GNATS-Notify: tobez

>Number:         31877
>Category:       bin
>Synopsis:       Perl's Config.pm is broken with respect to system includes.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    ru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 09 08:10:00 PST 2001
>Closed-Date:    Tue Nov 27 08:29:07 PST 2001
>Last-Modified:  Tue Nov 27 08:32:44 PST 2001
>Originator:     Vadim Belman
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
catpipe Systems ApS
>Environment:
System: FreeBSD ***** 5.0-CURRENT FreeBSD 5.0-CURRENT #3: Mon Nov  5 00:44:24 CET 2001     root@*****:/usr/obj/usr/src/sys/PUPPY  i386


>Description:

	The following line in Perl's Config.pm breaks compilation of
multiple p5-ports and independent Perl modules:

optimize='-nostdinc -O -pipe   -DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"   -I/usr/obj/usr/src/i386/usr/include '

	Due to presence of -nostdinc any build of Perl XS fails if /usr/obj
directory has been removed prior to compilation as compiler will look for
includes in /usr/obj/usr/src/i386/usr/include instead of presumed
/usr/include.

>How-To-Repeat:

	Build and install world in order to get Perl updated and BSDPAN
installed.

	# cd /usr/obj && rm -rf *
	cd /usr/ports/security/p5-Digest-MD5
	make

	And make fails.

>Fix:

	Immidiate workaround would be either removal of -nostdinc or
changing the include path with proper one. I.e. one of the following will
do:

optimize='-O -pipe   -DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"   -I/usr/obj/usr/src/i386/usr/include '
optimize='-nostdinc -O -pipe   -DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN"   -I/usr/include '

	No fix for buildworld is known: Perl building is a mess, Anton must
know better.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: tobez 
State-Changed-When: Sun Nov 11 17:55:54 PST 2001 
State-Changed-Why:  
The problem was introduced in rev. 1.27 of 
gnu/usr.bin/perl/Makefile.inc.  It is not feasible to back it out at 
this point, since rev. 1.27 fixed another problem with Perl build. 

Unfortunately, the proper fix is rather non-trivial.  As a workaround I 
suggest you to put CFLAGS=-O -pipe (or whatever other value you usually 
use) into /etc/make.conf.  This will fix the problem, but this will mean 
that buildworld will not be done *really* properly - at this point 
setting CFLAGS in /etc/make.conf leads to -nostdinc being dropped in 
places where it is supposed to be.  This will not bite a typical 
buildworld user. 

We discussed the problem with Ruslan, and he decided to try to come up 
with the proper fix in the future. 


Responsible-Changed-From-To: freebsd-bugs->ru 
Responsible-Changed-By: tobez 
Responsible-Changed-When: Sun Nov 11 17:55:54 PST 2001 
Responsible-Changed-Why:  
Ruslan's going to take care of this. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=31877 
State-Changed-From-To: analyzed->closed 
State-Changed-By: ru 
State-Changed-When: Tue Nov 27 08:29:07 PST 2001 
State-Changed-Why:  
The offending change to gnu/usr.bin/perlMakefile.inc was backed out. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=31877 
>Unformatted:
