GCJ Build Problem (CVS)
Brad Cox
bcox@virtualschool.edu
Sat Nov 10 16:25:00 GMT 2001
On Saturday, November 10, 2001, at 06:14 PM, Bryce McKinlay wrote:
> So, the problem is that you have an old version of libgcj.so sitting
> around somewhere and the linker is seeing that before the new libgcj.so.
> But normally that should never happen since GCJ finds libgcj.so relative
> to the path of the compiler. You did remember to "make install", right?
Yes I did make install.
Here's the problem. Presumably /usr/lib/libgcj* is from the RedHat gcc
installation; I sure didn't put them there. /usr/local/lib/libgcj* is
probably left over from my first try at upgrading gcc, but that can't be
it because its not in /etc/ld.so.config. /usr/local/gcc31 isn't listed
since I created it after the nightly locate -u.
[bcox@linux bcox]$ cat /etc/ld.so.conf
/usr/X11R6/lib
/usr/lib
/usr/i486-linux-libc5/lib
/usr/kerberos/lib
/usr/lib/gconv
/usr/lib/qt-2.1.0/lib
/usr/lib/qt-1.45/lib
/vame/ive/bin
/usr/lib/qt-2.2.0/lib
/usr/lib/sane
/usr/lib/mysql
/usr/local/xmms/Input
/lib
[bcox@linux bcox]$ locate libgcj.so
/usr/lib/libgcj.so.1
/usr/lib/libgcj.so.1.0.0
/usr/lib/libgcj.so
/usr/local/lib/libgcj.so.2
/usr/local/lib/libgcj.so.2.0.0
/usr/local/lib/libgcj.so
[bcox@linux bcox]$ d /usr/lib/libgcj*
-rw-r--r-- 1 root root 11240656 Aug 21 2000 /usr/lib/libgcj.a
lrwxrwxrwx 1 root root 15 Feb 26 2001 /usr/lib/libgcj.so
-> libgcj.so.1.0.0
lrwxrwxrwx 1 root root 15 Feb 26 2001 /usr/lib/libgcj.so.
1 -> libgcj.so.1.0.0
-rwxr-xr-x 1 root root 6834973 Aug 21 2000 /usr/lib/libgcj.so.
1.0.0
-rw-r--r-- 1 root root 121064 Aug 21 2000 /usr/lib/libgcjgc.
a
lrwxrwxrwx 1 root root 17 Feb 26 2001 /usr/lib/libgcjgc.
so -> libgcjgc.so.1.0.1
lrwxrwxrwx 1 root root 17 Feb 26 2001 /usr/lib/libgcjgc.
so.1 -> libgcjgc.so.1.0.1
-rwxr-xr-x 1 root root 103373 Aug 21 2000 /usr/lib/libgcjgc.
so.1.0.1
[bcox@linux bcox]$ d /usr/local/lib/libgcj*
-rw-r--r-- 1 root root 18812824 Aug 28 11:57
/usr/local/lib/libgcj.a
-rwxr-xr-x 1 root root 754 Aug 28 11:56
/usr/local/lib/libgcj.la
lrwxrwxrwx 1 root root 15 Aug 28 11:56
/usr/local/lib/libgcj.so -> libgcj.so.2.0.0
lrwxrwxrwx 1 root root 15 Aug 28 11:56
/usr/local/lib/libgcj.so.2 -> libgcj.so.2.0.0
-rwxr-xr-x 1 root root 10760265 Aug 28 11:56
/usr/local/lib/libgcj.so.2.0.0
-rw-r--r-- 1 root root 314 Aug 28 11:57
/usr/local/lib/libgcj.spec
-rw-r--r-- 1 root root 670088 Aug 28 11:58
/usr/local/lib/libgcjgc.a
-rwxr-xr-x 1 root root 712 Aug 28 11:58
/usr/local/lib/libgcjgc.la
lrwxrwxrwx 1 root root 17 Aug 28 11:58
/usr/local/lib/libgcjgc.so -> libgcjgc.so.1.0.1
lrwxrwxrwx 1 root root 17 Aug 28 11:58
/usr/local/lib/libgcjgc.so.1 -> libgcjgc.so.1.0.1
-rwxr-xr-x 1 root root 321190 Aug 28 11:58
/usr/local/lib/libgcjgc.so.1.0.1
> Usually, I think, people keep the install prefix separate from the
> src/build directory. Maybe this could be causing problems...
The change was to fix one of the things I found confusing; source, build
and install directories at entirely different and unrelated places in /usr/
local. The only difference is that they all share /usr/local/gcj31 in my
scheme versys /usr/local in the original, so I doubt that's it.
But the from the gcc -v output (prior mail), gcj IS behaving as it should.
The problem is that a.out is apparently using a different path. So I tried
test: checkbook.a Test.o
$(GCJ) -v --main=Test Test.o
export LD_LIBRARY_PATH="$(GCC)/lib:$(LD_LIBRARY_PATH)" && a.out
IT WORKED! At least its not dying in SecureRandom as before but much later.
I'll dig into that next.
Thanks for the help!!
More information about the Java
mailing list