Bug 113793

Summary: STABLE fails to build on amd64
Product: Base System Reporter: Joshua Isom <jrisom>
Component: amd64Assignee: freebsd-amd64 (Nobody) <amd64>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 6.2-STABLE   
Hardware: Any   
OS: Any   

Description Joshua Isom 2007-06-17 11:40:04 UTC
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.
Comment 1 Joshua Isom 2007-06-22 19:31:23 UTC
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.
Comment 2 ru freebsd_committer freebsd_triage 2007-06-22 20:26:42 UTC
State Changed
From-To: open->closed

Pilot error.