Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Mar 2008 20:30:01 -0500
From:      Kurt Miller <kurt@intricatesoftware.com>
To:        freebsd-java@freebsd.org
Cc:        Scott Mitchell <scott+lists.freebsd@fishballoon.org>
Subject:   Re: jdk16 build failure on 7.0R/i386
Message-ID:  <200803102130.02371.kurt@intricatesoftware.com>
In-Reply-To: <20080310231803.GC22200@tuatara.fishballoon.org>
References:  <20080309220029.GB93340@llama.fishballoon.org> <200803100932.37017.lists@intricatesoftware.com> <20080310231803.GC22200@tuatara.fishballoon.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 10 March 2008 7:18:03 pm Scott Mitchell wrote:
> On Mon, Mar 10, 2008 at 08:32:36AM -0500, Kurt Miller wrote:
> > This look like another case of the jvm not being linked to a thread library.
> > At least the 'Dynamic libraries:' section of the crash report doesn't list a
> > thread library. What does ldd show?
> > 
> > ldd /var/tmp/usr/ports/java/jdk16/work/control/build/bsd-i586/bin/java
> > 
> > Can you extract the portion of the build log that shows the link command
> > for the 'java' executable? It should look something like this:
> 
> Hi Kurt,
> 
> Here you go - I saved the entire log so just let me know if you need to see
> any more of it:
> 
> Rebuilding /var/tmp/usr/ports/java/jdk16/work/control/build/bsd-i586/bin/java because of /var/tmp/usr/ports/java/jdk16/work/control/build/bsd-i586/tmp/java/java/obj/java.o /var/tmp/usr/ports/java/jdk16/work/control/build/bsd-i586/tmp/java/java/obj/java_md.o /var/tmp/usr/ports/java/jdk16/work/control/build/bsd-i586/tmp/java/java/obj/splashscreen_stubs.o
> /usr/bin/gcc  -o /var/tmp/usr/ports/java/jdk16/work/control/build/bsd-i586/bin/java  -L/var/tmp/usr/ports/java/jdk16/work/control/build/bsd-i586/lib/i386 -Wl,-soname=lib.so  -Wl,--whole-archive /var/tmp/usr/ports/java/jdk16/work/control/build/bsd-i586/tmp/java/jli/obj/static/libjli.a -Wl,--no-whole-archive \
> 	    /var/tmp/usr/ports/java/jdk16/work/control/build/bsd-i586/tmp/java/java/obj/java.o /var/tmp/usr/ports/java/jdk16/work/control/build/bsd-i586/tmp/java/java/obj/java_md.o /var/tmp/usr/ports/java/jdk16/work/control/build/bsd-i586/tmp/java/java/obj/splashscreen_stubs.o -pthread   -pthread 
> gmake[4]: Leaving directory `/var/tmp/usr/ports/java/jdk16/work/j2se/make/java/main/java'
> 

Hi,

Weird. It seems like gc(1)/ld(1) has changed the way -pthread is handled. In 6.X
and below it will record a NEEDED entry for libpthread even if the executable
doesn't reference any pthread symbols. I suspect that in 7.X if the executable
doesn't reference any pthread symbols it wont record the NEEDED entry.

You can verify that for me with the following test on 7.0:

=== k.c ====
int
main(void) {
        return 0;
}
=========

$ cc k.c -pthread && ldd a.out
a.out:
        libpthread.so.2 => /usr/lib/libpthread.so.2 (0x80062a000)
        libc.so.6 => /lib/libc.so.6 (0x800755000)

Do you get similar ldd output on 7.0?

-Kurt



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