oracle / oraclesolaris-contrib

oraclesolaris-contrib is a repository focussed on the Oracle Solaris 11.4 StatsStore, using methodologies like REST to connect to Oracle Solaris 11.4 and the new features being introduced in Oracle Solaris 11.4 OS.
https://www.oracle.com/solaris/solaris11/
Other
47 stars 15 forks source link

Build fails on OpenIndiana #6

Open 3eka opened 2 years ago

3eka commented 2 years ago

Hi,

This is great idea, so I could not resist to test it. Since OI does not have SunStudio available, I have tried with GCC 10, and Oracle (former Sun) JDK 1.8 package:

:; java -version
java version "1.8.0_241"
Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.241-b07, mixed mode)

:; cd oraclesolaris-contrib/OracleSolaris_OpenJDK_Builder
:; ./build-all.sh
Building Openjdk 9...
Build error. See: ./oraclesolaris-contrib/OracleSolaris_OpenJDK_Builder/logs/jdk-9.log

That error file shows:

configure: Found potential Boot JDK using configure arguments
configure: Potential Boot JDK found at /usr/jdk/instances/jdk1.8.0 did not contain bin/java; ignoring
configure: error: The path given by --with-boot-jdk does not contain a valid Boot JDK
configure exiting with result code 1

So, what has to be done here, to proceed?

Best regards

P.S: I get same error when trying to use OpenJDK package from OI:

:; pkg list '*openjdk8*'
NAME (PUBLISHER)                                  VERSION                    IFO
developer/java/openjdk8                           1.8.232-2020.0.1.2         i--
runtime/java/openjdk8                             1.8.232-2020.0.1.2         i--
psumbera commented 2 years ago

Thank you for trying!

I'm afraid you won't be able to build OpenJDK 9 to 12 without Studio 12.4 compiler. It is availble here:

https://www.oracle.com/tools/developerstudio/downloads/solaris-studio-v124-downloads.html

(of course one could try to backport Solaris GCC build patches to OpenJDK 9 to 12).

But your problem is that it cannot find JDK 8. Can you check whether you have:

/usr/jdk/instances/jdk1.8.0/bin/java ?

If not you might need to modify jdk9.sh file with correct location on your system.

3eka commented 2 years ago

Hi Petr,

Regarding Java: :; ls -hl /usr/jdk/instances/jdk1.8.0*/bin/java -rwxr-xr-x 1 root root 8,7K Dec 11  2019 /usr/jdk/instances/jdk1.8.0_241/bin/java

so, I have created sym-link): :; (cd /usr/jdk/instances/ && pfexec ln -s jdk1.8.0_241 jdk1.8.0)

Thanks for pointing to that. I still have to check SunStudio use.

Best regards.

On 16.02.2022 20:22, Petr Sumbera wrote:

Thank you for trying!

I'm afraid you won't be able to build OpenJDK 9 to 12 without Studio 12.4 compiler. It is availble here:

https://www.oracle.com/tools/developerstudio/downloads/solaris-studio-v124-downloads.html

(of course one could try to backport Solaris GCC build patches to OpenJDK 9 to 12).

But your problem is that it cannot find JDK 8. Can you check whether you have:

|/usr/jdk/instances/jdk1.8.0/bin/java| ?

If not you might need to modify |jdk9.sh| file with correct location on your system.

— Reply to this email directly, view it on GitHub https://github.com/oracle/oraclesolaris-contrib/issues/6#issuecomment-1042071013, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADEN3PYW3JGXJ7E2ZPOTOKDU3P2NZANCNFSM5OSBF2NQ. You are receiving this because you authored the thread.Message ID: @.***>

-- Predrag Zečević @.***

jimhall commented 2 years ago

It seems that Peter Tribble talks to this: https://ptribble.blogspot.com/2021/12/keeping-java-alive-on-illumos.html

He states:

_At which point I simply carried on building OpenJDK. All I did was take the patch from the commit that removed Solaris support, applied that backwards, and added on top the pkgsrc patches that Jonathan Perkin had originally developed to support a gcc port on Solaris and illumos - patches we had already been using extensively from JDK11 onwards.

Along the way, I've been cleaning up the patches to eliminate the SPARC code (you could put it back, but it's not a focus of this project) and most of the code to support the Studio toolchain (the version of Studio to build current Java isn't compatible with illumos anyway). So what we're left with is a straightforward Solaris/illumos+gcc port._

psumbera commented 2 years ago

I think he doesn't mean Studio 12.4 compiler. I belive that OpenJDK 13 was first version which reqired more modern Studio version (12.5 or 12.6). Therefore this project also switched to GCC with OpenJDK 13.

This unfortunatelly caused problem for SPARC build. Now SPARC will fail to build version 13. If we used Studio 12.6 we should be still able to build verison 13 and 14.