'contrib' build failure on MacOS, JDK 13.

35 views
Skip to first unread message

Dan Rollo

unread,
Feb 10, 2020, 4:44:56 PM2/10/20
to Java Native Access
Hi All,

After merging a recent doc fix, I noticed a CI build failure for MacOS.
I’m guessing the default JDK version for Travis MacOS builds recently bumped to JDK 13, which is not happy with the ‘contrib' builds that specify a javac target/source of 1.6.

Any thoughts on how best to solve this Travis build failure on MacOS?

https://travis-ci.org/java-native-access/jna/jobs/648496867#L2053


I was toying with the idea of changing the travis CI config to use specific JDK versions for the MacOS builds.
Or would it be better to bump the contrib ant javac target/source to 1.7?
Other?

Thanks,
Dan Rollo

Matthias Bläsing

unread,
Feb 11, 2020, 11:34:53 AM2/11/20
to jna-...@googlegroups.com
Hi Dan,

Am Montag, den 10.02.2020, 13:44 -0800 schrieb Dan Rollo:
> I’m guessing the default JDK version for Travis MacOS builds recently
> bumped to JDK 13, which is not happy with the ‘contrib' builds that
> specify a javac target/source of 1.6.

Yes you are right - according to the log it is indeed updated:

$ java -Xmx32m -version
openjdk version "13.0.1" 2019-10-15
OpenJDK Runtime Environment (build 13.0.1+9)
OpenJDK 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)

I'm not sure when JDK 6 support was dropped but 12 or 13 might match.

> Any thoughts on how best to solve this Travis build failure on MacOS?
>
> https://travis-ci.org/java-native-access/jna/jobs/648496867#L2053
>
>
> I was toying with the idea of changing the travis CI config to use
> specific JDK versions for the MacOS builds.

I thinkg this would be the best option - we might want to bump java
baseline version to 8, but till then I would prefer to have 1.6
compatible builds.

I read this:

https://github.com/AdoptOpenJDK/homebrew-openjdk

as an option, that OpenJDK 8 could be installed via homebrew. We are
already pulling in libtool and ant via brew, maybe OpenJDK could be
installed indentially.

> Or would it be better to bump the contrib ant javac target/source to
> 1.7?

I'd like to keep them on 1.6.

Greetings

Matthias

Dan Rollo

unread,
Feb 11, 2020, 9:41:47 PM2/11/20
to Java Native Access
Hi Matthias,

I hammered on this a bit, and came up with two PR's.

1. Update the contrib tree projects to use javac target/source = 1.7 (from 1.6).

2. Change the CI build on mac os to use jdk 12, which still works with javac target/source = 1.6.

I think you'd prefer PR #1164, but wanted to present both. I'm fine with either one, or something completely different.

Dan

Daniel Widdis

unread,
Feb 11, 2020, 10:13:28 PM2/11/20
to jna-...@googlegroups.com
I would recommend using 11, which is still receiving updates, rather than 12. 

Sent from my iPhone

On Feb 11, 2020, at 6:41 PM, Dan Rollo <danr...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "Java Native Access" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jna-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jna-users/1e7f283d-9927-4dfb-807a-644490888f69%40googlegroups.com.

Matthias Bläsing

unread,
Feb 12, 2020, 11:37:13 AM2/12/20
to jna-...@googlegroups.com
Hi,

Am Dienstag, den 11.02.2020, 19:13 -0800 schrieb Daniel Widdis:
> I would recommend using 11, which is still receiving updates, rather
> than 12.

I agree, that a LTS JDK is preferred. But JDK8 is still supported (Red
Hat took over the jdk8 update project inside the OpenJDK project).

If I remember correctly, the default JDK was 11 for a long time on mac
OS, so I'm ok with it.

Greetings

Matthias

Dan Rollo

unread,
Feb 12, 2020, 8:27:33 PM2/12/20
to Java Native Access
Good point Daniel!
I updated the CI PR to use jdk 11 on the mac osx build.


Dan

Dan Rollo

unread,
Feb 13, 2020, 10:32:43 PM2/13/20
to Java Native Access
Well shucks. Seems like the month for jdk changes. The build is failing after merging my macosx changes, but the failure seems to be due to a compile error on the Linux "ea" build due to jdk 15.
Does the info below ring bells for anyone?  https://travis-ci.org/java-native-access/jna/jobs/650149778

-dynamic-properties:
785     [echo] Java version 15-ea, compatibility: 9, ant: 15

On Wednesday, February 12, 2020 at 8:27:33 PM UTC-5, Dan Rollo wrote:





The build failure is this:

-do-compile-test:
1109 [javac] Compiling 114 source files to /home/travis/build/java-native-access/jna/contrib/platform/build/test/classes
1110 [javac] warning: [options] system modules path not set in conjunction with -source 9
1111 [javac] /home/travis/build/java-native-access/jna/contrib/platform/test/com/sun/jna/platform/unix/X11Test.java:26: error: cannot find symbol
1112 [javac] import com.sun.jna.StructureFieldOrderInspector;
1113 [javac] ^
1114 [javac] symbol: class StructureFieldOrderInspector
1115 [javac] location: package com.sun.jna
1116 [javac] /home/travis/build/java-native-access/jna/contrib/platform/test/com/sun/jna/platform/unix/X11Test.java:120: error: cannot find symbol
1117 [javac] StructureFieldOrderInspector.batchCheckStructureGetFieldOrder(X11.class, null, true);
1118 [javac] ^
1119 [javac] symbol: variable StructureFieldOrderInspector
1120 [javac] location: class X11Test
1121 [javac] Note: Some input files use or override a deprecated API.
1122 [javac] Note: Recompile with -Xlint:deprecation for details.
1123 [javac] Note: Some input files use unchecked or unsafe operations.
1124 [javac] Note: Recompile with -Xlint:unchecked for details.
1125 [javac] 2 errors
1126 [javac] 1 warning
1128BUILD FAILED
1129/home/travis/build/java-native-access/jna/build.xml:1276: The following error occurred while executing this line:
1130/home/travis/build/java-native-access/jna/contrib/platform/nbproject/build-impl.xml:1256: The following error occurred while executing this line:
1131/home/travis/build/java-native-access/jna/contrib/platform/nbproject/build-impl.xml:269: Compile failed; see the compiler error output for details.

Matthias Bläsing

unread,
Feb 14, 2020, 2:00:50 PM2/14/20
to jna-...@googlegroups.com
Hi Dan,

the problem was observed in the past on the travis infrastructure. I'm
not sure why it happens, but its "only" a flaky build. I retriggered
the build and it comes back green now.

Greetings

Matthias
Reply all
Reply to author
Forward
0 new messages