Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 May 2000 01:23:21 +0900
From:      FUJISHIMA Satsuki <k5@cheerful.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/18489: print/acroread4 doesn't properly branded to Linux
Message-ID:  <86puquz85i.wl@cheerful.com>

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

>Number:         18489
>Category:       ports
>Synopsis:       print/acroread4 doesn't properly branded to Linux
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 10 09:30:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     FUJISHIMA Satsuki
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
N/A
>Environment:

	5.0-CURRENT after recent brandelf method change(around 17th April).

>Description:

	brandelf brands binary with EI_OSABI but ld doesn't see it if
	old brand exists on it. This is the case of current acroread4
	port.

	First, untouched binary in tarball is:

$ ls -l acroread
-rwxr-xr-x  1 k5  wheel  3379910 Jan 27 09:30 acroread*
$ hd acroread|head -1
00000000  7f 45 4c 46 01 01 01 00  00 00 00 00 00 00 00 00  |.ELF............|

	This hasn't been branded but works on FreeBSD.

	Next, the binary was stripped during make install:

$ ls -l acroread
-rwxr-xr-x  1 k5  wheel  2549840 May 11 00:47 acroread*
$ hd acroread|head -1
00000000  7f 45 4c 46 01 01 01 09  46 72 65 65 42 53 44 00  |.ELF....FreeBSD.|

	strip(1) brands it to FreeBSD with both new and old method.
	This is not so good.

	Then, brandelf it to Linux at post-install target:

$ hd acroread|head -1
00000000  7f 45 4c 46 01 01 01 03  46 72 65 65 42 53 44 00  |.ELF....FreeBSD.|

	Properly branded to Linux with new method but old brand string
	is still there. The problem occurrs here; ld looks old method
	prior to new one for compatibility reason. So this acroread
	binary would be treated as FreeBSD native and then bombed.

	To avoid this confusion: use linux strip instead.
	Or wait for October when old brand method support would be
	removed. :)

	Also strip(1) should not use old method to brand binary I think.

	I don't know about Alpha.

>How-To-Repeat:

/usr/ports/print/acroread4# make install
/usr/ports/print/acroread4# exit
$ acroread4
ELF interpreter /lib/ld-linux.so.2 not found
Abort trap

>Fix:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/print/acroread4/Makefile,v
retrieving revision 1.25
diff -u -r1.25 Makefile
--- Makefile	2000/04/14 13:18:13	1.25
+++ Makefile	2000/05/10 13:24:36
@@ -57,7 +57,7 @@
 post-install:
 .if ${ARCH} == "i386"
 	@${PERL} -pi -e 's:Linux\):FreeBSD|Linux):g' ${PREFIX}/Acrobat4/bin/acroread
-	@strip ${PREFIX}/Acrobat4/Reader/intellinux/bin/acroread
+	@/compat/linux/usr/bin/strip ${PREFIX}/Acrobat4/Reader/intellinux/bin/acroread
 	@brandelf -t Linux ${PREFIX}/Acrobat4/Reader/intellinux/bin/acroread
 .elif ${ARCH} == "alpha"
 	@${PERL} -pi -e 's:OSF1\):FreeBSD|OSF1):g' ${PREFIX}/Acrobat4/bin/acroread

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


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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