From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 16 09:47:10 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AD1C106566C; Tue, 16 Sep 2008 09:47:10 +0000 (UTC) (envelope-from thavinci@thavinci.za.net) Received: from thavinci.za.net (mail.e-soul.co.za [196.211.117.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5C0338FC22; Tue, 16 Sep 2008 09:47:07 +0000 (UTC) (envelope-from thavinci@thavinci.za.net) Received: from thavinci.za.net (localhost [127.0.0.1]) by thavinci.za.net (Postfix) with ESMTP id E926A9B4A8; Tue, 16 Sep 2008 11:47:04 +0200 (SAST) Received: by thavinci.za.net (Postfix, from userid 1002) id C87D99B492; Tue, 16 Sep 2008 11:47:04 +0200 (SAST) Received: from thavinciPC (unknown [192.168.12.110]) by thavinci.za.net (Postfix) with ESMTP id A0C0D9B43A; Tue, 16 Sep 2008 11:47:04 +0200 (SAST) From: "Marcel Grandemange" To: "'Jeremy Chadwick'" References: <015101c9164a$f3f12d30$dbd38790$@za.net> <20080915093815.GA33139@icarus.home.lan> <002b01c91737$2af8ac30$80ea0490$@za.net> <20080915152631.GA39924@icarus.home.lan> <00be01c9176a$182f3910$488dab30$@za.net> <20080916043322.GA54034@icarus.home.lan> In-Reply-To: <20080916043322.GA54034@icarus.home.lan> Date: Tue, 16 Sep 2008 11:46:12 +0200 Message-ID: <018f01c917e1$0e250f40$2a6f2dc0$@za.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AckXtVzJ1bBOtnzsS2OyE7QgwPx4lAAKw6VA Content-Language: en-us X-Virus-Scanned: ClamAV using ClamSMTP Cc: freebsd-hackers@freebsd.org Subject: RE: Error: Can't find libjava.so X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 09:47:10 -0000 > > > I do realize this is probably better suited for freebsd-questions , > > however > > > haven't received any response and was simply hoping someone would be > kind > > > enough. > > > > > > I recently obtained a very decent ups, however it is not supported by > NUT. > > > > > > It does however come with winpower software that does run on FreeBSD. > > > > > > However it rewuired java. > > > > > > So installed from ports > > > > > > And was presented with following error: > > > > > > Error: can't find libjava.so > > > > > > This is on system in folder > > "/usr/local/Diablo-jre1.6.0/lib/amd64/libjava.so > > > > >Can you provide the output of "ldconfig -r" from that box? I have > > >a feeling the ld.so pathing hints might lack a directory or two. > > > > > > /var/run/ld-elf.so.hints: > > search directories: /lib:/usr/lib:/usr/lib/compat:/usr/local/lib > > >This is the problem as I see it. ld.so, which is used for finding and > >loading shared libraries, is not configured to look in > >/usr/local/Diablo-jre1.6.0/lib/amd64 for libraries. > > >I'd like to know which port you installed, and how you installed it. > > I did a cvsup on ports to update to latest on FreeBSD7.0 release amd64 > Used port /usr/ports/java/Diablo-jre16 > Simply did > Make > Make install > Make clean > >Can you please apply the below patch and tell me if it solves your >problem? Proper procedure should be: ># cd /usr/ports/java/diablo-jre16 ># patch < /wherever/the/patch/is ># make clean ># make ># make deinstall ># make install This went through successfully. >After this is done, use "ldconfig -r" and look at the search path >shown at the top; hopefully /usr/local/diablo-jre1.6.0/lib/amd64 >will be there, and libjava.so should be found (hopefully). The Results.... /var/run/ld-elf.so.hints: search directories: /lib:/usr/lib:/usr/lib/compat:/usr/local/lib:/usr/local/diablo-jre1.6.0/lib/ amd64 0:-lc.7 => /lib/libc.so.7 1:-lcrypt.4 => /lib/libcrypt.so.4 2:-lkvm.4 => /lib/libkvm.so.4 3:-lm.5 => /lib/libm.so.5 4:-lmd.4 => /lib/libmd.so.4 5:-lncurses.7 => /lib/libncurses.so.7 6:-lncursesw.7 => /lib/libncursesw.so.7 7:-lsbuf.4 => /lib/libsbuf.so.4 8:-lutil.7 => /lib/libutil.so.7 9:-lalias.6 => /lib/libalias.so.6 10:-lbegemot.3 => /lib/libbegemot.so.3 11:-lbsnmp.4 => /lib/libbsnmp.so.4 12:-lcam.4 => /lib/libcam.so.4 13:-ldevstat.6 => /lib/libdevstat.so.6 14:-ledit.6 => /lib/libedit.so.6 15:-lbsdxml.3 => /lib/libbsdxml.so.3 16:-lgeom.4 => /lib/libgeom.so.4 17:-lipsec.3 => /lib/libipsec.so.3 18:-lipx.4 => /lib/libipx.so.4 19:-lkiconv.3 => /lib/libkiconv.so.3 20:-lpcap.5 => /lib/libpcap.so.5 21:-lthr.3 => /lib/libthr.so.3 22:-lufs.4 => /lib/libufs.so.4 23:-lz.4 => /lib/libz.so.4 24:-lavl.1 => /lib/libavl.so.1 25:-lnvpair.1 => /lib/libnvpair.so.1 26:-lumem.1 => /lib/libumem.so.1 27:-luutil.1 => /lib/libuutil.so.1 28:-lzfs.1 => /lib/libzfs.so.1 29:-lzpool.1 => /lib/libzpool.so.1 30:-lgcc_s.1 => /lib/libgcc_s.so.1 31:-lreadline.7 => /lib/libreadline.so.7 32:-lssp.0 => /lib/libssp.so.0 33:-lcrypto.5 => /lib/libcrypto.so.5 34:-lbsm.2 => /usr/lib/libbsm.so.2 35:-lcom_err.4 => /usr/lib/libcom_err.so.4 36:-lelf.1 => /usr/lib/libelf.so.1 37:-lform.4 => /usr/lib/libform.so.4 38:-lmenu.4 => /usr/lib/libmenu.so.4 39:-lpanel.4 => /usr/lib/libpanel.so.4 40:-lformw.4 => /usr/lib/libformw.so.4 41:-lmenuw.4 => /usr/lib/libmenuw.so.4 42:-lpanelw.4 => /usr/lib/libpanelw.so.4 43:-lnetgraph.3 => /usr/lib/libnetgraph.so.3 44:-lradius.3 => /usr/lib/libradius.so.3 45:-lrpcsvc.4 => /usr/lib/librpcsvc.so.4 46:-ltacplus.3 => /usr/lib/libtacplus.so.3 47:-lypclnt.3 => /usr/lib/libypclnt.so.3 48:-larchive.4 => /usr/lib/libarchive.so.4 49:-lbluetooth.3 => /usr/lib/libbluetooth.so.3 50:-lbz2.3 => /usr/lib/libbz2.so.3 51:-lcalendar.4 => /usr/lib/libcalendar.so.4 52:-ldevinfo.4 => /usr/lib/libdevinfo.so.4 53:-lfetch.5 => /usr/lib/libfetch.so.5 54:-lftpio.7 => /usr/lib/libftpio.so.7 55:-lgpib.2 => /usr/lib/libgpib.so.2 56:-lgssapi.9 => /usr/lib/libgssapi.so.9 57:-lmagic.3 => /usr/lib/libmagic.so.3 58:-lmemstat.2 => /usr/lib/libmemstat.so.2 59:-lmilter.4 => /usr/lib/libmilter.so.4 60:-lmp.6 => /usr/lib/libmp.so.6 61:-lncp.3 => /usr/lib/libncp.so.3 62:-lngatm.3 => /usr/lib/libngatm.so.3 63:-lopie.5 => /usr/lib/libopie.so.5 64:-lpam.4 => /usr/lib/libpam.so.4 65:-lpmc.4 => /usr/lib/libpmc.so.4 66:-lkse.3 => /usr/lib/libkse.so.3 67:-lrt.1 => /usr/lib/librt.so.1 68:-lsdp.3 => /usr/lib/libsdp.so.3 69:-lsmb.3 => /usr/lib/libsmb.so.3 70:-lthread_db.3 => /usr/lib/libthread_db.so.3 71:-lugidfw.3 => /usr/lib/libugidfw.so.3 72:-lusbhid.3 => /usr/lib/libusbhid.so.3 73:-lwrap.5 => /usr/lib/libwrap.so.5 74:-llwres.30 => /usr/lib/liblwres.so.30 75:-ldialog.6 => /usr/lib/libdialog.so.6 76:-lgomp.1 => /usr/lib/libgomp.so.1 77:-lgnuregex.4 => /usr/lib/libgnuregex.so.4 78:-lhistory.7 => /usr/lib/libhistory.so.7 79:-lstdc++.6 => /usr/lib/libstdc++.so.6 80:-lobjc.3 => /usr/lib/libobjc.so.3 81:-lasn1.9 => /usr/lib/libasn1.so.9 82:-lgssapi_krb5.9 => /usr/lib/libgssapi_krb5.so.9 83:-lhdb.9 => /usr/lib/libhdb.so.9 84:-lkadm5clnt.9 => /usr/lib/libkadm5clnt.so.9 85:-lkadm5srv.9 => /usr/lib/libkadm5srv.so.9 86:-lkafs5.9 => /usr/lib/libkafs5.so.9 87:-lkrb5.9 => /usr/lib/libkrb5.so.9 88:-lroken.9 => /usr/lib/libroken.so.9 89:-lssl.5 => /usr/lib/libssl.so.5 90:-lssh.4 => /usr/lib/libssh.so.4 91:-lcharset.1 => /usr/local/lib/libcharset.so.1 92:-liconv.3 => /usr/local/lib/libiconv.so.3 93:-lintl.8 => /usr/local/lib/libintl.so.8 94:-lasprintf.0 => /usr/local/lib/libasprintf.so.0 95:-lgettextpo.3 => /usr/local/lib/libgettextpo.so.3 96:-lusb-0.1.8 => /usr/local/lib/libusb-0.1.so.8 97:-lusbpp-0.1.8 => /usr/local/lib/libusbpp-0.1.so.8 98:-lupsclient.1 => /usr/local/lib/libupsclient.so.1 99:-lXau.6 => /usr/local/lib/libXau.so.6 100:-lXau.0 => /usr/local/lib/libXau.so.0 101:-lXdmcp.6 => /usr/local/lib/libXdmcp.so.6 102:-lX11.6 => /usr/local/lib/libX11.so.6 103:-lXext.6 => /usr/local/lib/libXext.so.6 104:-lXi.6 => /usr/local/lib/libXi.so.6 105:-lXp.6 => /usr/local/lib/libXp.so.6 106:-lICE.6 => /usr/local/lib/libICE.so.6 107:-lSM.6 => /usr/local/lib/libSM.so.6 108:-lXt.6 => /usr/local/lib/libXt.so.6 109:-lXtst.6 => /usr/local/lib/libXtst.so.6 > >Regarding the problem itself: there are ways to work around this by > >using the environment variable LD_LIBRARY_PATH. I do not recommend > >this, though -- properly configuring the ld.so search path when a > >program (or port) is installed is the proper method. > > Could you advise me how to do this? Hope you don't mind! >Set the LD_LIBRARY_PATH environment variable to the search paths >you desire. Colon-delimited, and it overrides the defaults. E.g. >export LD_LIBRARY_PATH="/lib:/usr/lib:/usr/lib/compat:/usr/local/lib:/usr/local/dia blo-jre1.6.0/lib/amd64" >But the below patch, assuming it works (and I got the paths right), >should not require you to do that. LD_LIBRARY_PATH is somewhat evil, >and it's not recommended you use it. Yup worked flawlessly on that part, but this always helps in the learning process ;> However even after that I was still presented with a...... [root@testvmbsd /opt/MonitorSoftware]# ./agent start Starting Agent: Error: can't find libjava.so. Done [root@testvmbsd /opt/MonitorSoftware]# -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | Index: Makefile =================================================================== RCS file: /home/pcvs/ports/java/diablo-jre16/Makefile,v retrieving revision 1.3 diff -u -r1.3 Makefile --- Makefile 20 Aug 2008 04:13:02 -0000 1.3 +++ Makefile 16 Sep 2008 04:24:27 -0000 @@ -43,6 +43,8 @@ INSTALL_DIR= ${PREFIX}/${PKGNAMEPREFIX}jre${JRE_VERSION} +USE_LDCONFIG= ${PREFIX}/${PKGNAMEPREFIX}jre${JRE_VERSION}/lib/${ARCH} + .include .if ${OSVERSION} >= 700000