From owner-freebsd-java@FreeBSD.ORG Sat Nov 1 20:14:38 2003 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6B5C816A4CE for ; Sat, 1 Nov 2003 20:14:38 -0800 (PST) Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE2FD43F3F for ; Sat, 1 Nov 2003 20:14:36 -0800 (PST) (envelope-from shudo@computer.org) Received: from rpsmtp1.aist.go.jp by mx1.aist.go.jp with ESMTP id hA24EW3H026141; Sun, 2 Nov 2003 13:14:32 +0900 (JST) env-from (shudo@computer.org) Received: from smtp2.aist.go.jp by rpsmtp1.aist.go.jp with ESMTP id hA24EVgo026892; Sun, 2 Nov 2003 13:14:31 +0900 (JST) env-from (shudo@computer.org) Received: from aist.go.jp by smtp2.aist.go.jp with ESMTP id hA24EUiJ009402; Sun, 2 Nov 2003 13:14:31 +0900 (JST) env-from (shudo@computer.org) Date: Sun, 02 Nov 2003 13:14:28 +0900 (JST) Message-Id: <20031102.131428.783373620.shudo@localhost> To: freebsd-java@freebsd.org From: shudo@computer.org In-Reply-To: <20030703.190531.299490113.shudo@localhost> References: <20030702.141346.607956687.shudo@localhost> <20030702142029.4fa5b862.daichi@freebsd.org> <20030703.190531.299490113.shudo@localhost> X-Mailer: Mew version 3.3 on XEmacs 21.4.12 (Portable Code) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: JDK 1.1.8 V1999-11-9 on recent FBSD 4 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Nov 2003 04:14:38 -0000 All, I cvsup'ed my FreeBSD box to 4.9-STABLE just after the release of FBSD 4.9R and could confirm JDK 1.1.8 (1999/11/9) works well on the box. The problem I explained below has gone away. Kazuyuki Shudo shudo@computer.org http://www.shudo.net/ > Message-Id: <20030703.190531.299490113.shudo@localhost> > Subject: Re: JDK 1.1.8 V1999-11-9 on recent FBSD 4 > From: shudo@computer.org > Date: Thu, 03 Jul 2003 19:05:31 +0900 (JST) > Thanks for you suggestion, Daichi. > > I could see the rationale of my trouble by further investigation. The > JDK 1.1.8 binary release cannot work on recent FBSD 4.x systems in > nature. Generally, this problem happens when a program try to use > both the libc of the compat3x port and a FBSD 4's library using stdin, > stdout or stderr. > > > > > I tried to run JDK 1.1.8 V1999-11-9 (ELF version) on my FreeBSD > > > 4.8-STABLE box. It could not run and I had the following message: > > > > % java > > > /usr/libexec/ld-elf.so.1: /usr/lib/libm.so.2: Undefined symbol "__stderrp" > > JDK 1.1.8 uses the native libm of FreeBSD 4 and the libc of the > compat3x port as follows: > > % ldd /usr/local/jdk1.1.8/bin/i386/green_threads/java > /usr/local/jdk1.1.8/bin/i386/green_threads/java: > libjava.so => not found (0x0) > libxpg4.so.2 => /usr/local/lib/compat/libxpg4.so.2 (0x28066000) > libm.so.2 => /usr/lib/libm.so.2 (0x2806a000) > libc.so.3 => /usr/local/lib/compat/libc.so.3 (0x28085000) > > FBSD 4's libm expects the FBSD 3's libc to supply the symbols > __stdinp, __stdoutp and __stderrp as stdin, stdout and stderr > respectively. But the compat3x's libc does not supply them. > > In /usr/src/lib/libc/stdio/findfp.c of FBSD 4.8-STABLE: > > /* > * The following kludge is done to ensure enough binary compatibility > * with future versions of libc. Or rather it allows us to work with > * libraries that have been built with a newer libc that defines these > * symbols and expects libc to provide them. We only have need to support > * i386 and alpha because they are the only "old" systems we have deployed. > */ > FILE *__stdinp = &__sF[0]; > FILE *__stdoutp = &__sF[1]; > FILE *__stderrp = &__sF[2]; > > > So, there are several workarounds: > - Add __stdinp, __stdoutp and __stderrp to the compat3x's libc. > - Compile JDK 1.1.8 on a recent FBSD system. > (The patches to Sun's 1.1.8 are available.) > - Provide a small library supplying these symbols and load it > with JDK 1.1.8 somehow. > - ... > > I prefer the modification to the compat3x port because this problem is > not limited to Java, rather general to programs which need compat3x. > > Does someone have motivation to solve this problem? > I suppose no one is not using 1.1.8 on recent FBSD systems because we > have not seen such an trouble report on this list. > > > Kazuyuki Shudo shudo@computer.org http://www.shudo.net/