Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Sep 2009 13:18:58 GMT
From:      Alexander Best <alexbestms@math.uni-muenster.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/138878: [patch] lib/ld-2.6.1.so in emulators/linux_dist-gentoo-stage* needs to be brandelf'ed linux
Message-ID:  <200909161318.n8GDIwHd052913@www.freebsd.org>
Resent-Message-ID: <200909161320.n8GDK2IN082403@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         138878
>Category:       ports
>Synopsis:       [patch] lib/ld-2.6.1.so in emulators/linux_dist-gentoo-stage* needs to be brandelf'ed  linux
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 16 13:20:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Best
>Release:        9.0-CURRENT
>Organization:
>Environment:
FreeBSD otaku 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r197234: Wed Sep 16 01:10:00 CEST 2009     root@otaku:/usr/obj/usr/src/sys/ARUNDEL  i386
>Description:
emulators/linux_dist-gentoo-stage* don't brandelf lib/ld-2.6.1.so as linux. so the lib remains type 0 (svr4).

running a jail in /usr/local/gentoo-stage* and doing `ldd /bin/ls` e.g. fails with this error message:

ELF binary type "0" not known.
/usr/bin/ldd: line 169: /lib/ld-linux.so.2: cannot execute binary file
ldd: exited with unknown exit code (126)

the attached patch fixes the problem.

cheers.
alex
>How-To-Repeat:
see full description for and example to reproduce the problem.
>Fix:


Patch attached with submission follows:

--- emulators/linux_dist-gentoo-stage3/Makefile.ORIG	2009-09-16 14:52:07.000000000 +0200
+++ emulators/linux_dist-gentoo-stage3/Makefile	2009-09-16 14:55:18.000000000 +0200
@@ -100,6 +100,7 @@
 		${PREFIX}/${PREFIX_SUBDIR}usr/bin ${PREFIX}/${PREFIX_SUBDIR}/usr/sbin \
 		-type f -print0 | ${XARGS} -0 ${FILE} \
 		| ${GREP} ELF | ${CUT} -d : -f 1 | ${XARGS} ${BRANDELF} -t Linux
+	@${BRANDELF} -t Linux ${PREFIX}/${PREFIX_SUBDIR}/lib/ld-2.6.1.so
 	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
 	@${CAT} ${PKGMESSAGE}
 
--- emulators/linux_dist-gentoo-stage1/Makefile.ORIG	2009-09-16 14:55:40.000000000 +0200
+++ emulators/linux_dist-gentoo-stage1/Makefile	2009-09-16 14:56:00.000000000 +0200
@@ -86,6 +86,7 @@
 		-type f -print0 | ${XARGS} -0 ${FILE} \
 		| ${GREP} ELF | ${CUT} -d : -f 1 \
 		| ${XARGS} ${BRANDELF} -t Linux
+	@${BRANDELF} -t Linux ${PREFIX}/${PREFIX_SUBDIR}/lib/ld-2.6.1.so
 	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
 	@${CAT} ${PKGMESSAGE}
 


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909161318.n8GDIwHd052913>