Keep jdk11 GHA runners on macosx?
Antonio Vieiro
avieirov at redhat.com
Tue Nov 19 10:02:49 UTC 2024
Hi,
Since the deprecation of `macos-12` runners is imminent I dared to do two quick PRs to try to workaround the builds on XCode 14.
The first one [1] introduces a `--enable-xcode14` flag that has no effect on pre-XCode 12 builds (see [1] test results). This flag can then be used on XCode 14 builds (see [2]) to build & run tier-1 tests.
Note that the objective is to at least build & run tests on XCode 14 only (i.e., running tier2 and later tiers is out of scope).
Looking at it in perspective we may well drop this configuration flag and detect the XCode version directly, and make the build system adapt to it.
Alternatively we may want to tackle about 4 backports for the sprintf deprecation [3] and the invocation of function pointers without prototypes in awtlib [4]. This is more risky, I think.
Cheers,
Antonio
[1]
https://github.com/openjdk/jdk11u-dev/pull/2966
[2]
https://github.com/openjdk/jdk11u-dev/pull/2967
[3]
024-11-09T19:58:55.9236680Z In file included from /Users/runner/work/jdk11u-dev/jdk11u-dev/src/jdk.pack/share/native/common-unpack/bands.cpp:44:
2024-11-09T19:58:55.9324940Z /Users/runner/work/jdk11u-dev/jdk11u-dev/src/jdk.pack/share/native/common-unpack/unpack.h:421:52: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
2024-11-09T19:58:55.9328870Z Creating support/test/hotspot/jtreg/native/lib/libnativemethbind002.dylib from 1 file(s)
2024-11-09T19:58:56.0331530Z const char* saveIntStr(int num) { char buf[30]; sprintf(buf, "%d", num); return saveStr(buf); }
2024-11-09T19:58:56.0332970Z Creating support/test/hotspot/jtreg/native/lib/libnativemethbind003.dylib from 1 file(s)
[4]
024-11-09T19:06:59.1104900Z gmake[2]: *** Waiting for unfinished jobs....
2024-11-09T19:06:59.1531740Z Creating support/test/hotspot/jtreg/native/lib/libnosuspendStackTrace.dylib from 1 file(s)
2024-11-09T19:06:59.2544570Z Creating support/test/hotspot/jtreg/native/lib/librawmonitor.dylib from 1 file(s)
2024-11-09T19:06:59.3553310Z /Users/runner/work/jdk11u-dev/jdk11u-dev/src/java.desktop/share/native/libawt/awt/medialib/awt_ImagingLib.c:430:43: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
2024-11-09T19:06:59.3558840Z Creating support/test/hotspot/jtreg/native/lib/libheapref.dylib from 1 file(s)
2024-11-09T19:06:59.4566920Z if ((*sMlibFns[MLIB_CONVKERNCVT].fptr)(kdata, &scale, dkern, w, h,
El 15/11/24 a las 15:16, Antonio Vieiro escribió:
> Hi all,
>
> El 15/11/24 a las 13:41, Severin Gehwolf escribió:
>> Just to clarify:
>>
>> You are proposing to require macos-13 or better with XCode 14.3.1 or
>> newer, for JDK 11u builds on macosx going forward?
>
> Not really. The proposal is to add a configuration flag ("--with-xcode14" or similar) so that:
>
> - Builds and tier-1 tests can be run in GHA: macos-13/XCode 14.3.1
> - By adding "-Wno-deprecated-declaration" to some .mk files to bypass the "sprintf" deprecation that is generating errors.
> - By adding "-Wno-deprecated-non-prototype" to some .mk files to bypass sending arguments to functions without protype (AWTlib), that are generating errors too.
>
> If the "--with-xcode-14" configuration is _not_ present then builds are as usual, i.e., exising pipelines on macos-12 and earlier will run as usual.
>
>>
>> If there is no way of building/running on older osx/xcode I guess there
>> is no other choice but to set this as a requirement for building going
>> forward?
>
> The flag is of interest only for doing GHA builds on XCode 14, as imposed by the deprecation of macos-12 GHA runners.
>
> So if you don't set the flag you can build as usual, on macos-12 and earlier, with older XCode versions.
>
>>
>> It would be good to know what the community thinks.
>
> Yep.
>
> Cheers,
> Antonio
--
Antonio Vieiro
SSE - Sustaining Engineering
Red Hat, Inc. (https://www.redhat.com)
PGP key : https://keys.openpgp.org/vks/v1/by-fingerprint/9A0CE286F22F7CCF2BC045FB1163A4EF861302B0
Fingerprint: 9A0C E286 F22F 7CCF 2BC0 45FB 1163 A4EF 8613 02B0
More information about the jdk-updates-dev
mailing list