Bug 115769

Summary: Building the lang/perl5.8 port inside a jail fails
Product: Ports & Packages Reporter: Aaron Gifford <astounding>
Component: Individual Port(s)Assignee: Anton Berezin <tobez>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Aaron Gifford 2007-08-23 22:00:07 UTC
The perl 5.8 port (/usr/ports/lang/perl5.8) fails to build inside of a jail with:

  ========== EXCERPT ==========
  make lib/re.pm
  "makefile", line 952: Need an operator
  make: fatal errors encountered -- cannot continue
  *** Error code 1
  
  Stop in /usr/ports/lang/perl5.8/work/perl-5.8.8.
  *** Error code 1
  
  Stop in /usr/ports/lang/perl5.8.
  ========== END OF EXCERPT ==========

This first error is be due to an error in the autogenerated makefile /usr/ports/lang/perl5.8/work/perl-5.8.8/makefile:

  ========== EXCERPT ==========
  # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
  # If this runs make out of memory, delete /usr/include lines.
  0
  malloc$(OBJ_EXT): /usr/include/machine/_types.h
  malloc$(OBJ_EXT): /usr/include/memory.h
  ========== END OF EXCERPT =========
  
Notice the line consisting of a zero '0' and nothing else?  That's the culprit.  If I correct that by hand by removing that line and continuing the build, the second autogenerated makefile error will stop things:

  ========== EXCERPT ==========
  cd x2p; LD_LIBRARY_PATH=/usr/ports/lang/perl5.8/work/perl-5.8.8 make s2p
  "makefile", line 159: Need an operator
  make: fatal errors encountered -- cannot continue
  *** Error code 1
  
  Stop in /usr/ports/lang/perl5.8/work/perl-5.8.8.
  *** Error code 1
  
  Stop in /usr/ports/lang/perl5.8.
  ========== END OF EXCERPT =========

This error comes from the exact same error in the following autogenerated makefile /usr/ports/lang/perl5.8/work/perl-5.8.8/x2p/makefile:

  ========== EXCERPT ==========
  # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
  # If this runs make out of memory, delete /usr/include lines.
  0
  hash$(OBJ_EXT): ../config.h
  hash$(OBJ_EXT): ../handy.h
  ========== END OF EXCERPT =========

Once again, when this error is encountered, hand-edit the file and remove the '0' line and then the build completes.

Fix: 

I have no idea how to fix the problem, but it is obvious that during 'make config' of the port the two 'makefile' files are having a spurious '0' output, corrupting them.  If I was more familiar with the makefile generation process I'd attempt to figure this out myself, but sadly I'm clueless in this area.
How-To-Repeat: Launch a FreeBSD jail with a /usr/ports tree and attempt to build the perl 5.8 port within it.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-08-23 23:39:56 UTC
Responsible Changed
From-To: freebsd-ports-bugs->tobez

Over to maintainer
Comment 2 Alexey Rubtsov 2007-08-24 04:20:18 UTC
>> I have no idea how to fix the problem

Need to execute ldconfig -elf /lib /usr/lib into jail
after jail creation.

-- 
Alexey Rubtsov
Plesk(Unix) Developer
SwSoft, Inc.
E-mail: arubtsov@swsoft.com
Phone: +7.923.232.8243
ICQ UIN: 929399162
Web Site: www.swsoft.com
Comment 3 Anton Berezin freebsd_committer freebsd_triage 2007-08-24 09:18:59 UTC
State Changed
From-To: open->closed

Operator error.  Make sure you have /dev/null which is a device and not 
a regular file.