8199319 broke the non-PCH build

Volker Simonis volker.simonis at gmail.com
Mon Mar 12 18:54:47 UTC 2018


I've created "8199472: Fix non-PCH build after JDK-8199319" [1] for
this issue and I'll post a RFR soon.

[1] https://bugs.openjdk.java.net/browse/JDK-8199472

On Mon, Mar 12, 2018 at 5:03 PM, Stefan Karlsson
<stefan.karlsson at oracle.com> wrote:
> On 2018-03-12 16:39, Volker Simonis wrote:
>
> Hi,
>
> change "8199319: Remove handles.inline.hpp include from
> reflectionUtils.hpp" breaks the non-PCH build (at least on Ubuntu
> 16.04 with gcc 5.4.0). If you configure with
> "--disable-precompiled-headers" you will get a whole lot of undefined
> reference for "Handle::Handle(Thread*, oopDesc*)" (see attached list
> at the end of the mail).
>
> I wonder if change 8199319 has ever been tested with a non-PCH build?
>
>
> Before pushing, I built it with these platforms without PCH:
>
> linux-x64
> linux-x64-debug
> linux-x64-open
> linux-x64-debug-open
> macosx-x64
> macosx-x64-debug
> solaris-sparcv9
> solaris-sparcv9-debug
>
> Or maybe this is specific to newer compiler versions? If non-PCH tests
> have been done without running into this issue it would be great to
> know which compiler versions have been used.
>
>
> I'm running with gcc 4.9.2, which I thought was the "official" compiler for
> jdk/hs.
>

Thanks for the information! It seems that my gcc 5.4 does a better
inlining job and doesn't leave any implementation of the inlining
functions in the object files (see my explanation in the bug report).

Unfortunately the "Supported Build Platforms" Wiki page [2] doesn't
contain information about JDK 10/11 (I've already asked on build-dev
to update the page).

[2] https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms

>
> Finally, I REALLY, REALLY (as I've done for about the last 10 years or
> so :) advise to add a "non-PCH" build to your secrete, internal
> JPRT/Mach5 whatsoever HotSpot tests to catch such errors.
>
>
> I build with non-PCH when building locally.
>

Good and sorry, I didn't wanted to blame you :)
I already thought that this might be compiler specific.

>
> I'm currently working on a fix for this. If somebody else is already
> working on this issue, please let me know so we don't duplicate the
> work.
>
>
> I can't reproduce your problem, so it would be good if we could fix this
> together.
>
> I've uploaded a patch with some more handles.inline.hpp fixes:
> http://cr.openjdk.java.net/~stefank/8199319/fixHandlesInline.patch
>
> Maybe try and see how far that gets you.
>

Thanks! I've assembled a fix and I'll post it in a new thread.

Regards,
Volker

> Thanks,
> StefanK
>
>
>
> Regards,
> Volker
>
> hotspot/share/oops/arrayKlass.cpp:111: undefined reference to
> `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/oops/arrayKlass.cpp:111: undefined reference to
> `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/classfile/classListParser.cpp:347: undefined reference
> to `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/classfile/classLoaderData.cpp:387: undefined reference
> to `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/runtime/handles.hpp:121: undefined reference to
> `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/runtime/jniHandles.cpp:532: undefined reference to
> `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/runtime/jniHandles.cpp:532: undefined reference to
> `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/runtime/jniHandles.cpp:532: undefined reference to
> `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/runtime/jniHandles.cpp:532: undefined reference to
> `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/oops/klass.cpp:523: undefined reference to
> `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/runtime/handles.hpp:121: undefined reference to
> `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/runtime/handles.hpp:123: undefined reference to
> `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/runtime/handles.hpp:124: undefined reference to
> `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/classfile/stringTable.cpp:301: undefined reference to
> `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/classfile/systemDictionaryShared.cpp:131: undefined
> reference to `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/runtime/handles.hpp:121: undefined reference to
> `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/runtime/handles.hpp:124: undefined reference to
> `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/runtime/handles.hpp:121: undefined reference to
> `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/classfile/systemDictionaryShared.cpp:152: undefined
> reference to `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/classfile/systemDictionaryShared.cpp:202: undefined
> reference to `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/runtime/handles.hpp:121: undefined reference to
> `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/classfile/systemDictionaryShared.cpp:246: undefined
> reference to `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/classfile/systemDictionaryShared.cpp:263: undefined
> reference to `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/classfile/systemDictionaryShared.cpp:291: undefined
> reference to `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/classfile/systemDictionaryShared.cpp:284: undefined
> reference to `Handle::Handle(Thread*, oopDesc*)'
> hotspot/share/classfile/systemDictionaryShared.cpp:499: undefined
> reference to `Handle::Handle(Thread*, oopDesc*)'
>
>


More information about the hotspot-runtime-dev mailing list