You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building fails on macOS in zlib with error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
#18615
Building JDK17 on macOS ARM64 Sonoma 14.2 with XCode 15.0.1 fails with:
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/compress.c:46:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT compress2(dest, destLen, source, sourceLen, level)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/compress.c:92:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT compress(dest, destLen, source, sourceLen)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/compress.c:105:15: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
uLong ZEXPORT compressBound(sourceLen)
^
3 errors generated.
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:222:12: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
local void slide_hash(s)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:249:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT deflateInit_(strm, level, version, stream_size)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:261:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:413:11: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
local int deflateStateCheck(strm)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:436:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT deflateSetDictionary(strm, dictionary, dictLength)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:505:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT deflateGetDictionary(strm, dictionary, dictLength)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:527:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT deflateResetKeep(strm)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:565:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT deflateReset(strm)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:577:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT deflateSetHeader(strm, head)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:588:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT deflatePending(strm, pending, bits)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:602:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT deflatePrime(strm, bits, value)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:629:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT deflateParams(strm, level, strategy)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:678:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:720:15: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
uLong ZEXPORT deflateBound(strm, sourceLen)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:792:12: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
local void putShortMSB(s, b)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:806:12: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
local void flush_pending(strm)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:839:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT deflate(strm, flush)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:1154:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT deflateEnd(strm)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:1180:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT deflateCopy(dest, source)
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[3]: *** [/Users/kevin/git/openj9/openj9-openjdk-jdk17/build/macosx-aarch64-server-release/support/native/java.base/libzip/compress.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [/Users/kevin/git/openj9/openj9-openjdk-jdk17/build/macosx-aarch64-server-release/support/native/java.base/libzip/deflate.o] Error 1
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/gzclose.c:35:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT gzclose(file)
^
1 error generated.
make[3]: *** [/Users/kevin/git/openj9/openj9-openjdk-jdk17/build/macosx-aarch64-server-release/support/native/java.base/libzip/gzclose.o] Error 1
make[2]: *** [java.base-libs] Error 2
make[2]: *** Waiting for unfinished jobs....
Generating REFERENCE_API javadoc for 21 modules
Generating JAVASE_API javadoc for 21 modules
Generating JDK_API javadoc for 65 modules
Updating support/src.zip
Compiling 2736 files for java.desktop
Generating javadoc for openj9 source files
sed: 1: "/<section class="module ...": unexpected EOF (pending }'s)
sed: 1: "/<section class="servic ...": unexpected EOF (pending }'s)
ERROR: Build failed for target 'all' in configuration 'macosx-aarch64-server-release' (exit code 2)
Stopping sjavac server
=== Output from failing command(s) repeated here ===
* For target support_native_java.base_libzip_compress.o:
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/compress.c:46:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT compress2(dest, destLen, source, sourceLen, level)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/compress.c:92:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT compress(dest, destLen, source, sourceLen)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/compress.c:105:15: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
uLong ZEXPORT compressBound(sourceLen)
^
3 errors generated.
* For target support_native_java.base_libzip_deflate.o:
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:222:12: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
local void slide_hash(s)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:249:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT deflateInit_(strm, level, version, stream_size)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:261:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:413:11: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
local int deflateStateCheck(strm)
^
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/deflate.c:436:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT deflateSetDictionary(strm, dictionary, dictLength)
^
... (rest of output omitted)
* For target support_native_java.base_libzip_gzclose.o:
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.base/share/native/libzip/zlib/gzclose.c:35:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
int ZEXPORT gzclose(file)
^
1 error generated.
* All command lines available in /Users/kevin/git/openj9/openj9-openjdk-jdk17/build/macosx-aarch64-server-release/make-support/failure-logs.
=== End of repeated output ===
No indication of failed target found.
Hint: Try searching the build log for '] Error'.
Hint: See doc/building.html#troubleshooting for assistance.
make[1]: *** [main] Error 2
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered:
Next issue due to __has_trivial_assign is deprecated:
In file included from /Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.desktop/share/native/libharfbuzz/hb.hh:527:
/Users/kevin/git/openj9/openj9-openjdk-jdk17/src/java.desktop/share/native/libharfbuzz/hb-algs.hh:1195:18: error: builtin __has_trivial_assign is deprecated; use __is_trivially_assignable instead [-Werror,-Wdeprecated-builtins]
static_assert (hb_is_trivially_copy_assignable (T), "");
Adding -Wno-deprecated-builtins as follows did not resolve those errors (even with make clean):
Building JDK17 on macOS ARM64 Sonoma 14.2 with XCode 15.0.1 fails with:
The text was updated successfully, but these errors were encountered: