Build error on jdk8/tl project - Thread.o:(.data.rel+0xbc): undefined reference to JVM_SetNativeThreadName

Martijn Verburg martijnverburg at gmail.com
Sun Mar 25 12:01:46 UTC 2012


Hi Sean/Alan/Max,

Sean - Your solution did the trick, and I'll probably use this for now as
it means a smaller VM for the members to work with
Alan/Max - I did get the full build going, but then my VM ran out of space.

So I'm now going to go away and build a smaller VM for enthusiasts to fix
warnings etc in the tl/jdk project and a larger VM for the braver souls who
want to build and explore the whole thing.

Thanks for the help folks!

Cheers,
Martijn

On 23 March 2012 10:11, Seán Coffey <sean.coffey at oracle.com> wrote:

> **
> Martijn,
>
> I ran into same issue a few weeks back. If you're only interested in
> building the jdk repo, you can update your ALT_HOTSPOT_IMPORT_PATH variable
> to point to a recent 7u4 build.
>
> e.g export ALT_HOTSPOT_IMPORT_PATH=/export/home/jdk1.7.0_04
>
> recent binaries at : http://jdk7.java.net/download.html
>
> HTH,
> Sean.
>
>
> On 23/03/2012 09:46, Martijn Verburg wrote:
>
> Hi Alan/Max,
>
>  You're both right, I've actually been working from
> http://hg.openjdk.java.net/jdk8/tl/jdk as opposed to
> http://hg.openjdk.java.net/jdk8/tl - thanks for catching that with the
> limited info I posted.
>
>  Will start from scratch from http://hg.openjdk.java.net/jdk8/tl and see
> where the yellow brick road takes me :-)
>
>  Cheers,
>  Martijn
>
> On 23 March 2012 06:16, Weijun Wang <weijun.wang at oracle.com> wrote:
>
>> A partial build is you go inside tl/jdk/make/ and run make there, it only
>> builds the tl/jdk part, and the output goes to tl/jdk/build/linux-i586. A
>> full build is you go inside tl/ and run make there, it builds all repos,
>> and output goes to tl/build/linux-i586.
>>
>> I suspect you're doing a partial build because these 2 options appear in
>> the error:
>>
>>    -I../../../build/linux-i586/tmp/java/java.lang/java/CClassHeaders
>>    -I../../../src/solaris/javavm/export
>>
>> This means "src" and "build" are at the same directory levels. Therefore
>> the "build" is inside tl/jdk.
>>
>> -Max
>>
>>
>> On 03/23/2012 01:51 AM, Martijn Verburg wrote:
>>
>>>  Hi Andrew/Alan,
>>>
>>> Thanks for responding! I suspect you are right, I'm only building the tl
>>> project, which i guess is a partial build? I saw the patch that Andrew
>>> mentioned but hadn't put 2 and 2 together that I'd need to build the
>>> hotspot part separately first.
>>>
>>> I'll try that next, my next post will likely be a q about building the
>>> hotspot part or providing the extra info Andrew requested.
>>>
>>> Cheers,
>>> Martijn
>>>
>>>
>>>
>>>
>>> On Thursday, 22 March 2012, Alan Bateman <Alan.Bateman at oracle.com
>>>   <mailto:Alan.Bateman at oracle.com>> wrote:
>>>  > On 22/03/2012 15:19, Martijn Verburg wrote:
>>>  >>
>>>  >> 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
>>>  >
>>>  > Martijn - is this a partial build by any chance? I can imagine the
>>> above failure if doing a partial build and the import JDK is not in sync.
>>>  >
>>>  > -Alan
>>>  >
>>>  >
>>>  >
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20120325/eb9c6c2c/attachment.htm>


More information about the build-dev mailing list