JDK-8367044 : Clang release build fails after JDK-8314488
  • Type: Bug
  • Component: infrastructure
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: generic
  • Submitted: 2025-09-08
  • Updated: 2025-09-29
  • Resolved: 2025-09-29
Related Reports
Causes :  
Duplicate :  
Description
Clang-14 release build fails on both x86 and aarch64 on Ubuntu-24.04 after JDK-8314488.
I also checked clang-18, and it fails as well.

How to reproduce:

export CC=/usr/lib/llvm-14/bin/clang
export CXX=/usr/lib/llvm-14/bin/clang++
./configure --with-debug-level=release --with-toolchain-type=clang
make images

The snippet of error log:
=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_libjvm_objs_precompiled_precompiled.hpp.pch:
In file included from /tmp/jdk-src/src/hotspot/share/precompiled/precompiled.hpp:32:
In file included from /tmp/jdk-src/src/hotspot/share/classfile/javaClasses.inline.hpp:28:
In file included from /tmp/jdk-src/src/hotspot/share/classfile/javaClasses.hpp:28:
In file included from /tmp/jdk-src/src/hotspot/share/classfile/vmClasses.hpp:28:
In file included from /tmp/jdk-src/src/hotspot/share/classfile/vmClassID.hpp:29:
In file included from /tmp/jdk-src/src/hotspot/share/utilities/enumIterator.hpp:30:
In file included from /tmp/jdk-src/src/hotspot/share/metaprogramming/primitiveConversions.hpp:30:
In file included from /tmp/jdk-src/src/hotspot/share/utilities/globalDefinitions.hpp:34:
In file included from /tmp/jdk-src/src/hotspot/share/utilities/globalDefinitions_gcc.hpp:28:
In file included from /tmp/build-release/support/modules_include/java.base/jni.h:39:
/usr/include/stdio.h:365:12: error: exception specification in declaration does not match previous declaration
extern int sprintf (char *__restrict __s,
           ^
/tmp/jdk-src/src/hotspot/share/utilities/forbiddenFunctions.hpp:61:23: note: previous declaration is here
FORBID_C_FUNCTION(int sprintf(char*, const char*, ...), "use os::snprintf");
   ... (rest of output omitted)

* All command lines available in /tmp/build-release/make-support/failure-logs.
=== End of repeated output ===

Comments
I think there is a duplicate issue JDK-8367051 and KimBarrett is fixing the issue there. Let me close this issue.
09-09-2025