From nobody@FreeBSD.org  Sun Jun 17 10:32:35 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 1171516A468
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 17 Jun 2007 10:32:35 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 025D913C447
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 17 Jun 2007 10:32:35 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l5HAWYKr005006
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 17 Jun 2007 10:32:34 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l5HAWYjo005003;
	Sun, 17 Jun 2007 10:32:34 GMT
	(envelope-from nobody)
Message-Id: <200706171032.l5HAWYjo005003@www.freebsd.org>
Date: Sun, 17 Jun 2007 10:32:34 GMT
From: Joshua Isom <jrisom@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: STABLE fails to build on amd64
X-Send-Pr-Version: www-3.0

>Number:         113793
>Category:       amd64
>Synopsis:       STABLE fails to build on amd64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-amd64
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 17 10:40:04 GMT 2007
>Closed-Date:    Fri Jun 22 19:27:26 GMT 2007
>Last-Modified:  Fri Jun 22 19:27:26 GMT 2007
>Originator:     Joshua Isom
>Release:        FreeBSD 6.2-STABLE
>Organization:
>Environment:
FreeBSD freebsd 6.2-STABLE FreeBSD 6.2-STABLE #3: Sat Jun  9 21:32:50 CDT 2007     root@freebsd:/usr/obj/usr/src/sys/CUSTOM  amd64

>Description:
I sometimes csup /usr/src and /usr/ports and update my system.  But recently, I haven't been able to rebuild my system.  The end of the make output is:

---------------------
building shared library libncurses.so.6
/libexec/ld-elf.so.1: ./libncurses.so.6: unsupported file layout
"/usr/src/lib/ncurses/ncurses/Makefile", line 14: warning: "egrep 'NCURSES_MAJOR[   ]*=' /usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/dist.mk | sed -e 's%^[^0-9]*%%'" returned non-zero status
/libexec/ld-elf.so.1: ./libncurses.so.6: unsupported file layout
"/usr/src/lib/ncurses/ncurses/Makefile", line 15: warning: "egrep 'NCURSES_MINOR[   ]*=' /usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/dist.mk | sed -e 's%^[^0-9]*%%'" returned non-zero status
/libexec/ld-elf.so.1: ./libncurses.so.6: unsupported file layout
"/usr/src/lib/ncurses/ncurses/Makefile", line 16: warning: "egrep 'NCURSES_PATCH[   ]*=' /usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/dist.mk | sed -e 's%^[^0-9]*%%'" returned non-zero status
sh /usr/src/tools/install.sh -C -o root -g wheel -m 444   libncurses.a /usr/obj/usr/src/lib32/usr/lib32
/libexec/ld-elf.so.1: ./libncurses.so.6: unsupported file layout
--------------------

And a "stripped" version of my kernel config is:

---------------
machine         amd64
cpu             HAMMER
ident           CUSTOM
makeoptions     DEBUG=-g
options         SCHED_4BSD
options         PREEMPTION
options         INET
options         INET6
options         FFS
options         SOFTUPDATES
options         UFS_ACL
options         UFS_DIRHASH
options         MD_ROOT
options         NFSCLIENT
options         NFSSERVER
options         NFS_ROOT
options         NTFS
options         MSDOSFS
options         CD9660
options         PROCFS
options         PSEUDOFS
options         GEOM_GPT
options         COMPAT_43
options         SCSI_DELAY=5000
options         KTRACE
options         SYSVSHM
options         SYSVMSG
options         SYSVSEM
options         _KPOSIX_PRIORITY_SCHEDULING
options         KBD_INSTALL_CDEV
options         ADAPTIVE_GIANT
device          acpi
device          pci
device          ata
device          atadisk
device          atapicd
options         ATA_STATIC_ID
device          scbus
device          da
device          atkbdc
device          atkbd
device          psm
device          kbdmux
device          vga
device          splash
device          sc
device          agp
device          sio
device          ppc
device          ppbus
device          lpt
device          ppi
device          miibus
device          vr
device          loop
device          random
device          ether
device          pty
device          md
device          bpf
device          uhci
device          ehci
device          usb
device          ugen
device          umass
---------------

I've been running `make buildworld buildkernel KERNCONF=CUSTOM` to get these results, but one enabling linux compat fails as well with the same problem.

The completel make output is 11 megs so I'm not sure how to provide access to it easily.  I've "cleaned" up my make.conf, leaving only the two perl env settings, although I doubt that would have any impact.
>How-To-Repeat:
Given the severity and the fact that it continually happens, and has for about a week(and I at least imagine someone with amd64 other than me is following stable), I don't know if it's reproducable outside my system.  I do have a complete userland jail(I don't recall if it's the save revision as my system) that I'd be willing to provide access too if someone wishes to try to diagnose the issue.  I have tried building in the jail but I got the same error.  I've deleted /usr/obj a few times, and /usr/src once before updating the -stable, but to no avail.
>Fix:


>Release-Note:
>Audit-Trail:

From: Joshua Isom <jrisom@gmail.com>
To: bug-followup@FreeBSD.org,
 jrisom@gmail.com
Cc:  
Subject: Re: amd64/113793: STABLE fails to build on amd64
Date: Fri, 22 Jun 2007 13:31:23 -0500

 I believe I have discovered the cause of this.  After rebooting under a 
 6.2-RELEASE generic kernel and rebuilding world inside a jail running 
 the 6.2-RELEASE userland and getting the same problem, I knew there had 
 to be some misconfiguration somewhere.  But to support testing a 
 program that uses a shared library without installing it, I had 
 LD_LIBRARY_PATH set to include '.' which seems to have caused the 
 fault.  The make scripts don't do anything to ignore LD_LIBRARY_PATH 
 which causes 64-bit executables to try to use a 32-bit library in the 
 present directory which fails.
 
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Fri Jun 22 19:26:42 UTC 2007 
State-Changed-Why:  
Pilot error. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113793 
>Unformatted:
