NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/47922: build fail/risk building 6.1.x on 6.99.x>19 (ld picks wrong lib)
>Number: 47922
>Category: bin
>Synopsis: build fail/risk building 6.1.x on 6.99.x>19 (ld picks wrong
>lib)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jun 12 14:55:00 +0000 2013
>Originator: Frank Kardel
>Release: NetBSD 6.99.20
>Organization:
>Environment:
System: NetBSD pip.kardel.name 6.99.20 NetBSD 6.99.20 (PIPGEN) #34: Sun May 26
16:57:25 CEST 2013
kardel%pip.kardel.name@localhost:/fs/raid1a/src/NetBSD/cur/src/obj.amd64/sys/arch/amd64/compile/PIPGEN
amd64
Architecture: x86_64
Machine: amd64
>Description:
When doing a build.sh release of a 6.1.x tree the npfctl link
fails with:
link npfctl/npfctl
/lib/libcrypt.so.1: undefined reference to `__explicit_bzero'
collect2: ld returned 1 exit status
Note, that /lib/libcrypt.so.1 is referenced (consequently tripping
over the missing __explicit_bzero). ld should never reference
host libs when linking for a release build.
Root cause is a missing -lcrypt in the link parameters for
npfctl.
Maybe it is useful to add safeguards/fix build logic.
ld should have searched for indirect references to libraries
in the --systemroot hierarchy.
There are quit a few more oversights wrt/ needed libraries.
see below.
BTW: when cross building (i386 on amd64) everything is fine.
This looks like there may be some risks lurking when
ld searches for dependent libraries by itself.
>How-To-Repeat:
Attempt to build.sh release 6.1 on a 6.99.x>19 host
>Fix:
Add missing libraries? fix ld to honor --systemroot?
Quick and dirty patch to fix implicit host library references.
Index: external/mit/xorg/bin/bdftopcf/Makefile
===================================================================
RCS file: /cvsroot/src/external/mit/xorg/bin/bdftopcf/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- external/mit/xorg/bin/bdftopcf/Makefile 23 Jul 2011 23:42:02 -0000
1.2
+++ external/mit/xorg/bin/bdftopcf/Makefile 12 Jun 2013 12:44:56 -0000
@@ -4,7 +4,7 @@
PROG= bdftopcf
-LDADD+= -lXfont -lfontenc -lfreetype -lm -lz -lbz2
+LDADD+= -lXfont -lICE -lfontenc -lfreetype -lXt -lX11 -lm -lz -lbz2
DPADD+= ${LIBXFONT} ${LIBFONTENC} ${LIBFREETYPE} ${LIBM} ${LIBZ}
${LIBBZ2}
.PATH: ${X11SRCDIR.${PROG}}
Index: external/mit/xorg/bin/xbiff/Makefile
===================================================================
RCS file: /cvsroot/src/external/mit/xorg/bin/xbiff/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- external/mit/xorg/bin/xbiff/Makefile 21 Feb 2011 04:40:24 -0000
1.2
+++ external/mit/xorg/bin/xbiff/Makefile 12 Jun 2013 12:44:56 -0000
@@ -5,7 +5,7 @@
PROG= xbiff
SRCS= xbiff.c Mailbox.c
-LDADD+= -lXext -lXaw -lXmu -lXt -lX11 -lSM -lICE -lXau
+LDADD+= -lXext -lXaw -lXmu -lXt -lX11 -lSM -lICE -lXau -lXpm
DPADD+= ${LIBXEXT} ${LIBXAW} ${LIBXMU} ${LIBXT} ${LIBX11} ${LIBSM}
${LIBICE} \
${LIBXAU}
Index: external/mit/xorg/bin/xfs/Makefile
===================================================================
RCS file: /cvsroot/src/external/mit/xorg/bin/xfs/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- external/mit/xorg/bin/xfs/Makefile 21 Nov 2010 02:33:41 -0000 1.8
+++ external/mit/xorg/bin/xfs/Makefile 12 Jun 2013 12:44:56 -0000
@@ -59,7 +59,7 @@
FILESDIR= ${XFSCONFIGDIR}
-LDADD+= -lXfont -lfontenc -lXfontcache -lXext -lX11 -lfreetype -lm -lz
+LDADD+= -lXfont -lfontenc -lXfontcache -lXext -lXt -lICE -lX11
-lfreetype -lm -lz
DPADD+= ${LIBXFONT} ${LIBFONTENC} ${LIBXFONTCACHE} ${LIBXEXT} ${LIBX11}
\
${LIBFREETYPE} ${LIBM} ${LIBZ}
Index: external/mit/xorg/server/xorg-server/hw/vfb/Makefile
===================================================================
RCS file: /cvsroot/src/external/mit/xorg/server/xorg-server/hw/vfb/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- external/mit/xorg/server/xorg-server/hw/vfb/Makefile 2 Aug 2011
09:11:38 -0000 1.11
+++ external/mit/xorg/server/xorg-server/hw/vfb/Makefile 12 Jun 2013
12:44:56 -0000
@@ -76,10 +76,13 @@
-lXfont \
-lfreetype \
-lXau \
+ -lICE \
+ -lXt \
-lfontenc \
${LIBCWRAPPER} \
-lpixman-1 \
-lXdmcp \
+ -lX11 \
-lz \
-lm \
-lcrypto
Index: external/mit/xorg/server/xorg-server/hw/xfree86/Xorg/Makefile
===================================================================
RCS file:
/cvsroot/src/external/mit/xorg/server/xorg-server/hw/xfree86/Xorg/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- external/mit/xorg/server/xorg-server/hw/xfree86/Xorg/Makefile 22 Oct
2011 14:40:41 -0000 1.4
+++ external/mit/xorg/server/xorg-server/hw/xfree86/Xorg/Makefile 12 Jun
2013 12:44:56 -0000
@@ -60,8 +60,8 @@
LDADD+= ${LDADD.hw/xfree86/dri}
LDADD+= ${LDADD.hw/xfree86/dixmods/fb}
LDADD+= ${LDADD.hw/xfree86/dixmods/xorgxkb}
-LDADD+= -lpixman-1 -lXfont -lfreetype -lXau -lfontenc -lXdmcp
-LDADD+= -lpciaccess -ldrm
+LDADD+= -lpixman-1 -lXfont -lfreetype -lXt -lICE -lXau -lfontenc -lXdmcp
+LDADD+= -lX11 -lpciaccess -ldrm
LDADD+= -lcrypto
LDADD+= -Wl,--no-whole-archive
Index: external/mit/xorg/server/xorg-server/hw/xnest/Makefile
===================================================================
RCS file: /cvsroot/src/external/mit/xorg/server/xorg-server/hw/xnest/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- external/mit/xorg/server/xorg-server/hw/xnest/Makefile 2 Aug 2011
09:11:38 -0000 1.14
+++ external/mit/xorg/server/xorg-server/hw/xnest/Makefile 12 Jun 2013
12:44:56 -0000
@@ -70,7 +70,7 @@
${LDADD.os} \
${LDADD.glx} \
-lXfont -lXext -lfontenc \
- -lpixman-1 -lX11 -lXau \
+ -lpixman-1 -lXt -lICE -lX11 -lXau \
-lXdmcp -lfreetype -lm -lcrypto
DPADD+= ${LDADD.dix} \
Index: usr.sbin/npf/npfctl/Makefile
===================================================================
RCS file: /cvsroot/src/usr.sbin/npf/npfctl/Makefile,v
retrieving revision 1.5.2.5
diff -u -r1.5.2.5 Makefile
--- usr.sbin/npf/npfctl/Makefile 11 Feb 2013 21:49:48 -0000 1.5.2.5
+++ usr.sbin/npf/npfctl/Makefile 12 Jun 2013 12:45:11 -0000
@@ -11,7 +11,7 @@
SRCS+= npf_scan.l npf_parse.y
YHEADER= 1
-LDADD+= -lnpf -lprop -lcrypto -lutil -ly
+LDADD+= -lnpf -lprop -lcrypto -lcrypt -lutil -ly
DPADD+= ${LIBNPF} ${LIBPROP} ${LIBUTIL}
WARNS= 5
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index