Date: Sun, 4 Mar 2007 13:54:05 -0700 From: "Chad Leigh -- Shire.Net LLC" <chad@shire.net> To: freebsd-java@freebsd.org Cc: "Chad Leigh -- Shire.Net LLC" <chad@shire.net> Subject: getting Error: could not find libjava.so Re: building a jdk1.5 package and installing it elsewhere (inside a jail) Re: building jdk15 in a jail -- __mb_cur_max Undefined Symbol Message-ID: <DF2755C9-F296-4097-B75A-C5F6AA5EB1BC@shire.net> In-Reply-To: <D52B4C7A-67C8-4BC5-9586-EB23286ED0E4@shire.net> References: <C89E200C-719F-46CB-B1F9-5D840785376A@shire.net> <9BDC76ED-A186-40CA-850D-09BF77A395DF@shire.net> <4634.198.144.43.23.1172967500.squirrel@www.potentialtech.com> <D52B4C7A-67C8-4BC5-9586-EB23286ED0E4@shire.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 3, 2007, at 5:18 PM, Bill Moran wrote: > >> On Mar 3, 2007, at 4:01 PM, Chad Leigh -- Shire.Net LLC wrote: >> >>> Hi >>> >>> I am trying to build jdk15 inside my jail with PREFIX set to /usr/ >>> public (At one time I successfully got jdk 1.4 to build after much >>> hacking) >>> >>> I have the option for builing inside a jail set. We get to the >>> point where the linux java is installed and it is actually building >>> the jdk >>> >>> # Start of jdk build >>> /libexec/ld-elf.so.1: /usr/local/lib/libiconv.so.3: Undefined >>> symbol "__mb_cur_max" >>> *** Error code 1 >>> >>> Stop in /usr/ports/java/jdk15. >>> # >>> >>> I am not exactly sure what it is doing at this point in order to >>> hack round it. libiconv a fresh install from ports >>> >> >> Turns out that the issue is that gmake cannot run. I have not >> figured out why yet, having removed and reinstalled libiconv and >> gmake and getting the same error. But it is not java related. >> >> I'll redirect this to -questions >> >> If anyone has an idea on why gmake would fail as above on a fresh >> install, 6.2-RELEASE from a day or two ago, I would appreciate it. >> Please CC me as I am not currently subscribed to -questions, though I >> am on -java > > Not a direct answer to your question, but when I needed to do this > a few months ago, I just did a "make package" on my workstation, then > shipped the package up to the jail system and installed it with > pkg_add. > > Doesn't solve the problem, but if you're in a pinch, it's a handy > workaround. > OK, I had never done this before -- built a package from a port. So I did this on the base machine and then copied it into the jail and did a pkg_add like so # pkg_add -P /usr/public -v jdk-1.5.0p4_1.tbz as I wanted it installed in my local policy dir /usr/public (which gets mounted RO in every jail). My 1.4.2 java on my other jail server is installed like this (but was built inside the jail many moons ago). Now, when I try to run java I get # java -version Error: could not find libjava.so Error: could not find Java 2 Runtime Environment. # Java is in /usr/public/jdk1.5.0/ (the same as my 1.4.2 on the other server which is in /usr/public/jdk1.4.2/). libjava.so is inside the lib dir and I thought that java was referential to itself so it could find its libraries. I also tried setting JAVA_HOME and JRE_HOME though I have not had to do that in a long time. The new 1.5 jdk is registered in the javavms file . When I run the javavm script with /bin/sh -x it does run the correct java and running it with an explicit path does not help. # /bin/sh -x /usr/public/bin/javavm -version + _JAVAVM_SAVE_PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/pub/ sbin:/usr/pub/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/root/ bin + export PATH=/bin:/sbin:/usr/bin:/usr/sbin + _JAVAVM_PREFIX=/usr/public + _JAVAVM_CONF=/usr/public/etc/javavms + _JAVAVM_OPTS_CONF=/usr/public/etc/javavm_opts.conf + basename /usr/public/bin/javavm + _JAVAVM_PROG=javavm + _JAVAVM_MAKE=/usr/bin/make + [ javavm = javavm ] + echo javavm: warning: The use of 'javavm' as a synonym for 'java' is deprecated javavm: warning: The use of 'javavm' as a synonym for 'java' is deprecated + _JAVAVM_PROG=java + [ -r /usr/public/etc/javavm_opts.conf ] + . /usr/public/etc/javavm_opts.conf + _JAVAVM_OPTS= + setJavaHome + realpath + realpath /usr/public + [ -n -a /stubs/usr_local/etc/ssmtp != /usr/public ] + unset JAVA_HOME + _JAVAVM_PORTSDIR= + [ -r /usr/share/mk/bsd.port.mk ] + /usr/bin/make -f /usr/share/mk/bsd.port.mk -V PORTSDIR + _JAVAVM_PORTSDIR= + _JAVAVM_BSD_PORT_MK= + [ -n -a -r /Mk/bsd.port.mk ] + [ -n ] + [ ! -e /usr/public/etc/javavms ] + sed -E s|[[:space:]]*#.*|| + uniq + _JAVAVM_VMS=/usr/public/jdk1.5.0/bin/java /usr/public/linux-sun-jdk1.4.2/bin/java + [ -n ] + dirname /usr/public/jdk1.5.0/bin/java + JAVA_HOME=/usr/public/jdk1.5.0/bin + dirname /usr/public/jdk1.5.0/bin + JAVA_HOME=/usr/public/jdk1.5.0 + basename /usr/public/jdk1.5.0 + _JAVAVM_VM=jdk1.5.0 + [ -n ] + [ -n ] + [ -n ] + [ -n /usr/public/jdk1.5.0 -a -f /usr/public/jdk1.5.0/bin/java ] + _JAVAVM_PROG_PATH=/usr/public/jdk1.5.0/bin + return 0 + [ 0 != 0 ] + [ -x /usr/public/jdk1.5.0/bin/java ] + basename /usr/public/jdk1.5.0 + setJavaOptions java jdk1.5.0 + echo java + sed -e s/\./_/g -e s/-/_/g + local OPTS_PROG=java + echo jdk1.5.0 + sed -e s/\./_/g -e s/-/_/g + local OPTS_JAVA_HOME=jdk1_5_0 + eval echo ${JAVAVM_OPTS_jdk1_5_0_java} + local JAVA_HOME_PROG_OPTS= + eval echo ${JAVAVM_OPTS_jdk1_5_0} + local JAVA_HOME_OPTS= + eval echo ${JAVAVM_OPTS_java} + local PROG_OPTS= + [ -n ] + [ -n ] + [ -n ] + [ -n ] + export JAVA_HOME + tryJavaCommand /usr/public/jdk1.5.0/bin/java -version + [ -n ] + [ -x /usr/public/jdk1.5.0/bin/java ] + [ -n /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/pub/sbin:/usr/ pub/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/root/bin ] + export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/pub/sbin:/ usr/pub/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/root/bin + exec /usr/public/jdk1.5.0/bin/java -version Error: could not find libjava.so Error: could not find Java 2 Runtime Environment. # What did I do wrong? Thanks Chad --- Chad Leigh -- Shire.Net LLC Your Web App and Email hosting provider chad at shire.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DF2755C9-F296-4097-B75A-C5F6AA5EB1BC>