JDK-8356016 : Build fails by clang(XCode 16.3) on macOS after JDK-8347719
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 25
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • CPU: generic
  • Submitted: 2025-04-30
  • Updated: 2025-05-29
  • Resolved: 2025-05-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 25
25 b25Fixed
Related Reports
Causes :  
Description
https://github.com/openjdk/jdk/pull/24608#issuecomment-2833849941

8347719 introduces another cause for the build failure on Xcode 16.3:
Apple clang version 17.0.0 (clang-1700.0.13.3)
Target: arm64-apple-darwin24.4.0

=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_libjvm_gtest_objs_test_networkUtilization.o:
In file included fromjdk/test/hotspot/gtest/jfr/test_networkUtilization.cpp:45:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/c++/v1/vector:3023:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/c++/v1/locale:293:67: error: 'free' is deprecated: use os::free [-Werror,-Wdeprecated-declarations]
  293 |   unique_ptr<unsigned char, void (*)(void*)> __stat_hold(nullptr, free);
      |                                                                   ^
jdk/src/hotspot/share/utilities/forbiddenFunctions.hpp:73:1: note: 'free' has been explicitly marked deprecated here
   73 | FORBID_IMPORTED_C_FUNCTION(void free(void *ptr), "use os::free");
      | ^
jdk/src/hotspot/share/utilities/compilerWarnings.hpp:124:3: note: expanded from macro 'FORBID_IMPORTED_C_FUNCTION'
  124 |   FORBID_C_FUNCTION(FORBIDDEN_FUNCTION_IMPORT_SPEC Signature, Alternative)
      |   ^
jdk/src/hotspot/share/utilities/compilerWarnings.hpp:109:18: note: expanded from macro 'FORBID_C_FUNCTION'
  109 |   extern "C" { [[deprecated(Alternative)]] Signature; }
      |                  ^
In file included from jdk/test/hotspot/gtest/jfr/test_networkUtilization.cpp:45:
   ... (rest of output omitted)

* All command lines available in jdk/build/macosx-aarch64-server-release/make-support/failure-logs.
=== End of repeated output ===
Comments
Changeset: ae7ae847 Branch: master Author: Kim Barrett <kbarrett@openjdk.org> Date: 2025-05-23 06:54:51 +0000 URL: https://git.openjdk.org/jdk/commit/ae7ae847d4cb0dc2caf7bdc6a82673287cba8d30
23-05-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/25380 Date: 2025-05-22 06:17:33 +0000
22-05-2025

Confirmed reproducible with Xcode-16.3.
19-05-2025

I was unable to reproduce this with Xcode-16.2. It will take me a little while to get setup to try 16.3.
19-05-2025