Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Oct 2000 22:56:52 -0400 (EDT)
From:      Alexander Litvin <archer@whichever.org>
To:        freebsd-java@freebsd.org
Subject:   Re: Problem with appletviewer in jdk1.2.2b10
Message-ID:  <200010240256.e9O2uqT66730@unknown.whichever.org>
In-Reply-To: <200010232343.JAA25358@ares.trc.adelaide.edu.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Greg Lewis <glewis@trc.adelaide.edu.au> wrote:

>> archer@unknown:~>appletviewer
>> Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/jdk1.2.2
GL> /j
>> re/lib/i386/libfontmanager.so: /usr/local/jdk1.2.2/jre/lib/i386/libfontmanager
GL> .s
>> o: Undefined symbol "__get_eh_context"

GL> It sounds like there is an extra dependency that 5.0-CURRENT has
GL> introduced.  You need to track down which library actually defines
GL> __get_eh_context and add that to the libraries to link into libfontmanager
GL> (and anything else which links with the library where this is undefined).

It appears, that __get_eh_context is defined in libgcc. So, it's gcc stuff.

Now, on CURRENT, shared library libgcc.so is not built! That is,
from some point in time it stopped being built, only static libgcc.a
is built and installed. But, of course, I had an old libgcc.so.2
hanging around in /usr/lib. And that one doesn't contain the
"__get_eh_context" symbol.

Ok, I'm nowhere near expert in gcc&stuff. What I did is to add two
lines to /usr/src/gnu/lib/libgcc/Makefile:

SHLIB_MAJOR=2
SHLIB_MINOR=0

That made shared libgcc being built again.

Though, it didn't solve all problems. Once I made shared libgcc and
put it into /usr/lib, all my java stuff stopped to work with:

/usr/libexec/ld-elf.so.1: /usr/lib/libgcc.so.2: Undefined symbol "__do_global_ct
ors"

Now, that symbol is conditionally defined in
/usr/src/contrib/gcc.295/libgcc2.c (as far as I guess it's meant
to run global constructors on program startup). An condition of
compilation is such that the function is not compiled in. So, I
just added empty __do_global_ctors() into libgcc2.c.

After that it seems to start working again. Appletviewer also runs,
although cursing extensively about some missing fonts.

Now, you see, what I did is hack-hack without really understanding
stuff. It takes some gcc guru to tell what this all really about and
what is the correct fix. Who do you think should I contact?

--- 
Bunker's Admonition:
        You cannot buy beer; you can only rent it.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200010240256.e9O2uqT66730>