OpenJDK 11.0.2 cannot build on Solaris 11.4

Ao Qi aoqi at loongson.cn
Wed Jan 30 09:32:03 UTC 2019


Hi Rob,

If I recall it correctly, maybe configure with --disable-hotspot-gtest
can solve your problem.

Cheer,
Ao Qi

On Fri, Jan 18, 2019 at 5:57 AM Rob Petti <rob.petti at gmail.com> wrote:
>
> Hey Folks,
>
> I've discovered that OpenJDK 11 cannot be built on Solaris 11.4. Normally
> we would just try to rebuild our system as 11.1, but that's not possible
> since media for that base release is no longer available.
>
> Are there plans to support compilation on Oracle's latest and greatest, or
> at least provide a proper method of building in such an environment?
>
> For the record, here are the errors I'm getting. This is with solarisstudio
> 12.4 (which BTW wouldn't install on Solaris 11.4 without unfreezing the
> python version):
>
> # bash configure --with-boot-jdk=<path to jdk10>
> --with-devkit=/opt/solarisstudio12.4
> # gmake bootcycle-images
> ...
> Compiling 163 files for jdk.jfr
> "/root/jdk11/jdk11u/src/hotspot/os/solaris/os_solaris.cpp", line 1580:
> Error: EM_486 is not defined.
> "/root/jdk11/jdk11u/src/hotspot/os/solaris/os_solaris.cpp", line 1618:
> Error: The type "const arch_t[]" is incomplete.
> 2 Error(s) detected.
> gmake[3]: *** [lib/CompileJvm.gmk:151:
> /root/jdk11/jdk11u/build/solaris-sparcv9-normal-server-release/hotspot/variant-server/libjvm/objs/os_solaris.o]
> Error 2
>
> After patching with http://robpetti.com/files/jdk11-sol114.patch to fix
> https://bugs.openjdk.java.net/browse/JDK-8182035, it gets a bit further,
> but still fails:
>
> Compiling 64 files for jdk.jconsole
> "/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h",
> line 161: Error: __pad is not a member of const __FILE.
> "/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h",
> line 163: Error: __pad is not a member of const __FILE.
> "/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h",
> line 165: Error: __pad is not a member of const __FILE.
> "/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h",
> line 165: Error: __pad is not a member of const __FILE.
> "/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h",
> line 167: Error: __pad is not a member of const __FILE.
> "/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h",
> line 170: Error: __pad is not a member of __FILE.
> "/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h",
> line 170: Error: __pad is not a member of __FILE.
> "/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h",
> line 172: Error: __pad is not a member of __FILE.
> "/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h",
> line 172: Error: __pad is not a member of __FILE.
> "/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h",
> line 174: Error: __pad is not a member of __FILE.
> "/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h",
> line 174: Error: __pad is not a member of __FILE.
> "/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h",
> line 176: Error: __pad is not a member of __FILE.
> "/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h",
> line 176: Error: __pad is not a member of __FILE.
> "/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h",
> line 178: Error: __pad is not a member of __FILE.
> "/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h",
> line 178: Error: __pad is not a member of __FILE.
> "/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h",
> line 182: Error: __pad is not a member of __FILE.
> "/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h",
> line 183: Error: __pad is not a member of __FILE.
> "/opt/solarisstudio12.4/lib/compilers/include/CC/stlport4/stl/_stdio_file.h",
> line 184: Error: __pad is not a member of __FILE.
> 18 Error(s) detected.
>
> It seems the "right" way to do this would be to create a sysroot with older
> 11.1 headers and libraries, and compile against that. Unfortunately the
> --with-sysroot configure option does not completely work correctly. The
> compiler still tries to include /usr/include instead of the sysroot
> headers, and that just results in more build errors. The only way it seems
> to truly get it to use the sysroot was to physically replace /usr/include
> on the machine with the version from the sysroot. This is obviously less
> than ideal.
>
> Is the --with-sysroot issue already known? Is there any other way around it
> aside from manually replacing headers in the system just to compile the JDK?
>
> --
> <https://about.me/robpetti?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=gmail_api&utm_content=thumb>
> Rob Petti
> about.me/robpetti
> <https://about.me/robpetti?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=gmail_api&utm_content=thumb>



More information about the build-dev mailing list