From owner-freebsd-java@FreeBSD.ORG Tue Mar 11 22:11:46 2008 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 339D8106566C for ; Tue, 11 Mar 2008 22:11:46 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 044BC8FC19 for ; Tue, 11 Mar 2008 22:11:45 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.2/8.14.2/NETPLEX) with ESMTP id m2BMBRrr028707; Tue, 11 Mar 2008 18:11:28 -0400 (EDT) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Tue, 11 Mar 2008 18:11:28 -0400 (EDT) Date: Tue, 11 Mar 2008 18:11:27 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Kurt Miller In-Reply-To: <47D5FAEF.3080900@intricatesoftware.com> Message-ID: References: <20080309220029.GB93340@llama.fishballoon.org> <200803100932.37017.lists@intricatesoftware.com> <20080310231803.GC22200@tuatara.fishballoon.org> <200803102130.02371.kurt@intricatesoftware.com> <47D5FAEF.3080900@intricatesoftware.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Scott Mitchell , freebsd-java@freebsd.org Subject: Re: jdk16 build failure on 7.0R/i386 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Mar 2008 22:11:46 -0000 On Mon, 10 Mar 2008, Kurt Miller wrote: > Daniel Eischen wrote: >> On Mon, 10 Mar 2008, Kurt Miller wrote: >> >>> 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 gcc(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. >> >> No, for binaries it works the same way on 7.x as 6.x. >> >> $ gcc -o k k.c -pthread >> $ ldd k >> k: >> libthr.so.3 => /lib/libthr.so.3 (0x2807c000) >> libc.so.7 => /lib/libc.so.7 (0x2808f000) >> >> I believe that -pthread does now act differently in 7.0+ when used >> to build shared libraries. Prior to 7.0, using -pthread to build >> shared libraries would not record a dependency on libpthread, >> whereas in 7.0+ it will record a dependency. >> >> Other than that, the only change in 7.0 is that libthr is now the >> default instead of libkse (nee libpthread). >> > > Hi Daniel, > > Hmm, well I'm perplexed then. I can't see why > work/control/build/bsd-i586/bin/java isn't recording the NEEDED on > libthr.so. Perhaps the -Wl,-soname=lib.so argument or the double > -pthread is the culprit. Can you experiment on 7.0 to see if they are > involved at all? I'm sorry, this (jdk16) doesn't even come close to building on 7.0 using native jdk15. It fails right at the get-go. See http://people.freebsd.org/~deischen/jdk16.build.log. The tail end of the log is this: Creating test_gamma ... ( \ echo '#!/bin/sh'; \ echo "# Generated by /opt/FreeBSD/src/ports/java/jdk16/work/hotspot/build/bsd/makefiles/buildtree.make"; \ echo '. ./env.sh'; \ echo "if [ -z \$JAVA_HOME ]; then { echo "JAVA_HOME must be set to run this test."; exit 0; }; fi"; \ echo "if ! \${JAVA_HOME}/bin/java -d32 -fullversion 2>1 > /dev/null"; \ echo "then"; \ echo " echo "JAVA_HOME must point to 32bit JDK."; exit 0;"; \ echo "fi"; \ echo 'CLASSPATH="/opt/FreeBSD/src/ports/java/jdk16/work/hotspot/build/linux:$CLASSPATH"'; \ echo '[ -f gamma_g ] && { gamma=gamma_g; }'; \ echo './${gamma:-gamma} -Xbatch Queens < /dev/null'; \ ) > test_gamma chmod +x test_gamma gmake[5]: Leaving directory `/opt/FreeBSD/src/ports/java/jdk16/work/control/build/bsd-i586/hotspot/outputdir/bsd_i486_compiler2/profiled' touch bsd_i486_compiler2/profiled gmake[4]: Leaving directory `/opt/FreeBSD/src/ports/java/jdk16/work/control/build/bsd-i586/hotspot/outputdir' cd bsd_i486_compiler2/product && gmake -w gmake[4]: Entering directory `/opt/FreeBSD/src/ports/java/jdk16/work/control/build/bsd-i586/hotspot/outputdir/bsd_i486_compiler2/product' Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Removing ../generated/includeDB.current to force regeneration. cd ../generated; cat /opt/FreeBSD/src/ports/java/jdk16/work/hotspot/src/share/vm/includeDB_core /opt/FreeBSD/src/ports/java/jdk16/work/hotspot/src/share/vm/includeDB_gc /opt/FreeBSD/src/ports/java/jdk16/work/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge /opt/FreeBSD/src/ports/java/jdk16/work/hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep /opt/FreeBSD/src/ports/java/jdk16/work/hotspot/src/share/vm/gc_implementation/includeDB_gc_shared /opt/FreeBSD/src/ports/java/jdk16/work/hotspot/src/share/vm/includeDB_ci /opt/FreeBSD/src/ports/java/jdk16/work/hotspot/src/share/vm/includeDB_compiler2 > includeDB cd ../generated; if [ ! -r incls ] ; then \ mkdir incls ; \ fi cd ../generated; /usr/local/jdk1.5.0/bin/java -DUSE_PRECOMPILED_HEADER -classpath . MakeDeps diffs UnixPlatform platform.current includeDB.current /opt/FreeBSD/src/ports/java/jdk16/work/hotspot/build/bsd/platform_i486 includeDB Old database: computing closures New database: reading database: includeDB java.lang.NullPointerException gmake[4]: *** [../generated/includeDB.current] Error 1 gmake[4]: Leaving directory `/opt/FreeBSD/src/ports/java/jdk16/work/control/build/bsd-i586/hotspot/outputdir/bsd_i486_compiler2/product' gmake[3]: *** [product] Error 2 gmake[3]: Leaving directory `/opt/FreeBSD/src/ports/java/jdk16/work/control/build/bsd-i586/hotspot/outputdir' gmake[2]: *** [generic_build2] Error 2 gmake[2]: Leaving directory `/opt/FreeBSD/src/ports/java/jdk16/work/hotspot/make' gmake[1]: *** [product] Error 2 gmake[1]: Leaving directory `/opt/FreeBSD/src/ports/java/jdk16/work/hotspot/make' gmake: *** [hotspot-build] Error 2 *** Error code 2 -- DE