From owner-freebsd-java Mon Oct 23 19:56:58 2000 Delivered-To: freebsd-java@freebsd.org Received: from smtp03.mrf.mail.rcn.net (smtp03.mrf.mail.rcn.net [207.172.4.62]) by hub.freebsd.org (Postfix) with ESMTP id 4EA5A37B479 for ; Mon, 23 Oct 2000 19:56:56 -0700 (PDT) Received: from 207-172-201-163.s36.as3.xnb.nj.dialup.rcn.com ([207.172.201.163] helo=unknown.whichever.org) by smtp03.mrf.mail.rcn.net with esmtp (Exim 3.15 #2) id 13nuGk-0002J6-00 for freebsd-java@freebsd.org; Mon, 23 Oct 2000 22:56:54 -0400 Received: (from archer@localhost) by unknown.whichever.org (8.11.0/8.9.3) id e9O2uqT66730; Mon, 23 Oct 2000 22:56:52 -0400 (EDT) (envelope-from archer) Date: Mon, 23 Oct 2000 22:56:52 -0400 (EDT) Message-Id: <200010240256.e9O2uqT66730@unknown.whichever.org> From: Alexander Litvin To: freebsd-java@freebsd.org Subject: Re: Problem with appletviewer in jdk1.2.2b10 In-Reply-To: <200010232343.JAA25358@ares.trc.adelaide.edu.au> X-Newsgroups: unknown.freebsd.java User-Agent: tin/1.5.6-20000803 ("Dust") (UNIX) (FreeBSD/5.0-CURRENT (i386)) Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Greg Lewis 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