From owner-freebsd-amd64@FreeBSD.ORG Thu Mar 25 14:22:00 2004 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 222EB16A4CE for ; Thu, 25 Mar 2004 14:22:00 -0800 (PST) Received: from daintree.corp.yahoo.com (daintree.corp.yahoo.com [216.145.52.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1391443D4C for ; Thu, 25 Mar 2004 14:21:59 -0800 (PST) (envelope-from peter@yahoo-inc.com) Received: by daintree.corp.yahoo.com (Postfix, from userid 2154) id CADA2881E; Thu, 25 Mar 2004 14:21:59 -0800 (PST) From: Peter Wemm To: freebsd-amd64@freebsd.org Date: Thu, 25 Mar 2004 14:21:59 -0800 User-Agent: KMail/1.6.1 References: <200403250951.i2P9pMDu015566@k9.a1.asic.gov.au> In-Reply-To: <200403250951.i2P9pMDu015566@k9.a1.asic.gov.au> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200403251421.59558.peter@wemm.org> Subject: Re: i386 jdk and lib32 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Mar 2004 22:22:00 -0000 On Thursday 25 March 2004 01:51 am, Tony Maher wrote: > Hello > > I ran Peter Wemm's build32.sh script and tested with ksh93 package > built on an i386 box. All worked well. > > Encouraged I created jdk1.3 on i386 machine and installed on amd64 > box. Trying to run any of the java binaries resulted in > (paraphrasing) /libexec/ld-elf.so.1 cannot load (find) libhpi.so > > Could not understand why it was ld-elf.so.1 and not ld-elf32.so.1 > but ktrace/kdump showed ld-elf32.so.1 was tried first and failed and > then ld-elf.so.1 was tried and produced the message. ktrace also > showed it was looking in /lib32 (or /usr/lib32). (reading build32.sh > explained why this is). So I added symlinks in /lib32 to the java > libs and got further. Was getting (from memory) > Cannot open /greenthreads/libhpi.so > > Thats as far as I got before going home. I'll look further tomorrow. > > (Obviously?) what would be better is to be able to create > /var/run/ld32.so.hints (is that correct name?) rather than symlink > hack. Is this possible (without a lot of work)? > > (Also obviously?!) it looks like LD_LIBRARY_PATH is ignored for 32 > bit i386 which is why no libraries are found. Any ideas about this? The information you're probably missing is that there are a couple of extra environment variables and ldconfig can create the ld32.so.hints file for you. What you probably need is to set $LD_32_LIBRARY_PATH and/or use ldconfig -32 to set the search paths for your other 32 bit libraries. I suspect the java wrappers are setting $LD_LIBRARY_PATH. (I'd originally used $LD32_ as the prefix, but there are security checks when scrubbing the environment that specifically look for "LD_" as a prefix. If you run setuid, or copy the environment via login -f, then it needs to remove the environment variables). -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5