Skip to content

Implement sigsetjmp and siglongjmp for darwin/aarch64 #139555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Jun 19, 2025

Conversation

AlyElashram
Copy link
Contributor

No description provided.

@llvmbot llvmbot added the libc label May 12, 2025
@llvmbot
Copy link
Member

llvmbot commented May 12, 2025

@llvm/pr-subscribers-libc

Author: Aly ElAshram (AlyElashram)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/139555.diff

7 Files Affected:

  • (modified) libc/config/darwin/arm/entrypoints.txt (+4)
  • (modified) libc/config/darwin/arm/headers.txt (+1)
  • (added) libc/src/setjmp/darwin/aarch64/CMakeLists.txt (+51)
  • (added) libc/src/setjmp/darwin/aarch64/longjmp.cpp (+87)
  • (added) libc/src/setjmp/darwin/aarch64/setjmp.cpp (+87)
  • (added) libc/src/setjmp/darwin/aarch64/sigsetjmp.cpp (+40)
  • (added) libc/src/setjmp/darwin/aarch64/sigsetjmp_epilogue.cpp (+21)
diff --git a/libc/config/darwin/arm/entrypoints.txt b/libc/config/darwin/arm/entrypoints.txt
index 308fc49d681d7..07199db6d1ae6 100644
--- a/libc/config/darwin/arm/entrypoints.txt
+++ b/libc/config/darwin/arm/entrypoints.txt
@@ -20,6 +20,10 @@ set(TARGET_LIBC_ENTRYPOINTS
     # errno.h entrypoints
     libc.src.errno.errno
 
+    # setjmp.h entrypoints
+    libc.src.setjmp
+
+
     # string.h entrypoints
     libc.src.string.memccpy
     libc.src.string.memchr
diff --git a/libc/config/darwin/arm/headers.txt b/libc/config/darwin/arm/headers.txt
index 86e7145972324..8f3d6029c9b6a 100644
--- a/libc/config/darwin/arm/headers.txt
+++ b/libc/config/darwin/arm/headers.txt
@@ -7,6 +7,7 @@ set(TARGET_PUBLIC_HEADERS
     libc.include.inttypes
     libc.include.limits
     libc.include.math
+    libc.include.setjmp
     libc.include.stdlib
     libc.include.string
     libc.include.strings
diff --git a/libc/src/setjmp/darwin/aarch64/CMakeLists.txt b/libc/src/setjmp/darwin/aarch64/CMakeLists.txt
new file mode 100644
index 0000000000000..37058e9fb905e
--- /dev/null
+++ b/libc/src/setjmp/darwin/aarch64/CMakeLists.txt
@@ -0,0 +1,51 @@
+if(setjmp_config_options)
+    list(PREPEND setjmp_config_options "COMPILE_OPTIONS")
+endif()
+
+add_entrypoint_object(
+  setjmp
+  SRCS
+    setjmp.cpp
+  HDRS
+    ../../setjmp_impl.h
+  DEPENDS
+    libc.hdr.types.jmp_buf
+  ${setjmp_config_options}
+)
+
+add_entrypoint_object(
+  longjmp
+  SRCS
+    longjmp.cpp
+  HDRS
+    ../../longjmp.h
+  DEPENDS
+    libc.hdr.types.jmp_buf
+  ${setjmp_config_options}
+)
+
+add_entrypoint_object(
+  sigsetjmp
+  SRCS
+    sigsetjmp.cpp
+  HDRS
+    ../../sigsetjmp.h
+  DEPENDS
+    libc.hdr.types.jmp_buf
+    libc.hdr.types.sigset_t
+    libc.hdr.offsetof_macros
+    libc.src.setjmp.sigsetjmp_epilogue
+    libc.src.setjmp.setjmp
+)
+add_object_library(
+  sigsetjmp_epilogue
+  HDRS
+  ../../sigsetjmp_epilogue.h
+  SRCS
+    sigsetjmp_epilogue.cpp
+  DEPENDS
+    libc.src.__support.common
+    libc.src.__support.OSUtil.osutil
+    libc.hdr.types.jmp_buf
+    libc.hdr.types.sigset_t
+)
\ No newline at end of file
diff --git a/libc/src/setjmp/darwin/aarch64/longjmp.cpp b/libc/src/setjmp/darwin/aarch64/longjmp.cpp
new file mode 100644
index 0000000000000..eca4303f58034
--- /dev/null
+++ b/libc/src/setjmp/darwin/aarch64/longjmp.cpp
@@ -0,0 +1,87 @@
+//===-- Implementation of longjmp for AArch64 -----------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/setjmp/longjmp.h"
+#include "src/__support/common.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+// TODO: if MTE stack tagging is in use (-fsanitize=memtag-stack), we need to
+// iterate over the region between the old and new values of sp, using STG or
+// ST2G instructions to clear the memory tags on the invalidated region of the
+// stack. But this requires a means of finding out that we're in that mode, and
+// as far as I can see there isn't currently a predefined macro for that.
+//
+// (__ARM_FEATURE_MEMORY_TAGGING only indicates whether the target architecture
+// supports the MTE instructions, not whether the compiler is configured to use
+// them.)
+
+[[gnu::naked]] LLVM_LIBC_FUNCTION(void, longjmp,
+                                  ([[maybe_unused]] jmp_buf buf,
+                                   [[maybe_unused]] int val)) {
+  // If BTI branch protection is in use, the compiler will automatically insert
+  // a BTI here, so we don't need to make any extra effort to do so.
+
+  // If PAC branch protection is in use, there's no need to sign the return
+  // address at the start of longjmp, because we're not going to use it anyway!
+
+  asm(
+      // Reload the callee-saved GPRs, including fp and lr.
+      R"(
+        ldp x19, x20, [x0,  #0*16]
+        ldp x21, x22, [x0,  #1*16]
+        ldp x23, x24, [x0,  #2*16]
+        ldp x25, x26, [x0,  #3*16]
+        ldp x27, x28, [x0,  #4*16]
+        ldp x29, x30, [x0,  #5*16]
+      )"
+      // We would usually reload the platform register x18 here
+      // but due to the apple ABI we are not allowed to use the x18 register
+      // so we reload the stack pointer only.
+      // https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms#Respect-the-purpose-of-specific-CPU-registers
+      R"(
+        ldr x2,       [x0,  #6*16]
+        mov sp, x2
+      )"
+
+#if __ARM_FP
+      // Reload the callee-saved FP registers.
+      R"(
+        ldp d8,  d9,  [x0,  #7*16]
+        ldp d10, d11, [x0,  #8*16]
+        ldp d12, d13, [x0,  #9*16]
+        ldp d14, d15, [x0, #10*16]
+      )"
+#endif
+
+      // Calculate the return value.
+      R"(
+        cmp w1, #0
+        cinc w0, w1, eq
+      )"
+
+#if (__ARM_FEATURE_PAC_DEFAULT & 7) == 5
+      // Authenticate the return address using the PAC A key, since the
+      // compilation options ask for PAC protection even on leaf functions.
+      R"(
+        autiasp
+      )"
+#elif (__ARM_FEATURE_PAC_DEFAULT & 7) == 6
+      // Same, but using the PAC B key.
+      R"(
+        autibsp
+      )"
+#endif
+
+      R"(
+        ret
+      )");
+}
+
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/setjmp/darwin/aarch64/setjmp.cpp b/libc/src/setjmp/darwin/aarch64/setjmp.cpp
new file mode 100644
index 0000000000000..2842590850217
--- /dev/null
+++ b/libc/src/setjmp/darwin/aarch64/setjmp.cpp
@@ -0,0 +1,87 @@
+//===-- Implementation of setjmp for darwin AArch64 -----------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/__support/common.h"
+#include "src/__support/macros/config.h"
+#include "src/setjmp/setjmp_impl.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+[[gnu::naked]] LLVM_LIBC_FUNCTION(int, setjmp, ([[maybe_unused]] jmp_buf buf)) {
+  // If BTI branch protection is in use, the compiler will automatically insert
+  // a BTI here, so we don't need to make any extra effort to do so.
+
+  asm(
+#if __ARM_FEATURE_PAC_DEFAULT & 1
+      // Sign the return address using the PAC A key.
+      R"(
+        paciasp
+      )"
+#elif __ARM_FEATURE_PAC_DEFAULT & 2
+      // Sign the return address using the PAC B key.
+      R"(
+        pacibsp
+      )"
+#endif
+
+      // Store all the callee-saved GPRs, including fp (x29) and also lr (x30).
+      // Of course lr isn't normally callee-saved (the call instruction itself
+      // can't help clobbering it), but we certainly need to save it for this
+      // purpose.
+      R"(
+        stp x19, x20, [x0,  #0*16]
+        stp x21, x22, [x0,  #1*16]
+        stp x23, x24, [x0,  #2*16]
+        stp x25, x26, [x0,  #3*16]
+        stp x27, x28, [x0,  #4*16]
+        stp x29, x30, [x0,  #5*16]
+      )"
+
+      // While we usually store the platform register x18
+      // the darwin ABI inhibts usage of it
+      // Store just the stack pointer.
+      R"(
+        add x1, sp, #0
+        str x1,       [x0,  #6*16]
+      )"
+
+#if __ARM_FP
+      // Store the callee-saved FP registers. AAPCS64 only requires the low 64
+      // bits of v8-v15 to be preserved, i.e. each of d8,...,d15.
+      R"(
+        stp d8,  d9,  [x0,  #7*16]
+        stp d10, d11, [x0,  #8*16]
+        stp d12, d13, [x0,  #9*16]
+        stp d14, d15, [x0, #10*16]
+      )"
+#endif
+
+      // Set up return value of zero.
+      R"(
+        mov x0, #0
+      )"
+
+#if (__ARM_FEATURE_PAC_DEFAULT & 7) == 5
+      // Authenticate the return address using the PAC A key, since the
+      // compilation options ask for PAC protection even on leaf functions.
+      R"(
+        autiasp
+      )"
+#elif (__ARM_FEATURE_PAC_DEFAULT & 7) == 6
+      // Same, but using the PAC B key.
+      R"(
+        autibsp
+      )"
+#endif
+
+      R"(
+        ret
+      )");
+}
+
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/setjmp/darwin/aarch64/sigsetjmp.cpp b/libc/src/setjmp/darwin/aarch64/sigsetjmp.cpp
new file mode 100644
index 0000000000000..88b5a28e1105d
--- /dev/null
+++ b/libc/src/setjmp/darwin/aarch64/sigsetjmp.cpp
@@ -0,0 +1,40 @@
+//===-- Implementation of darwin/aarch64 sigsetjmp ------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/setjmp/sigsetjmp.h"
+#include "hdr/offsetof_macros.h"
+#include "src/__support/common.h"
+#include "src/__support/macros/config.h"
+#include "src/setjmp/setjmp_impl.h"
+#include "src/setjmp/sigsetjmp_epilogue.h"
+
+namespace LIBC_NAMESPACE_DECL {
+[[gnu::naked]]
+LLVM_LIBC_FUNCTION(int, sigsetjmp, (sigjmp_buf, int)) {
+
+  // The difference between sigsetjmp and setjmp is storing the signal mask of
+  // the calling thread
+
+  asm(R"(
+      cbz w1, %c[setjmp]
+
+      str x30, [x0, %c[retaddr]]
+      str x19, [x0, %c[extra]]
+      mov x19, x0
+      bl %c[setjmp]
+
+      mov w1, w0
+      mov x0, x19
+      ldr x30, [x0, %c[retaddr]]
+      ldr x19, [x0, %c[extra]]
+      b %c[epilogue])" ::[retaddr] "i"(offsetof(__jmp_buf, sig_retaddr)),
+      [extra] "i"(offsetof(__jmp_buf, sig_extra)), [setjmp] "i"(setjmp),
+      [epilogue] "i"(sigsetjmp_epilogue)
+      : "x0", "x1", "x19", "x30");
+}
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/setjmp/darwin/aarch64/sigsetjmp_epilogue.cpp b/libc/src/setjmp/darwin/aarch64/sigsetjmp_epilogue.cpp
new file mode 100644
index 0000000000000..b2ca4d99ed82b
--- /dev/null
+++ b/libc/src/setjmp/darwin/aarch64/sigsetjmp_epilogue.cpp
@@ -0,0 +1,21 @@
+//===-- Implementation of sigsetjmp_epilogue ------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/setjmp/sigsetjmp_epilogue.h"
+#include "src/__support/OSUtil/syscall.h"
+#include "src/__support/common.h"
+#include "src/signal/sigprocmask.h"
+
+namespace LIBC_NAMESPACE_DECL {
+[[gnu::returns_twice]] int sigsetjmp_epilogue(jmp_buf buffer, int retval) {
+  syscall_impl<long>(sigprocmask, SIG_SETMASK,
+                     /* set= */ retval ? &buffer->sigmask : nullptr,
+                     /* old_set= */ retval ? nullptr : &buffer->sigmask);
+  return retval;
+}
+} // namespace LIBC_NAMESPACE_DECL

@lntue lntue self-requested a review May 12, 2025 15:01
@@ -0,0 +1,51 @@
if(setjmp_config_options)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for this cmake file to be evaluated, you need to add add_subdirectory calls to the cmake files above it. You also might be able to reuse the setjmp and longjmp implementations that already exist in setjmp/aarch64, and only have darwin specific code in setjmp/darwin.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense , I'm just unsure how I could remove parts of the inline assembly. My first thought was to define some flag or header for example is_darwin and then surround the code that should not be executed for darwin with that flag , and since it's only a single line of assembly I don't think that would be super hard no ?

Any thoughts on how to do that?

Copy link
Contributor Author

@AlyElashram AlyElashram May 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only part we would need to remove from the setjmp is storing the platform register.
https://github.com/llvm/llvm-project/blob/main/libc/src/setjmp/aarch64/setjmp.cpp#L45-L57

If i can somehow enforce that this flag (LIBC_COPT_SETJMP_AARCH64_RESTORE_PLATFORM_REGISTER) is false , we can totally reuse the implementation.

And my assumption is that this could be done by adding a new cmake file and removing these lines from the cmake (these exist in the aarch64 directory)

if(LIBC_CONF_SETJMP_AARCH64_RESTORE_PLATFORM_REGISTER)
  list(APPEND setjmp_config_options "-DLIBC_COPT_SETJMP_AARCH64_RESTORE_PLATFORM_REGISTER")
endif()

Copy link
Contributor

@michaelrj-google michaelrj-google May 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like that's a flag controlled by the platform config, the top level config is here: https://github.com/llvm/llvm-project/blob/main/libc/config/config.json#L111

You can add a config.json to config/darwin with just that flag and it'll control that flag for just darwin, here's the one for baremetal as an example: https://github.com/llvm/llvm-project/blob/main/libc/config/baremetal/config.json

That way you don't have to modify the cmake to set this particular copt

@SchrodingerZhu
Copy link
Contributor

I dont think any assembly code is needed in this patch. macOS does not require specialized asm. Th epilogue is the only different part for macOS
.

"doc": "Avoid setjmp saving the value of x18, and longjmp restoring it. The Apple AArch64 ABI specifies that this register is reserved and should not be used"
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add trailing new line

@@ -12,6 +12,7 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_ARCHITECTURE})
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_ARCHITECTURE})
endif()


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Undo this extra change.

@@ -20,6 +20,13 @@ set(TARGET_LIBC_ENTRYPOINTS
# errno.h entrypoints
libc.src.errno.errno

# setjmp.h entrypoints
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing to note here , that the default target triple in the pipeline for MacOS has the architecture set to arm and not aarch64 , this will call the long/setjmp for arm and fail to find the sigsetjmp and siglongjmp fron my understanding.

@SchrodingerZhu

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that sounds like a historical issue.... I suggest we should switch everything to aarch64. Not sure how much work is required

@AlyElashram AlyElashram force-pushed the darwin-sigsetjmp-siglongjmp branch 3 times, most recently from dd0aecd to ad98ffb Compare May 28, 2025 23:13
@AlyElashram AlyElashram force-pushed the darwin-sigsetjmp-siglongjmp branch from ad98ffb to 7a02945 Compare June 5, 2025 23:54
Copy link
Contributor

@SchrodingerZhu SchrodingerZhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move

add_subdirectory(setjmp)

before the full build guard?

Copy link
Contributor

@michaelrj-google michaelrj-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with a nit.

@@ -43,4 +45,4 @@ if (TARGET libc.src.setjmp.sigsetjmp_epilogue)
DEPENDS
.${LIBC_TARGET_ARCHITECTURE}.sigsetjmp
)
endif()
endif()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: fix missing newline

Copy link
Contributor

@SchrodingerZhu SchrodingerZhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for doing this!

@SchrodingerZhu SchrodingerZhu merged commit 5645d67 into llvm:main Jun 19, 2025
13 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 19, 2025

LLVM Buildbot has detected a new failure on builder libc-riscv32-qemu-yocto-fullbuild-dbg running on rv32gc-qemu-system while building libc at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/196/builds/9202

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
-- Skipping hermetic test libc.test.src.math.smoke.setpayloadsigf16_test.__hermetic__ as it has missing deps: libc.src.math.setpayloadsigf16.
-- Skipping unittest libc.test.src.math.smoke.f16add_test.__unit__ as it has missing deps: libc.src.math.f16add.
-- Skipping hermetic test libc.test.src.math.smoke.f16add_test.__hermetic__ as it has missing deps: libc.src.math.f16add.
-- Skipping unittest libc.test.src.math.smoke.f16addf_test.__unit__ as it has missing deps: libc.src.math.f16addf.
-- Skipping hermetic test libc.test.src.math.smoke.f16addf_test.__hermetic__ as it has missing deps: libc.src.math.f16addf.
-- Skipping unittest libc.test.src.math.smoke.f16addl_test.__unit__ as it has missing deps: libc.src.math.f16addl.
-- Skipping hermetic test libc.test.src.math.smoke.f16addl_test.__hermetic__ as it has missing deps: libc.src.math.f16addl.
-- Skipping unittest libc.test.src.math.smoke.f16addf128_test.__unit__ as it has missing deps: libc.src.math.f16addf128.
-- Skipping hermetic test libc.test.src.math.smoke.f16addf128_test.__hermetic__ as it has missing deps: libc.src.math.f16addf128.
-- Skipping unittest libc.test.src.math.smoke.f16sub_test.__unit__ as it has missing deps: libc.src.math.f16sub.
-- Skipping hermetic test libc.test.src.math.smoke.f16sub_test.__hermetic__ as it has missing deps: libc.src.math.f16sub.
-- Skipping unittest libc.test.src.math.smoke.f16subf_test.__unit__ as it has missing deps: libc.src.math.f16subf.
-- Skipping hermetic test libc.test.src.math.smoke.f16subf_test.__hermetic__ as it has missing deps: libc.src.math.f16subf.
-- Skipping unittest libc.test.src.math.smoke.f16subl_test.__unit__ as it has missing deps: libc.src.math.f16subl.
-- Skipping hermetic test libc.test.src.math.smoke.f16subl_test.__hermetic__ as it has missing deps: libc.src.math.f16subl.
-- Skipping unittest libc.test.src.math.smoke.f16subf128_test.__unit__ as it has missing deps: libc.src.math.f16subf128.
-- Skipping hermetic test libc.test.src.math.smoke.f16subf128_test.__hermetic__ as it has missing deps: libc.src.math.f16subf128.
-- Skipping unittest libc.test.src.math.smoke.f16div_test.__unit__ as it has missing deps: libc.src.math.f16div.
-- Skipping hermetic test libc.test.src.math.smoke.f16div_test.__hermetic__ as it has missing deps: libc.src.math.f16div.
-- Skipping unittest libc.test.src.math.smoke.f16divf_test.__unit__ as it has missing deps: libc.src.math.f16divf.
-- Skipping hermetic test libc.test.src.math.smoke.f16divf_test.__hermetic__ as it has missing deps: libc.src.math.f16divf.
-- Skipping unittest libc.test.src.math.smoke.f16divl_test.__unit__ as it has missing deps: libc.src.math.f16divl.
-- Skipping hermetic test libc.test.src.math.smoke.f16divl_test.__hermetic__ as it has missing deps: libc.src.math.f16divl.
-- Skipping unittest libc.test.src.math.smoke.f16divf128_test.__unit__ as it has missing deps: libc.src.math.f16divf128.
-- Skipping hermetic test libc.test.src.math.smoke.f16divf128_test.__hermetic__ as it has missing deps: libc.src.math.f16divf128.
-- Skipping unittest libc.test.src.math.smoke.f16fma_test.__unit__ as it has missing deps: libc.src.math.f16fma.
-- Skipping hermetic test libc.test.src.math.smoke.f16fma_test.__hermetic__ as it has missing deps: libc.src.math.f16fma.
-- Skipping unittest libc.test.src.math.smoke.f16fmaf_test.__unit__ as it has missing deps: libc.src.math.f16fmaf.
-- Skipping hermetic test libc.test.src.math.smoke.f16fmaf_test.__hermetic__ as it has missing deps: libc.src.math.f16fmaf.
-- Skipping unittest libc.test.src.math.smoke.f16fmal_test.__unit__ as it has missing deps: libc.src.math.f16fmal.
-- Skipping hermetic test libc.test.src.math.smoke.f16fmal_test.__hermetic__ as it has missing deps: libc.src.math.f16fmal.
-- Skipping unittest libc.test.src.math.smoke.f16fmaf128_test.__unit__ as it has missing deps: libc.src.math.f16fmaf128.
-- Skipping hermetic test libc.test.src.math.smoke.f16fmaf128_test.__hermetic__ as it has missing deps: libc.src.math.f16fmaf128.
-- Skipping unittest libc.test.src.math.smoke.f16sqrt_test.__unit__ as it has missing deps: libc.src.math.f16sqrt.
-- Skipping hermetic test libc.test.src.math.smoke.f16sqrt_test.__hermetic__ as it has missing deps: libc.src.math.f16sqrt.
-- Skipping unittest libc.test.src.math.smoke.f16sqrtf_test.__unit__ as it has missing deps: libc.src.math.f16sqrtf.
-- Skipping hermetic test libc.test.src.math.smoke.f16sqrtf_test.__hermetic__ as it has missing deps: libc.src.math.f16sqrtf.
-- Skipping unittest libc.test.src.math.smoke.f16sqrtl_test.__unit__ as it has missing deps: libc.src.math.f16sqrtl.
-- Skipping hermetic test libc.test.src.math.smoke.f16sqrtl_test.__hermetic__ as it has missing deps: libc.src.math.f16sqrtl.
-- Skipping unittest libc.test.src.math.smoke.f16sqrtf128_test.__unit__ as it has missing deps: libc.src.math.f16sqrtf128.
-- Skipping hermetic test libc.test.src.math.smoke.f16sqrtf128_test.__hermetic__ as it has missing deps: libc.src.math.f16sqrtf128.
-- Skipping unittest libc.test.src.math.smoke.f16mul_test.__unit__ as it has missing deps: libc.src.math.f16mul.
-- Skipping hermetic test libc.test.src.math.smoke.f16mul_test.__hermetic__ as it has missing deps: libc.src.math.f16mul.
-- Skipping unittest libc.test.src.math.smoke.f16mulf_test.__unit__ as it has missing deps: libc.src.math.f16mulf.
-- Skipping hermetic test libc.test.src.math.smoke.f16mulf_test.__hermetic__ as it has missing deps: libc.src.math.f16mulf.
-- Skipping unittest libc.test.src.math.smoke.f16mull_test.__unit__ as it has missing deps: libc.src.math.f16mull.
-- Skipping hermetic test libc.test.src.math.smoke.f16mull_test.__hermetic__ as it has missing deps: libc.src.math.f16mull.
-- Skipping unittest libc.test.src.math.smoke.f16mulf128_test.__unit__ as it has missing deps: libc.src.math.f16mulf128.
-- Skipping hermetic test libc.test.src.math.smoke.f16mulf128_test.__hermetic__ as it has missing deps: libc.src.math.f16mulf128.
-- Skipping unittest libc.test.src.setjmp.sigsetjmp_test as it has missing deps: libc.src.setjmp.sigsetjmp.
Step 5 (cmake) failure: cmake (failure)
...
-- Skipping hermetic test libc.test.src.wchar.wcschr_test.__hermetic__ as it has missing deps: libc.src.wchar.wcschr.
-- Skipping unittest libc.test.src.wchar.wcsncmp_test.__unit__ as it has missing deps: libc.src.wchar.wcsncmp.
-- Skipping hermetic test libc.test.src.wchar.wcsncmp_test.__hermetic__ as it has missing deps: libc.src.wchar.wcsncmp.
-- Skipping unittest libc.test.src.wchar.wcscmp_test.__unit__ as it has missing deps: libc.src.wchar.wcscmp.
-- Skipping hermetic test libc.test.src.wchar.wcscmp_test.__hermetic__ as it has missing deps: libc.src.wchar.wcscmp.
-- Skipping unittest libc.test.src.wchar.wcspbrk_test.__unit__ as it has missing deps: libc.src.wchar.wcspbrk.
-- Skipping hermetic test libc.test.src.wchar.wcspbrk_test.__hermetic__ as it has missing deps: libc.src.wchar.wcspbrk.
-- Skipping unittest libc.test.src.wchar.wcsrchr_test.__unit__ as it has missing deps: libc.src.wchar.wcsrchr.
-- Skipping hermetic test libc.test.src.wchar.wcsrchr_test.__hermetic__ as it has missing deps: libc.src.wchar.wcsrchr.
-- Skipping unittest libc.test.src.wchar.wcsspn_test.__unit__ as it has missing deps: libc.src.wchar.wcsspn.
-- Skipping hermetic test libc.test.src.wchar.wcsspn_test.__hermetic__ as it has missing deps: libc.src.wchar.wcsspn.
-- Skipping unittest libc.test.src.wchar.wmemchr_test.__unit__ as it has missing deps: libc.src.wchar.wmemchr.
-- Skipping hermetic test libc.test.src.wchar.wmemchr_test.__hermetic__ as it has missing deps: libc.src.wchar.wmemchr.
-- Skipping unittest libc.test.src.wchar.wmemcmp_test.__unit__ as it has missing deps: libc.src.wchar.wmemcmp.
-- Skipping hermetic test libc.test.src.wchar.wmemcmp_test.__hermetic__ as it has missing deps: libc.src.wchar.wmemcmp.
-- Skipping unittest libc.test.src.wchar.wmempcpy_test.__unit__ as it has missing deps: libc.src.wchar.wmempcpy.
-- Skipping hermetic test libc.test.src.wchar.wmempcpy_test.__hermetic__ as it has missing deps: libc.src.wchar.wmempcpy.
-- Skipping unittest libc.test.src.wchar.wmemcpy_test.__unit__ as it has missing deps: libc.src.wchar.wmemcpy.
-- Skipping hermetic test libc.test.src.wchar.wmemcpy_test.__hermetic__ as it has missing deps: libc.src.wchar.wmemcpy.
-- Skipping unittest libc.test.src.wchar.wmemmove_test.__unit__ as it has missing deps: libc.src.wchar.wmemmove.
-- Skipping hermetic test libc.test.src.wchar.wmemmove_test.__hermetic__ as it has missing deps: libc.src.wchar.wmemmove.
-- Skipping unittest libc.test.src.wchar.wcsncpy_test.__unit__ as it has missing deps: libc.src.wchar.wcsncpy.
-- Skipping hermetic test libc.test.src.wchar.wcsncpy_test.__hermetic__ as it has missing deps: libc.src.wchar.wcsncpy.
-- Skipping unittest libc.test.src.wchar.wcscat_test.__unit__ as it has missing deps: libc.src.wchar.wcscat.
-- Skipping hermetic test libc.test.src.wchar.wcscat_test.__hermetic__ as it has missing deps: libc.src.wchar.wcscat.
-- Skipping unittest libc.test.src.wchar.wcsstr_test.__unit__ as it has missing deps: libc.src.wchar.wcsstr.
-- Skipping hermetic test libc.test.src.wchar.wcsstr_test.__hermetic__ as it has missing deps: libc.src.wchar.wcsstr.
-- Skipping unittest libc.test.src.wchar.wcsncat_test.__unit__ as it has missing deps: libc.src.wchar.wcsncat.
-- Skipping hermetic test libc.test.src.wchar.wcsncat_test.__hermetic__ as it has missing deps: libc.src.wchar.wcsncat.
-- Skipping unittest libc.test.src.wchar.wcscpy_test.__unit__ as it has missing deps: libc.src.wchar.wcscpy.
-- Skipping hermetic test libc.test.src.wchar.wcscpy_test.__hermetic__ as it has missing deps: libc.src.wchar.wcscpy.
-- Skipping unittest libc.test.src.time.clock_getres_test.__unit__ as it has missing deps: libc.src.time.clock_getres.
-- Skipping hermetic test libc.test.src.time.clock_getres_test.__hermetic__ as it has missing deps: libc.src.time.clock_getres.
-- Skipping unittest libc.test.src.sys.epoll.linux.epoll_pwait2_test as it has missing deps: libc.src.sys.epoll.epoll_pwait2.
-- check-runtimes does nothing.
-- Configuring incomplete, errors occurred!
['cmake', '../llvm-project/runtimes', '-GNinja', '-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_ENABLE_RUNTIMES=libc', '-DLLVM_LIBC_FULL_BUILD=ON', '-DCMAKE_C_FLAGS=-mabi=ilp32d -march=rv32imafdc --target=riscv32-unknown-linux-gnu --sysroot=/opt/riscv/sysroot --gcc-toolchain=/opt/riscv', '-DCMAKE_CXX_FLAGS=-mabi=ilp32d -march=rv32imafdc --target=riscv32-unknown-linux-gnu --sysroot=/opt/riscv/sysroot --gcc-toolchain=/opt/riscv', '-DCMAKE_EXE_LINKER_FLAGS_INIT=-fuse-ld=lld', '-DCMAKE_CROSSCOMPILING_EMULATOR=/home/libcrv32buildbot/cross.sh', '-DLIBC_TARGET_TRIPLE=riscv32-unknown-linux-gnu', '-DCMAKE_SYSTEM_NAME=Linux', '-DLLVM_HOST_TRIPLE=riscv32-unknown-linux-gnu', '-DLLVM_TARGETS_TO_BUILD=RISCV', '-DCMAKE_LINKER=/usr/bin/ld.lld', '-DLLVM_LIBC_MPFR_INSTALL_PATH=/home/libcrv32buildbot/gmp+mpfr/'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 176, in step
    yield
  File "/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 130, in main
    run_command(['cmake', os.path.join(source_dir, cmake_root)] + cmake_args)
  File "/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 191, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.12/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '../llvm-project/runtimes', '-GNinja', '-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_ENABLE_RUNTIMES=libc', '-DLLVM_LIBC_FULL_BUILD=ON', '-DCMAKE_C_FLAGS=-mabi=ilp32d -march=rv32imafdc --target=riscv32-unknown-linux-gnu --sysroot=/opt/riscv/sysroot --gcc-toolchain=/opt/riscv', '-DCMAKE_CXX_FLAGS=-mabi=ilp32d -march=rv32imafdc --target=riscv32-unknown-linux-gnu --sysroot=/opt/riscv/sysroot --gcc-toolchain=/opt/riscv', '-DCMAKE_EXE_LINKER_FLAGS_INIT=-fuse-ld=lld', '-DCMAKE_CROSSCOMPILING_EMULATOR=/home/libcrv32buildbot/cross.sh', '-DLIBC_TARGET_TRIPLE=riscv32-unknown-linux-gnu', '-DCMAKE_SYSTEM_NAME=Linux', '-DLLVM_HOST_TRIPLE=riscv32-unknown-linux-gnu', '-DLLVM_TARGETS_TO_BUILD=RISCV', '-DCMAKE_LINKER=/usr/bin/ld.lld', '-DLLVM_LIBC_MPFR_INSTALL_PATH=/home/libcrv32buildbot/gmp+mpfr/']' returned non-zero exit status 1.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 19, 2025

LLVM Buildbot has detected a new failure on builder libc-x86_64-debian-fullbuild-dbg-asan running on libc-x86_64-debian-fullbuild while building libc at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/171/builds/24251

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 191, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '../llvm-project/runtimes', '-GNinja', '-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_USE_SANITIZER=Address', '-DLLVM_ENABLE_RUNTIMES=libc', '-DLLVM_LIBC_FULL_BUILD=ON']' returned non-zero exit status 1.
@@@STEP_FAILURE@@@
@@@BUILD_STEP build libc@@@
Running: ninja libc
[0/1] Re-running CMake...
-- Performing standalone runtimes build.
-- Could NOT find LLVM (missing: LLVM_DIR)
-- Could NOT find Clang (missing: Clang_DIR)
-- LLVM host triple: x86_64-unknown-linux-gnu
-- LLVM default target triple: x86_64-unknown-linux-gnu
-- Setting LIBC_NAMESPACE namespace to '__llvm_libc_20_0_0_git'
-- Set COMPILER_RESOURCE_DIR to /usr/lib/llvm-14/lib/clang/14.0.6 using --print-resource-dir
-- Building libc for x86_64 on linux with
        LIBC_COMPILE_OPTIONS_DEFAULT: 
-- LIBC_CONF_ENABLE_STRONG_STACK_PROTECTOR: ON
-- LIBC_CONF_KEEP_FRAME_POINTER: ON
-- LIBC_CONF_ERRNO_MODE: LIBC_ERRNO_MODE_DEFAULT
-- LIBC_ADD_NULL_CHECKS: ON
-- LIBC_CONF_FREXP_INF_NAN_EXPONENT: 
-- LIBC_CONF_MATH_OPTIMIZATIONS: 0
-- LIBC_CONF_PRINTF_DISABLE_FIXED_POINT: OFF
-- LIBC_CONF_PRINTF_DISABLE_FLOAT: OFF
-- LIBC_CONF_PRINTF_DISABLE_INDEX_MODE: OFF
-- LIBC_CONF_PRINTF_DISABLE_STRERROR: OFF
-- LIBC_CONF_PRINTF_DISABLE_WRITE_INT: OFF
-- LIBC_CONF_PRINTF_FLOAT_TO_STR_NO_SPECIALIZE_LD: OFF
-- LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_DYADIC_FLOAT: OFF
-- LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_FLOAT320: OFF
-- LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE: OFF
-- LIBC_CONF_PRINTF_RUNTIME_DISPATCH: ON
-- LIBC_CONF_RAW_MUTEX_DEFAULT_SPIN_COUNT: 100
-- LIBC_CONF_RWLOCK_DEFAULT_SPIN_COUNT: 100
-- LIBC_CONF_TIMEOUT_ENSURE_MONOTONICITY: ON
-- LIBC_CONF_QSORT_IMPL: LIBC_QSORT_QUICK_SORT
-- LIBC_CONF_SCANF_DISABLE_FLOAT: OFF
-- LIBC_CONF_SCANF_DISABLE_INDEX_MODE: OFF
-- LIBC_CONF_SETJMP_AARCH64_RESTORE_PLATFORM_REGISTER: ON
-- LIBC_CONF_MEMSET_X86_USE_SOFTWARE_PREFETCHING: OFF
-- LIBC_CONF_STRING_UNSAFE_WIDE_READ: OFF
-- LIBC_CONF_TIME_64BIT: OFF
-- Writing config doc to /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/docs/configure.rst
-- Set CPU features: AVX;AVX2;FMA;SSE2;SSE4_2
-- Compiler features available: cfloat128;float128
-- Using getrandom for hashtable randomness
Step 5 (cmake) failure: cmake (failure)
...
  /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/cmake/modules/LLVMLibCObjectRules.cmake:385 (add_target_with_flags)
  /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/setjmp/CMakeLists.txt:42 (add_entrypoint_object)
-- Integration test for hdrgen added.
CMake Error at /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:55 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.setjmp.sigsetjmp".
Call Stack (most recent call first):
  /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:139 (get_all_object_file_deps)
  /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/lib/CMakeLists.txt:22 (add_entrypoint_library)


CMake Error at /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:5 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.setjmp.sigsetjmp".
Call Stack (most recent call first):
  /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:61 (collect_object_file_deps)
  /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:139 (get_all_object_file_deps)
  /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/lib/CMakeLists.txt:22 (add_entrypoint_library)


CMake Error at /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:67 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.setjmp.sigsetjmp".
Call Stack (most recent call first):
  /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:139 (get_all_object_file_deps)
  /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/lib/CMakeLists.txt:22 (add_entrypoint_library)
-- Skipping test for 'libc.src.string.memcmp_x86_64_opt_avx512' insufficient host cpu features 'AVX512BW'
-- Skipping test for 'libc.src.string.memcpy_x86_64_opt_avx512' insufficient host cpu features 'AVX512F'
-- Skipping test for 'libc.src.string.memmove_x86_64_opt_avx512' insufficient host cpu features 'AVX512F'
-- Skipping test for 'libc.src.string.memset_x86_64_opt_avx512' insufficient host cpu features 'AVX512F'
-- Skipping test for 'libc.src.strings.bcmp_x86_64_opt_avx512' insufficient host cpu features 'AVX512BW'
-- Skipping test for 'libc.src.strings.bzero_x86_64_opt_avx512' insufficient host cpu features 'AVX512F'
-- check-runtimes does nothing.
-- Configuring incomplete, errors occurred!
See also "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/CMakeFiles/CMakeOutput.log".
See also "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/CMakeFiles/CMakeError.log".
['cmake', '../llvm-project/runtimes', '-GNinja', '-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_USE_SANITIZER=Address', '-DLLVM_ENABLE_RUNTIMES=libc', '-DLLVM_LIBC_FULL_BUILD=ON'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 176, in step
    yield
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 130, in main
    run_command(['cmake', os.path.join(source_dir, cmake_root)] + cmake_args)
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 191, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '../llvm-project/runtimes', '-GNinja', '-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_USE_SANITIZER=Address', '-DLLVM_ENABLE_RUNTIMES=libc', '-DLLVM_LIBC_FULL_BUILD=ON']' returned non-zero exit status 1.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 19, 2025

LLVM Buildbot has detected a new failure on builder libc-x86_64-debian-fullbuild-dbg running on libc-x86_64-debian-fullbuild while building libc at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/179/builds/24262

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 191, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '../llvm-project/runtimes', '-GNinja', '-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_ENABLE_RUNTIMES=libc;compiler-rt', '-DLLVM_LIBC_INCLUDE_SCUDO=ON', '-DCOMPILER_RT_BUILD_SCUDO_STANDALONE_WITH_LLVM_LIBC=ON', '-DCOMPILER_RT_BUILD_GWP_ASAN=OFF', '-DCOMPILER_RT_SCUDO_STANDALONE_BUILD_SHARED=OFF', '-DLLVM_LIBC_FULL_BUILD=ON']' returned non-zero exit status 1.
@@@STEP_FAILURE@@@
@@@BUILD_STEP build libc@@@
Running: ninja libc
[0/1] Re-running CMake...
-- Performing standalone runtimes build.
-- Could NOT find LLVM (missing: LLVM_DIR)
-- Could NOT find Clang (missing: Clang_DIR)
-- LLVM host triple: x86_64-unknown-linux-gnu
-- LLVM default target triple: x86_64-unknown-linux-gnu
-- Setting LIBC_NAMESPACE namespace to '__llvm_libc_20_0_0_git'
-- Set COMPILER_RESOURCE_DIR to /usr/lib/llvm-14/lib/clang/14.0.6 using --print-resource-dir
-- Building libc for x86_64 on linux with
        LIBC_COMPILE_OPTIONS_DEFAULT: 
-- LIBC_CONF_ENABLE_STRONG_STACK_PROTECTOR: ON
-- LIBC_CONF_KEEP_FRAME_POINTER: ON
-- LIBC_CONF_ERRNO_MODE: LIBC_ERRNO_MODE_DEFAULT
-- LIBC_ADD_NULL_CHECKS: ON
-- LIBC_CONF_FREXP_INF_NAN_EXPONENT: 
-- LIBC_CONF_MATH_OPTIMIZATIONS: 0
-- LIBC_CONF_PRINTF_DISABLE_FIXED_POINT: OFF
-- LIBC_CONF_PRINTF_DISABLE_FLOAT: OFF
-- LIBC_CONF_PRINTF_DISABLE_INDEX_MODE: OFF
-- LIBC_CONF_PRINTF_DISABLE_STRERROR: OFF
-- LIBC_CONF_PRINTF_DISABLE_WRITE_INT: OFF
-- LIBC_CONF_PRINTF_FLOAT_TO_STR_NO_SPECIALIZE_LD: OFF
-- LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_DYADIC_FLOAT: OFF
-- LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_FLOAT320: OFF
-- LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE: OFF
-- LIBC_CONF_PRINTF_RUNTIME_DISPATCH: ON
-- LIBC_CONF_RAW_MUTEX_DEFAULT_SPIN_COUNT: 100
-- LIBC_CONF_RWLOCK_DEFAULT_SPIN_COUNT: 100
-- LIBC_CONF_TIMEOUT_ENSURE_MONOTONICITY: ON
-- LIBC_CONF_QSORT_IMPL: LIBC_QSORT_QUICK_SORT
-- LIBC_CONF_SCANF_DISABLE_FLOAT: OFF
-- LIBC_CONF_SCANF_DISABLE_INDEX_MODE: OFF
-- LIBC_CONF_SETJMP_AARCH64_RESTORE_PLATFORM_REGISTER: ON
-- LIBC_CONF_MEMSET_X86_USE_SOFTWARE_PREFETCHING: OFF
-- LIBC_CONF_STRING_UNSAFE_WIDE_READ: OFF
-- LIBC_CONF_TIME_64BIT: OFF
-- Writing config doc to /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/docs/configure.rst
-- Set CPU features: AVX;AVX2;FMA;SSE2;SSE4_2
-- Compiler features available: builtin_fmax_fmin;cfloat128;float128
-- Using getrandom for hashtable randomness
Step 5 (cmake) failure: cmake (failure)
...

CMake Error at /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:5 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.setjmp.sigsetjmp".
Call Stack (most recent call first):
  /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:61 (collect_object_file_deps)
  /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:139 (get_all_object_file_deps)
  /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/lib/CMakeLists.txt:22 (add_entrypoint_library)


CMake Error at /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:67 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.setjmp.sigsetjmp".
Call Stack (most recent call first):
  /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:139 (get_all_object_file_deps)
  /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/lib/CMakeLists.txt:22 (add_entrypoint_library)
-- Skipping test for 'libc.src.string.memcmp_x86_64_opt_avx512' insufficient host cpu features 'AVX512BW'
-- Skipping test for 'libc.src.string.memcpy_x86_64_opt_avx512' insufficient host cpu features 'AVX512F'
-- Skipping test for 'libc.src.string.memmove_x86_64_opt_avx512' insufficient host cpu features 'AVX512F'
-- Skipping test for 'libc.src.string.memset_x86_64_opt_avx512' insufficient host cpu features 'AVX512F'
-- Skipping test for 'libc.src.strings.bcmp_x86_64_opt_avx512' insufficient host cpu features 'AVX512BW'
-- Skipping test for 'libc.src.strings.bzero_x86_64_opt_avx512' insufficient host cpu features 'AVX512F'
-- Compiler-RT supported architectures: x86_64
-- Builtin supported architectures: x86_64
-- Performing additional configure checks with target flags:  --start-no-unused-arguments --unwindlib=none --end-no-unused-arguments -nostdlib++ -nostdinc++ -nodefaultlibs -Werror=array-bounds -Werror=uninitialized -Werror=shadow -Werror=empty-body -Werror=sizeof-pointer-memaccess -Werror=sizeof-array-argument -Werror=suspicious-memaccess -Werror=builtin-memcpy-chk-size -Werror=array-bounds-pointer-arithmetic -Werror=return-stack-address -Werror=sizeof-array-decay -Werror=format-insufficient-args -Wformat -std=c11 -fPIC -fno-builtin -fvisibility=hidden -fomit-frame-pointer -m64
-- For x86_64 builtins preferring i386/fp_mode.c to fp_mode.c
-- For x86_64 builtins preferring x86_64/floatdidf.c to floatdidf.c
-- For x86_64 builtins preferring x86_64/floatdisf.c to floatdisf.c
-- For x86_64 builtins preferring x86_64/floatundidf.S to floatundidf.c
-- For x86_64 builtins preferring x86_64/floatundisf.S to floatundisf.c
-- For x86_64 builtins preferring x86_64/floatdixf.c to floatdixf.c
-- For x86_64 builtins preferring x86_64/floatundixf.S to floatundixf.c
-- check-runtimes does nothing.
-- Configuring incomplete, errors occurred!
See also "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/CMakeFiles/CMakeOutput.log".
See also "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/CMakeFiles/CMakeError.log".
['cmake', '../llvm-project/runtimes', '-GNinja', '-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_ENABLE_RUNTIMES=libc;compiler-rt', '-DLLVM_LIBC_INCLUDE_SCUDO=ON', '-DCOMPILER_RT_BUILD_SCUDO_STANDALONE_WITH_LLVM_LIBC=ON', '-DCOMPILER_RT_BUILD_GWP_ASAN=OFF', '-DCOMPILER_RT_SCUDO_STANDALONE_BUILD_SHARED=OFF', '-DLLVM_LIBC_FULL_BUILD=ON'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 176, in step
    yield
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 130, in main
    run_command(['cmake', os.path.join(source_dir, cmake_root)] + cmake_args)
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 191, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '../llvm-project/runtimes', '-GNinja', '-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_ENABLE_RUNTIMES=libc;compiler-rt', '-DLLVM_LIBC_INCLUDE_SCUDO=ON', '-DCOMPILER_RT_BUILD_SCUDO_STANDALONE_WITH_LLVM_LIBC=ON', '-DCOMPILER_RT_BUILD_GWP_ASAN=OFF', '-DCOMPILER_RT_SCUDO_STANDALONE_BUILD_SHARED=OFF', '-DLLVM_LIBC_FULL_BUILD=ON']' returned non-zero exit status 1.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 19, 2025

LLVM Buildbot has detected a new failure on builder libc-x86_64-debian-gcc-fullbuild-dbg running on libc-x86_64-debian-fullbuild while building libc at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/131/builds/24343

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '../llvm-project/runtimes', '-GNinja', '-DCMAKE_C_COMPILER=gcc', '-DCMAKE_CXX_COMPILER=g++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_ENABLE_RUNTIMES=libc;compiler-rt', '-DLLVM_LIBC_INCLUDE_SCUDO=ON', '-DCOMPILER_RT_BUILD_SCUDO_STANDALONE_WITH_LLVM_LIBC=ON', '-DCOMPILER_RT_BUILD_GWP_ASAN=OFF', '-DCOMPILER_RT_SCUDO_STANDALONE_BUILD_SHARED=OFF', '-DLLVM_LIBC_FULL_BUILD=ON']' returned non-zero exit status 1.
@@@STEP_FAILURE@@@
@@@BUILD_STEP build libc@@@
Running: ninja libc
[0/1] Re-running CMake...
-- Performing standalone runtimes build.
-- Could NOT find LLVM (missing: LLVM_DIR)
-- Could NOT find Clang (missing: Clang_DIR)
-- LLVM host triple: x86_64-unknown-linux-gnu
-- LLVM default target triple: x86_64-unknown-linux-gnu
-- Setting LIBC_NAMESPACE namespace to '__llvm_libc_20_0_0_git'
g++: error: unrecognized command-line option ‘--print-resource-dir’; did you mean ‘--print-search-dirs’?
g++: fatal error: no input files
compilation terminated.
-- Set COMPILER_RESOURCE_DIR to /usr/lib/gcc/x86_64-linux-gnu/12/ using --print-search-dirs
-- Building libc for x86_64 on linux with
        LIBC_COMPILE_OPTIONS_DEFAULT: 
-- LIBC_CONF_ENABLE_STRONG_STACK_PROTECTOR: ON
-- LIBC_CONF_KEEP_FRAME_POINTER: ON
-- LIBC_CONF_ERRNO_MODE: LIBC_ERRNO_MODE_DEFAULT
-- LIBC_ADD_NULL_CHECKS: ON
-- LIBC_CONF_FREXP_INF_NAN_EXPONENT: 
-- LIBC_CONF_MATH_OPTIMIZATIONS: 0
-- LIBC_CONF_PRINTF_DISABLE_FIXED_POINT: OFF
-- LIBC_CONF_PRINTF_DISABLE_FLOAT: OFF
-- LIBC_CONF_PRINTF_DISABLE_INDEX_MODE: OFF
-- LIBC_CONF_PRINTF_DISABLE_STRERROR: OFF
-- LIBC_CONF_PRINTF_DISABLE_WRITE_INT: OFF
-- LIBC_CONF_PRINTF_FLOAT_TO_STR_NO_SPECIALIZE_LD: OFF
-- LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_DYADIC_FLOAT: OFF
-- LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_FLOAT320: OFF
-- LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE: OFF
-- LIBC_CONF_PRINTF_RUNTIME_DISPATCH: ON
-- LIBC_CONF_RAW_MUTEX_DEFAULT_SPIN_COUNT: 100
-- LIBC_CONF_RWLOCK_DEFAULT_SPIN_COUNT: 100
-- LIBC_CONF_TIMEOUT_ENSURE_MONOTONICITY: ON
-- LIBC_CONF_QSORT_IMPL: LIBC_QSORT_QUICK_SORT
-- LIBC_CONF_SCANF_DISABLE_FLOAT: OFF
-- LIBC_CONF_SCANF_DISABLE_INDEX_MODE: OFF
-- LIBC_CONF_SETJMP_AARCH64_RESTORE_PLATFORM_REGISTER: ON
-- LIBC_CONF_MEMSET_X86_USE_SOFTWARE_PREFETCHING: OFF
-- LIBC_CONF_STRING_UNSAFE_WIDE_READ: OFF
-- LIBC_CONF_TIME_64BIT: OFF
-- Writing config doc to /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/docs/configure.rst
-- Set CPU features: AVX;AVX2;FMA;SSE2;SSE4_2
-- Compiler features available: builtin_ceil_floor_rint_trunc;float128
-- Using getrandom for hashtable randomness
Step 5 (cmake) failure: cmake (failure)
...

CMake Error at /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:5 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.setjmp.sigsetjmp".
Call Stack (most recent call first):
  /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:61 (collect_object_file_deps)
  /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:139 (get_all_object_file_deps)
  /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/lib/CMakeLists.txt:22 (add_entrypoint_library)


CMake Error at /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:67 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.setjmp.sigsetjmp".
Call Stack (most recent call first):
  /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:139 (get_all_object_file_deps)
  /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/lib/CMakeLists.txt:22 (add_entrypoint_library)
-- Skipping test for 'libc.src.string.memcmp_x86_64_opt_avx512' insufficient host cpu features 'AVX512BW'
-- Skipping test for 'libc.src.string.memcpy_x86_64_opt_avx512' insufficient host cpu features 'AVX512F'
-- Skipping test for 'libc.src.string.memmove_x86_64_opt_avx512' insufficient host cpu features 'AVX512F'
-- Skipping test for 'libc.src.string.memset_x86_64_opt_avx512' insufficient host cpu features 'AVX512F'
-- Skipping test for 'libc.src.strings.bcmp_x86_64_opt_avx512' insufficient host cpu features 'AVX512BW'
-- Skipping test for 'libc.src.strings.bzero_x86_64_opt_avx512' insufficient host cpu features 'AVX512F'
-- Compiler-RT supported architectures: x86_64
-- Builtin supported architectures: x86_64
-- Performing additional configure checks with target flags:  -nostdinc++ -Werror=array-bounds -Werror=uninitialized -Werror=shadow -Werror=empty-body -Werror=sizeof-pointer-memaccess -Werror=sizeof-array-argument -Wformat -Werror=builtin-declaration-mismatch -fPIC -fno-builtin -fvisibility=hidden -m64
-- For x86_64 builtins preferring i386/fp_mode.c to fp_mode.c
-- For x86_64 builtins preferring x86_64/floatdidf.c to floatdidf.c
-- For x86_64 builtins preferring x86_64/floatdisf.c to floatdisf.c
-- For x86_64 builtins preferring x86_64/floatundidf.S to floatundidf.c
-- For x86_64 builtins preferring x86_64/floatundisf.S to floatundisf.c
-- For x86_64 builtins preferring x86_64/floatdixf.c to floatdixf.c
-- For x86_64 builtins preferring x86_64/floatundixf.S to floatundixf.c
-- check-runtimes does nothing.
-- Configuring incomplete, errors occurred!
See also "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/CMakeFiles/CMakeOutput.log".
See also "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/CMakeFiles/CMakeError.log".
['cmake', '../llvm-project/runtimes', '-GNinja', '-DCMAKE_C_COMPILER=gcc', '-DCMAKE_CXX_COMPILER=g++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_ENABLE_RUNTIMES=libc;compiler-rt', '-DLLVM_LIBC_INCLUDE_SCUDO=ON', '-DCOMPILER_RT_BUILD_SCUDO_STANDALONE_WITH_LLVM_LIBC=ON', '-DCOMPILER_RT_BUILD_GWP_ASAN=OFF', '-DCOMPILER_RT_SCUDO_STANDALONE_BUILD_SHARED=OFF', '-DLLVM_LIBC_FULL_BUILD=ON'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 176, in step
    yield
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 130, in main
    run_command(['cmake', os.path.join(source_dir, cmake_root)] + cmake_args)
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 191, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '../llvm-project/runtimes', '-GNinja', '-DCMAKE_C_COMPILER=gcc', '-DCMAKE_CXX_COMPILER=g++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_ENABLE_RUNTIMES=libc;compiler-rt', '-DLLVM_LIBC_INCLUDE_SCUDO=ON', '-DCOMPILER_RT_BUILD_SCUDO_STANDALONE_WITH_LLVM_LIBC=ON', '-DCOMPILER_RT_BUILD_GWP_ASAN=OFF', '-DCOMPILER_RT_SCUDO_STANDALONE_BUILD_SHARED=OFF', '-DLLVM_LIBC_FULL_BUILD=ON']' returned non-zero exit status 1.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 19, 2025

LLVM Buildbot has detected a new failure on builder libc-riscv64-debian-fullbuild-dbg running on libc-riscv64-debian while building libc at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/183/builds/14899

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...


CMake Error at /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:5 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.setjmp.sigsetjmp".
Call Stack (most recent call first):
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:61 (collect_object_file_deps)
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:139 (get_all_object_file_deps)
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/lib/CMakeLists.txt:22 (add_entrypoint_library)


CMake Error at /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:67 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.setjmp.sigsetjmp".
Call Stack (most recent call first):
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:139 (get_all_object_file_deps)
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/lib/CMakeLists.txt:22 (add_entrypoint_library)


-- check-runtimes does nothing.
-- Configuring incomplete, errors occurred!
See also "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/CMakeFiles/CMakeOutput.log".
See also "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/CMakeFiles/CMakeError.log".
['cmake', '../llvm-project/runtimes', '-GNinja', '-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_ENABLE_RUNTIMES=libc', '-DLLVM_LIBC_FULL_BUILD=ON'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 176, in step
    yield
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 130, in main
    run_command(['cmake', os.path.join(source_dir, cmake_root)] + cmake_args)
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 191, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '../llvm-project/runtimes', '-GNinja', '-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_ENABLE_RUNTIMES=libc', '-DLLVM_LIBC_FULL_BUILD=ON']' returned non-zero exit status 1.
@@@STEP_FAILURE@@@
@@@BUILD_STEP build libc@@@
Running: ninja libc
[0/1] Re-running CMake...
-- Performing standalone runtimes build.
-- Could NOT find LLVM (missing: LLVM_DIR)
-- Could NOT find Clang (missing: Clang_DIR)
-- LLVM host triple: riscv64-unknown-linux-gnu
-- LLVM default target triple: riscv64-unknown-linux-gnu
-- Setting LIBC_NAMESPACE namespace to '__llvm_libc_20_0_0_git'
-- Set COMPILER_RESOURCE_DIR to /usr/lib/llvm-13/lib/clang/13.0.1 using --print-resource-dir
-- Building libc for riscv on linux with
        LIBC_COMPILE_OPTIONS_DEFAULT: 
Step 5 (cmake) failure: cmake (failure)
...
  libc.src.setjmp.sigsetjmp missing; Target libc.src.setjmp.sigsetjmp will be
  ignored.
Call Stack (most recent call first):
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCFlagRules.cmake:158 (create_entrypoint_object)
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCFlagRules.cmake:158 (cmake_language)
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCFlagRules.cmake:251 (expand_flags_for_target)
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCObjectRules.cmake:385 (add_target_with_flags)
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/setjmp/CMakeLists.txt:42 (add_entrypoint_object)
-- Integration test for hdrgen added.
CMake Error at /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:55 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.setjmp.sigsetjmp".
Call Stack (most recent call first):
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:139 (get_all_object_file_deps)
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/lib/CMakeLists.txt:22 (add_entrypoint_library)


CMake Error at /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:5 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.setjmp.sigsetjmp".
Call Stack (most recent call first):
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:61 (collect_object_file_deps)
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:139 (get_all_object_file_deps)
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/lib/CMakeLists.txt:22 (add_entrypoint_library)


CMake Error at /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:67 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.setjmp.sigsetjmp".
Call Stack (most recent call first):
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:139 (get_all_object_file_deps)
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/lib/CMakeLists.txt:22 (add_entrypoint_library)
-- check-runtimes does nothing.
-- Configuring incomplete, errors occurred!
See also "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/CMakeFiles/CMakeOutput.log".
See also "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/CMakeFiles/CMakeError.log".
['cmake', '../llvm-project/runtimes', '-GNinja', '-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_ENABLE_RUNTIMES=libc', '-DLLVM_LIBC_FULL_BUILD=ON'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 176, in step
    yield
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 130, in main
    run_command(['cmake', os.path.join(source_dir, cmake_root)] + cmake_args)
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 191, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-zorg/zorg/buildbot/builders/annotated/util.py", line 49, in report_run_cmd
    subprocess.check_call(cmd, shell=shell, *args, **kwargs)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '../llvm-project/runtimes', '-GNinja', '-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_ENABLE_RUNTIMES=libc', '-DLLVM_LIBC_FULL_BUILD=ON']' returned non-zero exit status 1.

SchrodingerZhu pushed a commit that referenced this pull request Jun 19, 2025
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants