From k5@cheerful.com  Wed Jun 28 10:00:51 2000
Return-Path: <k5@cheerful.com>
Received: from m08.alpha-net.ne.jp (m08.alpha-net.ne.jp [210.229.64.38])
	by hub.freebsd.org (Postfix) with ESMTP id 3ED7137BD33
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 28 Jun 2000 10:00:45 -0700 (PDT)
	(envelope-from k5@cheerful.com)
Received: from kyoto-tc012-p128.alpha-net.ne.jp (kyoto-tc012-p128.alpha-net.ne.jp [210.237.118.162])
	by m08.alpha-net.ne.jp (8.9.3/3.7W) with ESMTP id BAA20836
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 29 Jun 2000 01:58:32 +0900 (JST)
Received: from souffle.bogus-local.net (souffle.bogus-local.net [192.168.1.1])
	by marie.bogus-local.net (Postfix) with ESMTP id 0C42D3D14
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 29 Jun 2000 01:39:43 +0900 (JST)
Message-Id: <864s6doj3l.wl@cheerful.com>
Date: Thu, 29 Jun 2000 01:39:42 +0900
From: FUJISHIMA Satsuki <k5@cheerful.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: emulators/wine should be linked with -rpath

>Number:         19562
>Category:       ports
>Synopsis:       wine should be linked with -rpath
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    steve
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 28 10:10:02 PDT 2000
>Closed-Date:    Fri Jul 7 12:13:41 PDT 2000
>Last-Modified:  Fri Jul 07 12:15:29 PDT 2000
>Originator:     FUJISHIMA Satsuki
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
N/A
>Environment:

	Ports-current which installs wine libs under ${PREFIX}/lib/wine

>Description:

	Wine binaries(wine and winedbg actually) doesn't run after
	system reboot because they don't know where shared libraries
	installed. ELF binaries should be linked with -rpath to tell
	them the place of sharelibs that were installed to
	non-standard place. (A kind of PURE ELF system doesn't have
	ldconfig)

>How-To-Repeat:

(i) install wine
# cd /usr/ports/emulators/wine && make install
$ wine
<< It works here >>

(ii) then reboot or ldconfig to default paths
# shutdown -r now
or
# ldconfig /usr/lib/compat /usr/X11R6/lib /usr/local/lib
# ldconfig -r|grep wine
<< nothing found >>
# ldd /usr/local/bin/wine
/usr/local/bin/wine:
        libwine.so => not found (0x0)
        libncurses.so.5 => /usr/lib/libncurses.so.5 (0x28065000)
        libxpg4.so.3 => /usr/lib/libxpg4.so.3 (0x280a5000)
        libm.so.2 => /usr/lib/libm.so.2 (0x280a7000)
        libutil.so.3 => /usr/lib/libutil.so.3 (0x280c3000)
        libc.so.4 => /usr/lib/libc.so.4 (0x280cd000)
<< It no longer works >>

(iii) with patch below
# cd /usr/ports/emulators/wine && patch < THISMAIL && make install
# ldconfig /usr/lib/compat /usr/X11R6/lib /usr/local/lib
# ldconfig -r|grep wine
<< nothing found of cource >>
# ldd /usr/local/bin/wine
/usr/local/bin/wine:
        libwine.so => /usr/local/lib/wine/libwine.so (0x28065000)
        libncurses.so.5 => /usr/lib/libncurses.so.5 (0x282ad000)
        libxpg4.so.3 => /usr/lib/libxpg4.so.3 (0x282ed000)
        libm.so.2 => /usr/lib/libm.so.2 (0x282ef000)
        libutil.so.3 => /usr/lib/libutil.so.3 (0x2830b000)
        libc.so.4 => /usr/lib/libc.so.4 (0x28315000)
<< /usr/local/lib/wine is hardcoded to ELF binary >>

>Fix:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/emulators/wine/Makefile,v
retrieving revision 1.85
diff -u -r1.85 Makefile
--- Makefile	2000/06/25 21:20:00	1.85
+++ Makefile	2000/06/28 16:34:31
@@ -22,6 +22,7 @@
 
 WRKSRC=		${WRKDIR}/wine-${PORTVERSION:S/.//g}
 GNU_CONFIGURE=	yes
+CONFIGURE_ENV=	LIBS=-Wl,-rpath,${PREFIX}/lib/wine
 INSTALLS_SHLIB=	yes
 LDCONFIG_DIRS=	%%PREFIX%%/lib/wine
 MAN1=		wine.1


>Release-Note:
>Audit-Trail:

From: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
To: Satsuki FUJISHIMA <k5@cheerful.com>
Cc: freebsd-gnats-submit@freebsd.org, ports@freebsd.org
Subject: Re: ports/19562: wine should be linked with -rpath
Date: Tue, 4 Jul 2000 01:44:10 +0200 (CEST)

   +CONFIGURE_ENV= LIBS=-Wl,-rpath,${PREFIX}/lib/wine
 
 You're right, this patch seems to be necessary. Thanks for pointing this
 out; apparently most of us have uptimes that long that we failed to notice
 it! ;-)
 
 Can someone please install that patch for me? I do not have cvs write
 access.
 
 Gerald (Wine ports maintainer)
 -- 
 Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/
 Have a look at http://petition.eurolinux.org -- it's not about Linux, btw!
 
 
Responsible-Changed-From-To: freebsd-ports->steve 
Responsible-Changed-By: steve 
Responsible-Changed-When: Thu Jul 6 19:01:50 PDT 2000 
Responsible-Changed-Why:  
I have this one ready to commit. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=19562 
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Fri Jul 7 12:13:41 PDT 2000 
State-Changed-Why:  
Committed, thanks! 

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