JDK 1.1.8 V1999-11-9 on recent FBSD 4

JDK 1.1.8 V1999-11-9 on recent FBSD 4

Post by sh.. » Thu, 03 Jul 2003 14:14:33



Hi all,

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 Linpack
  /usr/libexec/ld-elf.so.1: /usr/lib/libm.so.2: Undefined symbol "__stderrp"
  % java -version
  /usr/libexec/ld-elf.so.1: /usr/lib/libm.so.2: Undefined symbol "__stderrp"
  % java
  /usr/libexec/ld-elf.so.1: /usr/lib/libm.so.2: Undefined symbol "__stderrp"
  % jar
  /usr/libexec/ld-elf.so.1: /usr/lib/libm.so.2: Undefined symbol "__stderrp"
  % java_g
  /usr/libexec/ld-elf.so.1: /usr/lib/libm.so.2: Undefined symbol "__stderrp"

Can the JDK 1.1.8 work on recent FBSD 4 and 5?
How can I avoid this problem?


_______________________________________________

http://lists.freebsd.org/mailman/listinfo/freebsd-java

 
 
 

JDK 1.1.8 V1999-11-9 on recent FBSD 4

Post by daic » Thu, 03 Jul 2003 14:20:24


Hi Shudo-san

> Hi all,

> 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 Linpack
>   /usr/libexec/ld-elf.so.1: /usr/lib/libm.so.2: Undefined symbol "__stderrp"
>   % java -version
>   /usr/libexec/ld-elf.so.1: /usr/lib/libm.so.2: Undefined symbol "__stderrp"
>   % java
>   /usr/libexec/ld-elf.so.1: /usr/lib/libm.so.2: Undefined symbol "__stderrp"
>   % jar
>   /usr/libexec/ld-elf.so.1: /usr/lib/libm.so.2: Undefined symbol "__stderrp"
>   % java_g
>   /usr/libexec/ld-elf.so.1: /usr/lib/libm.so.2: Undefined symbol "__stderrp"

> Can the JDK 1.1.8 work on recent FBSD 4 and 5?
> How can I avoid this problem?



You install compat3x (/usr/ports/misc/compat3x/ or install from
sysinstall) ?

--
  Daichi GOTO, http://people.freebsd.org/~daichi
_______________________________________________

http://lists.freebsd.org/mailman/listinfo/freebsd-java


 
 
 

JDK 1.1.8 V1999-11-9 on recent FBSD 4

Post by sh.. » Fri, 04 Jul 2003 19:07:20


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.

Quote:> > 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.


_______________________________________________

http://lists.freebsd.org/mailman/listinfo/freebsd-java

 
 
 

JDK 1.1.8 V1999-11-9 on recent FBSD 4

Post by Nate Willia » Fri, 04 Jul 2003 22:28:09


Quote:> 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)

                                 ^^^^^
Quote:>           libm.so.2 => /usr/lib/libm.so.2 (0x2806a000)
>           libc.so.3 => /usr/local/lib/compat/libc.so.3 (0x28085000)

                              ^^^^^

Why are your compat libraries in /usr/local?  They should be in
/usr/lib/compat.

Quote:> 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.

It works fine on my boxes, which are using the stock compat3 libraries.
I suspect something with the above /usr/local/ libraries which are not
the 'real' compat libraries as distributed as part of the base FreeBSD
OS.

Nate
_______________________________________________

http://lists.freebsd.org/mailman/listinfo/freebsd-java

 
 
 

JDK 1.1.8 V1999-11-9 on recent FBSD 4

Post by Greg Lew » Thu, 10 Jul 2003 00:13:58



> It works fine on my boxes, which are using the stock compat3 libraries.
> I suspect something with the above /usr/local/ libraries which are not
> the 'real' compat libraries as distributed as part of the base FreeBSD
> OS.

FWIW, my recent 4.x installs exhibit the same problem, but without the
compat libraries being in /usr/local.  E.g.:

Quote:> 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/lib/compat/libxpg4.so.2 (0x28066000)
        libm.so.2 => /usr/lib/libm.so.2 (0x2806a000)
        libc.so.3 => /usr/lib/compat/libc.so.3 (0x28085000)
Quote:> /usr/local/jdk1.1.8/bin/java -version

/usr/libexec/ld-elf.so.1: /usr/lib/libm.so.2: Undefined symbol "__stderrp"

The compat library is installed via the ports system:

Quote:> pkg_info | grep compat3x

compat3x-i386-4.4.20020925 A convenience package to install the compat3x libraries

I think Shudo-san's analysis of the problem is correct and the current 4.x
libm is incompatible with 3.x applications.  This hasn't always been true
though and I haven't looked for when this became the case (yet).

--

Eyes Beyond                         Web     : http://www.eyesbeyond.com

_______________________________________________

http://lists.freebsd.org/mailman/listinfo/freebsd-java

 
 
 

1. Upgrade Sendmail 8.11.1/8.11.1 on FBSD 4.2

Hi all,

This was forwarded to me today -

SANS Alert 2003-03-03
Critical vulnerability in all versions of SENDMAIL
Plus a Snort Vulnerability

Sendmail versions 5.2 up to 8.12.8 are known to be
vulnerable at this time.

I have a system that will be upgrading to 4.7.8 soon.  How can I
upgrade this system to the current version of sendmail in the mean
time?.

Hopefully I can do it from the package collections.

Would like to run this as user bind instead of root.

Is chroot or jail for sendmail difficult to setup?.

2. CUPS: Print jobs only get spooled!

3. sendmail SLOWdown (FBSD 4.1 / Sendmail 8.11.0)

4. vi editor FAQ (Frequently Asked Question List), Part 1/2

5. Can FBSD be a server for win3.11?

6. some crashes from javac in JDK14 Patcheset 2

7. Signal 11 w/ FBSD 4.3 (any solutions?)

8. Missing mouse driver

9. JDK error 11 on Itanium2 hpux

10. JDK - SIGSEGV 11*

11. SUCCESS: JDK 1.3.1 + HotSpot on FBSD 5.0-R

12. JDK for FBSD Location

13. FBSD 4.4-RC && Linux JDK 1.3.1 && JNI ???