Re: OpenJDK 11.0.2 cannot build on Solaris 11.4

2019-01-18 Thread Rob Petti
Thanks, Erik!

I tried the createSolarisDevkit12.4.sh script, but none of the packages in
that list exist in the package manager at those specific versions, so it
just fails. I basically had to make my own list of packages from scratch
using the existing one as a guideline.

Zones sound like a cleaner solution to me, but I don't know enough about
them to know how to install a specific base OS version. All the docs I find
just install the same version as the 'host'. I'll need to do a bunch more
research, it seems...

On Fri, Jan 18, 2019 at 5:17 PM Erik Joelsson 
wrote:

> Hello Rob,
>
> On 2019-01-17 13:57, Rob Petti 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?
>
> I can't speak for all OpenJDK contributors, but Oracle has no current
> plans for this. We are required to build on the oldest supported Solaris
> version to produce binaries that are compatible with that version. We do
> not produce different binaries for different versions of an OS. Also, as
> I understand it, Oracle is no longer involved in open support of 11u.
> Perhaps the new maintainer will accept contributions for fixing the issue.
>
> > 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=
> > --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

OpenJDK 11.0.2 cannot build on Solaris 11.4

2019-01-17 Thread Rob Petti
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=
--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_source=product_medium=email_sig_campaign=gmail_api_content=thumb>
Rob Petti
about.me/robpetti
<https://about.me/robpetti?promo=email_sig_source=product_medium=email_sig_campaign=gmail_api_content=thumb>