-
Notifications
You must be signed in to change notification settings - Fork 740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for compiling on gcc 7.3 #1684
Comments
I think #1682 is a prerequisite to this. We need to fix the JIT to be able to compile with the latest GCC versions. |
Just to mark it here explicitly, #1682 fixes have been merged at this point (actually 12 days ago :) ) |
I've heard that OpenJ9 compiles with gcc 7.3 with warnings as errors disabled. |
@fjeremic i tried building a Java 11 SDK using OpenJ9 with
is there a workaround? |
@mpirvu Have you been able to compile with gcc 7? I recall mention of it from the fix devirtualization PR. |
I've compiled the JIT dll for Java8 with gcc 7.3 on Ubuntu and could run successfully with it. |
I built the complete VM with gcc7.2.1 for arm. I hit the same 'declared but never defined' errors as Babneet until I used |
Longer (medium?) term that'll need to be addressed. If anyone has suggestions on right approach, would love to hear them. |
I don't see those functions being used outside |
I build the complete Java 11 OpenJ9 SDK with gcc-7.3 and g++7.3 on Linux x86. I encountered the following issues:
The top six commits in the following branch address the above gcc-7.3 issues: https://github.com/babsingh/openj9/commits/jdk11_gcc73. With these changes, Java 11 OpenJ9 SDK is built successfully without any errors using gcc-7.3. |
You could open a PR to fix issues 2, 3, 4. Not sure about the solution to issue 1, the JIT team should weigh in. |
You can try Marius's suggestion #1684 (comment) |
there may be other places in OpenJ9 where GNU89 inline semantics may be used. so, we should update makefiles to include |
OpenJ9 PR - #1890 |
Update: OpenJDK11 with OpenJ9 should now compile with gcc7.3 on xLinux (related pull requests - #1921, #1890). On pLinux, OpenJDK11 with OpenJ9 fails compilation in native OpenJDK code. OpenJDK11 code still doesn't have code changes to support gcc7.3 on pLinux. There is no zLinux machine available to test OpenJDK11 with OpenJ9 compilation using gcc7.3. Based upon lack of pLinux support, I am guessing zLinux support for gcc7.3 should be missing in OpenJDK11. For #1921 changes, @keithc-ca put a pull request to replace |
The PR for Java 8 to use $(CC) instead of gcc is ibmruntimes/openj9-openjdk-jdk8#88, but it had to be reverted because it broke AIX builds using xlc. I have been working towards an OpenJ9 PR that will allow ibmruntimes/openj9-openjdk-jdk8#88 (and similar changes for other extension repos) to be restored. |
@keithc-ca - any updates on your fix? |
@irinarada I think this is the wrong issue to be asking, I think you meant to ask in #1919. Anyway, there are still some problems to resolve before #1919 is fixed. |
@babsingh what testing did you run on the xLinux JVM compiled with gcc 7.3? |
just |
please do, and if they pass and its easy might as well run the extended tests as well. |
i tried compiling/running sanity test suite with JDK11, which is built using GCC-7.3. because of #992, openj9/tests can't be compiled with JDK11. JEP 320 removes the Java EE and CORBA modules in JDK11. there is no quick fix for this issue. we will have to wait for the test team to resolve this issue. for future testing, i have a uploaded JDK11 built using GCC-7.3 on Box: https://ibm.box.com/s/3o2ztz67fdbhll0ey3kqdyv13py7qjg3. |
Ran sanity test locally with above JDK11. For now, I excluded following projects as they need to be updated (see #2071 for detail)
Test Result:
Output:
|
I ran the test in docker and it does not have |
Ran extended.functional
testSCCMLTests2_1 failure is related to missing In summary, excluding the following projects, the rest sanity and extended tests are ok.
|
Update: OpenJ9 JDK11 builds successfully on xLinux and pLinux with gcc-7.3. OpenJ9 JDK11 build fails on zLinux/gcc-7.3 with compile failures in OpenJDK code. But, OpenJ9 compile is successful. |
@babsingh can you please re-try zlinux with the latest jdk11 extensions and see where it stands now. |
@pshipton do you also want me to save the build log and the SDK if it passes successfully? |
If its working we can change OpenJ9 Java 11 to compile with gcc 7. If its not working, I think we'll have to see about fixing the problems in the openjdk11 extensions. I suppose the build log might help identify the first problem, but I don't think we need the entire log. Not sure anybody needs the sdk right now. |
@pshipton JDK11 zLinux didn't compile with gcc-7.3.0. I saw two errors:
Compilation stopped due to the second error. The second error is related to OpenJDK native code. OpenJDK Extensions repo used: https://github.com/ibmruntimes/openj9-openjdk-jdk11. Build log: jdk11_zlinux_build.log |
@babsingh any ETA for the fix for the second error above? |
@irinarada this is an issue with the latest OpenJDK11 extensions repo (https://github.com/ibmruntimes/openj9-openjdk-jdk11). The JDK/JCL team will have to fix this issue. OpenJ9 (VM/GC/JIT/OMR) should compile fine with gcc-7.3.0 on zLinux; I have properly compiled OpenJ9 JDK11 using gcc-7.3.0 on zLinux with an older extensions repo. |
I'm getting an issue with OMR compilation using GCC7.3 unless
|
@sxa555 on which platform, did you see this error? was this error seen while compiling OpenJ9 with OMR? there are Dockerfiles [xLinux, pLinux and zLinux] to compile OpenJ9 JDK11 with gcc-7.3.0. Dockerfiles: https://github.com/eclipse/openj9/tree/master/buildenv/docker/jdk11. do you see the same error with these Dockerfiles? |
The warnings appears on (at least) zlinux and xlinux with both JDK8 and JDK11 source with GCC 7.3.0 - it's a new check that the compiler warns on that was introduced in either gcc 5 or 6. |
After some investigation, I found that the above error only occurs with |
OpenJDK has modified Linux compilation for Java 11+ to use gcc 7.3 and OpenJ9 should support the same.
https://bugs.openjdk.java.net/browse/JDK-8200375
The text was updated successfully, but these errors were encountered: