Build error on jdk8/tl project - Thread.o:(.data.rel+0xbc): undefined reference to JVM_SetNativeThreadName
Andrew Hughes
ahughes at redhat.com
Thu Mar 22 15:41:14 UTC 2012
----- Original Message -----
> ----- Original Message -----
> > Hi all,
> >
> > I'm back from holiday and am building the latest (
> > http://hg.openjdk.java.net/jdk8/tl/jdk ) project for our 3rd Java
> > User Group OpenJDK hack day. I've run across an error that I
> > haven't
> > been able to resolve.
> >
> > ..
> > ..
> > ../../../build/linux-i586/tmp/java/java.lang/java/obj/Thread.o:(.data.rel+0xbc):
> > undefined reference to `JVM_SetNativeThreadName'
> > collect2: ld returned 1 exit status
> > make[2]: *** [../../../build/linux-i586/lib/i386/libjava.so] Error
> > 1
> > make[2]: Leaving directory
> > `/home/openjdk/sources/jdk/make/java/java'
> > make[1]: *** [all] Error 1
> > make[1]: Leaving directory `/home/openjdk/sources/jdk/make/java'
> > make: *** [all] Error 1
> >
> > I've posted a more verbose version of the error at
> > http://pastebin.com/9exQpFkq
> >
> > I got a bit lost in the C++ spelunking, so Ben Evans gave me a hand
> > and we think we've tracked it down to the fact that the reference
> > to
> > JVM_SetNativeThreadName is not in java_lang_Thread.h (a generated
> > header). Looking at java_lang_Thread.h, the reference that is the
> > closest is Java_SetNativeThreadName, which we think has been
> > incorrectly generated.
> >
> > I'll confess I haven't caught up with the last couple of months
> > archives, so I'm not sure if I missed a javah issue or something
> > else obvious.
> >
> > Cheers,
> > Martijn
> >
> >
> >
> >
>
> It would be helpful to include details of how you're building so
> people
> can try and replicate this issue. From the log, it looks like an x86
> build.
>
> Are you building the whole JDK? My guess would be that
> JVM_SetNativeThreadName
> should be present in HotSpot and indeed grep confirms this:
>
> $ grep -r 'JVM_SetNativeThreadName' *
> make/linux/makefiles/mapfile-vers-debug:
> JVM_SetNativeThreadName;
> make/linux/makefiles/mapfile-vers-product:
> JVM_SetNativeThreadName;
> make/solaris/makefiles/mapfile-vers:
> JVM_SetNativeThreadName;
> src/share/vm/prims/jvm.cpp:JVM_ENTRY(void,
> JVM_SetNativeThreadName(JNIEnv* env, jobject jthread, jstring name))
> src/share/vm/prims/jvm.cpp: JVMWrapper("JVM_SetNativeThreadName");
> src/share/vm/prims/jvm.h:JVM_SetNativeThreadName(JNIEnv *env, jobject
> jthread, jstring name);
>
> It seems to have been introduced in:
>
> --
> Andrew :)
>
> Free Java Software Engineer
> Red Hat, Inc. (http://www.redhat.com)
>
> PGP Key: 248BDC07 (https://keys.indymedia.org/)
> Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07
>
>
changeset: 2767:436b4a3231bf
user: dcubed
date: Thu Oct 13 09:35:42 2011 -0700
summary: 7098194: integrate macosx-port changes
stupid e-mail client...
--
Andrew :)
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07
More information about the build-dev
mailing list