Bug 31877

Summary: Perl's Config.pm is broken with respect to system includes.
Product: Base System Reporter: Vadim Belman <voland>
Component: binAssignee: ru <ru>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   

Description Vadim Belman 2001-11-09 16:10:00 UTC
	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.

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.
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.
Comment 1 Anton Berezin freebsd_committer freebsd_triage 2001-11-12 01:55:54 UTC
State Changed
From-To: open->analyzed

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. 


Comment 2 Anton Berezin freebsd_committer freebsd_triage 2001-11-12 01:55:54 UTC
Responsible Changed
From-To: freebsd-bugs->ru

Ruslan's going to take care of this.
Comment 3 ru freebsd_committer freebsd_triage 2001-11-27 16:29:07 UTC
State Changed
From-To: analyzed->closed

The offending change to gnu/usr.bin/perlMakefile.inc was backed out.