Skip to content
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

[libc] Define (stub) dl_iterate_phdr #131436

Merged
merged 2 commits into from
Mar 18, 2025
Merged

Conversation

frobtech
Copy link
Contributor

This fleshes out the <link.h> a little more, including the
struct dl_phdr_info type and declaring the dl_iterate_phdr
function. There is only a no-op implementation without tests, as
for the existing dlfcn functions.

This fleshes out the <link.h> a little more, including the
`struct dl_phdr_info` type and declaring the dl_iterate_phdr
function.  There is only a no-op implementation without tests, as
for the existing dlfcn functions.
@frobtech frobtech requested review from petrhosek and Caslyn March 15, 2025 07:58
@frobtech frobtech marked this pull request as ready for review March 15, 2025 07:58
@llvmbot llvmbot added the libc label Mar 15, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 15, 2025

@llvm/pr-subscribers-libc

Author: Roland McGrath (frobtech)

Changes

This fleshes out the <link.h> a little more, including the
struct dl_phdr_info type and declaring the dl_iterate_phdr
function. There is only a no-op implementation without tests, as
for the existing dlfcn functions.


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

15 Files Affected:

  • (modified) libc/config/linux/aarch64/entrypoints.txt (+3)
  • (modified) libc/config/linux/riscv/entrypoints.txt (+3)
  • (modified) libc/config/linux/x86_64/entrypoints.txt (+3)
  • (modified) libc/hdr/types/CMakeLists.txt (+8)
  • (added) libc/hdr/types/struct_dl_phdr_info.h (+21)
  • (modified) libc/include/CMakeLists.txt (+2)
  • (removed) libc/include/link.h.def (-17)
  • (modified) libc/include/link.yaml (+18-7)
  • (modified) libc/include/llvm-libc-types/CMakeLists.txt (+2)
  • (added) libc/include/llvm-libc-types/__dl_iterate_phdr_callback_t.h (+19)
  • (added) libc/include/llvm-libc-types/struct_dl_phdr_info.h (+30)
  • (modified) libc/src/CMakeLists.txt (+2-1)
  • (added) libc/src/link/dl_iterate_phdr.cpp (+25)
  • (added) libc/src/link/dl_iterate_phdr.h (+22)
  • (modified) libc/utils/hdrgen/hdrgen/header.py (+1)
diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index ab1917259519b..6d42fda5b5f49 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -842,6 +842,9 @@ if(LLVM_LIBC_FULL_BUILD)
     libc.src.arpa.inet.ntohl
     libc.src.arpa.inet.ntohs
 
+    # link.h entrypoints
+    libc.src.link.dl_iterate_phdr
+
     # pthread.h entrypoints
     libc.src.pthread.pthread_atfork
     libc.src.pthread.pthread_attr_destroy
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index 4b69e43bce37d..75e845925e691 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -795,6 +795,9 @@ if(LLVM_LIBC_FULL_BUILD)
     libc.src.arpa.inet.ntohl
     libc.src.arpa.inet.ntohs
 
+    # link.h entrypoints
+    libc.src.link.dl_iterate_phdr
+
     # pthread.h entrypoints
     libc.src.pthread.pthread_atfork
     libc.src.pthread.pthread_attr_destroy
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index a29478898fe70..bb3c30157b0ce 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -960,6 +960,9 @@ if(LLVM_LIBC_FULL_BUILD)
     libc.src.arpa.inet.ntohl
     libc.src.arpa.inet.ntohs
 
+    # link.h entrypoints
+    libc.src.link.dl_iterate_phdr
+
     # pthread.h entrypoints
     libc.src.pthread.pthread_atfork
     libc.src.pthread.pthread_attr_destroy
diff --git a/libc/hdr/types/CMakeLists.txt b/libc/hdr/types/CMakeLists.txt
index 84a2647ba664d..5aa7b868c5e75 100644
--- a/libc/hdr/types/CMakeLists.txt
+++ b/libc/hdr/types/CMakeLists.txt
@@ -9,6 +9,14 @@ add_proxy_header_library(
     libc.include.stdlib
 )
 
+add_proxy_header_library(
+  struct_dl_phdr_info
+  HDRS
+    struct_dl_phdr_info.h
+  FULL_BUILD_DEPENDS
+    libc.include.llvm-libc-types.struct_dl_phdr_info
+)
+
 add_proxy_header_library(
   ldiv_t
   HDRS
diff --git a/libc/hdr/types/struct_dl_phdr_info.h b/libc/hdr/types/struct_dl_phdr_info.h
new file mode 100644
index 0000000000000..0cfb3c1309bde
--- /dev/null
+++ b/libc/hdr/types/struct_dl_phdr_info.h
@@ -0,0 +1,21 @@
+//===-- Proxy for struct dl_phdr_info  -----------------------------------===//
+//
+// 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
+//
+//===---------------------------------------------------------------------===//
+#ifndef LLVM_LIBC_HDR_TYPES_STRUCT_DL_PHDR_INFO_H
+#define LLVM_LIBC_HDR_TYPES_STRUCT_DL_PHDR_INFO_H
+
+#ifdef LIBC_FULL_BUILD
+
+#include "include/llvm-libc-types/struct_dl_phdr_info.h"
+
+#else
+
+#include <link.h>
+
+#endif // LIBC_FULL_BUILD
+
+#endif // LLVM_LIBC_HDR_TYPES_STRUCT_DL_PHDR_INFO_H
diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt
index 34f7c78b9783e..409737762ac41 100644
--- a/libc/include/CMakeLists.txt
+++ b/libc/include/CMakeLists.txt
@@ -431,6 +431,8 @@ add_header_macro(
   DEPENDS
     .llvm_libc_common_h
     .llvm-libc-macros.link_macros
+    .llvm-libc-types.struct_dl_phdr_info
+    .llvm-libc-types.__dl_iterate_phdr_callback_t
 )
 
 add_header_macro(
diff --git a/libc/include/link.h.def b/libc/include/link.h.def
deleted file mode 100644
index ebab81c841b8d..0000000000000
--- a/libc/include/link.h.def
+++ /dev/null
@@ -1,17 +0,0 @@
-//===-- GNU header link.h -------------------------------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIBC_LINK_H
-#define LLVM_LIBC_LINK_H
-
-#include "__llvm-libc-common.h"
-#include "llvm-libc-macros/link-macros.h"
-
-%%public_api()
-
-#endif // LLVM_LIBC_LINK_H
diff --git a/libc/include/link.yaml b/libc/include/link.yaml
index 1cd609e292b53..7e303a4436d83 100644
--- a/libc/include/link.yaml
+++ b/libc/include/link.yaml
@@ -1,9 +1,20 @@
 header: link.h
-header_template: link.h.def
 standards:
-  - Linux
-macros: []
-types: []
-enums: []
-objects: []
-functions: []
+  - svid
+macros:
+  - macro_name: ElfW
+    standards:
+      - gnu
+    macro_header: link-macros.h
+types:
+  - type_name: struct_dl_phdr_info
+    standards:
+      - gnu
+functions:
+  - name: dl_iterate_phdr
+    standards:
+      - gnu
+    return_type: int
+    arguments:
+      - type: __dl_iterate_phdr_callback_t
+      - type: void *
diff --git a/libc/include/llvm-libc-types/CMakeLists.txt b/libc/include/llvm-libc-types/CMakeLists.txt
index 58761ac97d7cf..bf8bdfe89943c 100644
--- a/libc/include/llvm-libc-types/CMakeLists.txt
+++ b/libc/include/llvm-libc-types/CMakeLists.txt
@@ -5,6 +5,7 @@ add_header(__atfork_callback_t HDR __atfork_callback_t.h)
 add_header(__bsearchcompare_t HDR __bsearchcompare_t.h)
 add_header(__lsearchcompare_t HDR __lsearchcompare_t.h)
 add_header(__call_once_func_t HDR __call_once_func_t.h)
+add_header(__dl_iterate_phdr_callback_t HDR __dl_iterate_phdr_callback_t.h DEPENDS .size_t)
 add_header(__exec_argv_t HDR __exec_argv_t.h)
 add_header(__exec_envp_t HDR __exec_envp_t.h)
 add_header(__futex_word HDR __futex_word.h)
@@ -69,6 +70,7 @@ add_header(sighandler_t HDR sighandler_t.h)
 add_header(stack_t HDR stack_t.h DEPENDS .size_t)
 add_header(suseconds_t HDR suseconds_t.h)
 add_header(struct_dirent HDR struct_dirent.h DEPENDS .ino_t .off_t)
+add_header(struct_dl_phdr_info HDR struct_dl_phdr_info.h DEPENDS .size_t libc.include.llvm-libc-macros.link_macros)
 add_header(struct_f_owner_ex HDR struct_f_owner_ex.h DEPENDS .pid_t)
 add_header(struct_flock HDR struct_flock.h DEPENDS .off_t .pid_t)
 add_header(struct_flock64 HDR struct_flock64.h DEPENDS .off64_t .pid_t)
diff --git a/libc/include/llvm-libc-types/__dl_iterate_phdr_callback_t.h b/libc/include/llvm-libc-types/__dl_iterate_phdr_callback_t.h
new file mode 100644
index 0000000000000..52078daf7d3ce
--- /dev/null
+++ b/libc/include/llvm-libc-types/__dl_iterate_phdr_callback_t.h
@@ -0,0 +1,19 @@
+//===-- Definition of type __dl_iterate_phdr_callback_t ------------------===//
+//
+// 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
+//
+//===---------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_TYPES___DL_ITERATE_PHDR_CALLBACK_T_H
+#define LLVM_LIBC_TYPES___DL_ITERATE_PHDR_CALLBACK_T_H
+
+#include "size_t.h"
+
+struct dl_phdr_info;
+
+typedef int (*__dl_iterate_phdr_callback_t)(struct dl_phdr_info *, size_t,
+                                            void *);
+
+#endif // LLVM_LIBC_TYPES___DL_ITERATE_PHDR_CALLBACK_T_H
diff --git a/libc/include/llvm-libc-types/struct_dl_phdr_info.h b/libc/include/llvm-libc-types/struct_dl_phdr_info.h
new file mode 100644
index 0000000000000..2b9a5d21b4a13
--- /dev/null
+++ b/libc/include/llvm-libc-types/struct_dl_phdr_info.h
@@ -0,0 +1,30 @@
+//===-- Definition of type struct dl_phdr_info ---------------------------===//
+//
+// 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
+//
+//===---------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_TYPES_STRUCT_DL_PHDR_INFO_H
+#define LLVM_LIBC_TYPES_STRUCT_DL_PHDR_INFO_H
+
+#include "../llvm-libc-macros/link-macros.h"
+#include "size_t.h"
+#include <elf.h>
+#include <stdint.h>
+
+struct dl_phdr_info {
+  ElfW(Addr) dlpi_addr;
+  const char *dlpi_name;
+  const ElfW(Phdr) * dlpi_phdr;
+  ElfW(Half) dlpi_phnum;
+
+  uint64_t dlpi_adds;
+  uint64_t dlpi_subs;
+
+  size_t dlpi_tls_modid;
+  void *dlpi_tls_data;
+};
+
+#endif // LLVM_LIBC_TYPES_STRUCT_DL_PHDR_INFO_H
diff --git a/libc/src/CMakeLists.txt b/libc/src/CMakeLists.txt
index 19a354ceee4b6..a665253c4cc03 100644
--- a/libc/src/CMakeLists.txt
+++ b/libc/src/CMakeLists.txt
@@ -6,6 +6,7 @@ add_subdirectory(dlfcn)
 add_subdirectory(errno)
 add_subdirectory(fenv)
 add_subdirectory(inttypes)
+add_subdirectory(link)
 add_subdirectory(math)
 add_subdirectory(stdbit)
 add_subdirectory(stdfix)
@@ -13,9 +14,9 @@ add_subdirectory(stdio)
 add_subdirectory(stdlib)
 add_subdirectory(string)
 add_subdirectory(strings)
-add_subdirectory(wchar)
 add_subdirectory(time)
 add_subdirectory(unistd)
+add_subdirectory(wchar)
 
 if(${LIBC_TARGET_OS} STREQUAL "linux")
   add_subdirectory(dirent)
diff --git a/libc/src/link/dl_iterate_phdr.cpp b/libc/src/link/dl_iterate_phdr.cpp
new file mode 100644
index 0000000000000..7964411598d4a
--- /dev/null
+++ b/libc/src/link/dl_iterate_phdr.cpp
@@ -0,0 +1,25 @@
+//===-- Implementation of dl_iterate_phdr --------------------------------===//
+//
+// 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 "dl_iterate_phdr.h"
+
+#include "src/__support/common.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+LLVM_LIBC_FUNCTION(int, dl_iterate_phdr,
+                   (__dl_iterate_phdr_callback_t callback, void *arg)) {
+  // FIXME: For pure static linking, this can report just the executable with
+  // info from __ehdr_start or AT_{PHDR,PHNUM} decoding, and its PT_TLS; and it
+  // could report the vDSO.
+  (void)callback, (void)arg;
+  return 0;
+}
+
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/link/dl_iterate_phdr.h b/libc/src/link/dl_iterate_phdr.h
new file mode 100644
index 0000000000000..2d75e7122bc3e
--- /dev/null
+++ b/libc/src/link/dl_iterate_phdr.h
@@ -0,0 +1,22 @@
+//===-- Implementation header of dl_iterate_phdr ---------------*- C++ -*-===//
+//
+// 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
+//
+//===---------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC_DLFCN_DL_ITERATE_PHDR_H
+#define LLVM_LIBC_SRC_DLFCN_DL_ITERATE_PHDR_H
+
+#include "hdr/types/struct_dl_phdr_info.h"
+#include "include/llvm-libc-types/__dl_iterate_phdr_callback_t.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+int dl_iterate_phdr(__dl_iterate_phdr_callback_t, void *);
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC_DLFCN_DL_ITERATE_PHDR_H
diff --git a/libc/utils/hdrgen/hdrgen/header.py b/libc/utils/hdrgen/hdrgen/header.py
index 78444ed377be1..b054ed4e03bd0 100644
--- a/libc/utils/hdrgen/hdrgen/header.py
+++ b/libc/utils/hdrgen/hdrgen/header.py
@@ -44,6 +44,7 @@
     "gnu": "GNU",
     "linux": "Linux",
     "uefi": "UEFI",
+    "svid": "SVID",
 }
 
 HEADER_TEMPLATE = """\

@frobtech frobtech merged commit 123c004 into llvm:main Mar 18, 2025
16 checks passed
@frobtech frobtech deleted the p/libc-dl_iterate_phdr branch March 18, 2025 18:38
@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 18, 2025

LLVM Buildbot has detected a new failure on builder openmp-offload-amdgpu-runtime-2 running on rocm-worker-hw-02 while building libc at step 6 "test-openmp".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-openmp) failure: test (failure)
******************** TEST 'libarcher :: races/taskwait-depend.c' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 14
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/./bin/clang -fopenmp  -gdwarf-4 -O1 -fsanitize=thread  -I /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/openmp/tools/archer/tests -I /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -L /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -Wl,-rpath,/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/runtime/src   /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/openmp/tools/archer/tests/races/taskwait-depend.c -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/tools/archer/tests/races/Output/taskwait-depend.c.tmp -latomic && env TSAN_OPTIONS='ignore_noninstrumented_modules=0:ignore_noninstrumented_modules=1' /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/openmp/tools/archer/tests/deflake.bash /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/tools/archer/tests/races/Output/taskwait-depend.c.tmp 2>&1 | tee /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/tools/archer/tests/races/Output/taskwait-depend.c.tmp.log | /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/./bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/openmp/tools/archer/tests/races/taskwait-depend.c
# executed command: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/./bin/clang -fopenmp -gdwarf-4 -O1 -fsanitize=thread -I /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/openmp/tools/archer/tests -I /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -L /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -Wl,-rpath,/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/runtime/src /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/openmp/tools/archer/tests/races/taskwait-depend.c -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/tools/archer/tests/races/Output/taskwait-depend.c.tmp -latomic
# note: command had no output on stdout or stderr
# executed command: env TSAN_OPTIONS=ignore_noninstrumented_modules=0:ignore_noninstrumented_modules=1 /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/openmp/tools/archer/tests/deflake.bash /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/tools/archer/tests/races/Output/taskwait-depend.c.tmp
# note: command had no output on stdout or stderr
# executed command: tee /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/tools/archer/tests/races/Output/taskwait-depend.c.tmp.log
# note: command had no output on stdout or stderr
# executed command: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/./bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/openmp/tools/archer/tests/races/taskwait-depend.c
# note: command had no output on stdout or stderr
# RUN: at line 15
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/./bin/clang -fopenmp  -gdwarf-4 -O1 -fsanitize=thread  -I /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/openmp/tools/archer/tests -I /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -L /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -Wl,-rpath,/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/runtime/src   /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/openmp/tools/archer/tests/races/taskwait-depend.c -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/tools/archer/tests/races/Output/taskwait-depend.c.tmp -latomic && env ARCHER_OPTIONS="ignore_serial=1 report_data_leak=1" env TSAN_OPTIONS='ignore_noninstrumented_modules=0:ignore_noninstrumented_modules=1' /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/openmp/tools/archer/tests/deflake.bash /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/tools/archer/tests/races/Output/taskwait-depend.c.tmp 2>&1 | tee /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/tools/archer/tests/races/Output/taskwait-depend.c.tmp.log | /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/./bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/openmp/tools/archer/tests/races/taskwait-depend.c
# executed command: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/./bin/clang -fopenmp -gdwarf-4 -O1 -fsanitize=thread -I /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/openmp/tools/archer/tests -I /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -L /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -Wl,-rpath,/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/runtime/src /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/openmp/tools/archer/tests/races/taskwait-depend.c -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/tools/archer/tests/races/Output/taskwait-depend.c.tmp -latomic
# note: command had no output on stdout or stderr
# executed command: env 'ARCHER_OPTIONS=ignore_serial=1 report_data_leak=1' env TSAN_OPTIONS=ignore_noninstrumented_modules=0:ignore_noninstrumented_modules=1 /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/openmp/tools/archer/tests/deflake.bash /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/tools/archer/tests/races/Output/taskwait-depend.c.tmp
# note: command had no output on stdout or stderr
# executed command: tee /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-bins/openmp/tools/archer/tests/races/Output/taskwait-depend.c.tmp.log
# note: command had no output on stdout or stderr
# executed command: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/./bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/openmp/tools/archer/tests/races/taskwait-depend.c
# .---command stderr------------
# | /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/openmp/tools/archer/tests/races/taskwait-depend.c:56:16: error: CHECK-NEXT: is not on the line after the previous match
# | // CHECK-NEXT: #0 {{.*}}taskwait-depend.c:42
# |                ^
# | <stdin>:14:2: note: 'next' match was here
# |  #0 foo /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/openmp/tools/archer/tests/races/taskwait-depend.c:42:20 (taskwait-depend.c.tmp+0x125ff3)
# |  ^
# | <stdin>:4:17: note: previous match ended here
# |  Write of size 4 at 0x7fffdc5d907c by thread T1:
# |                 ^
# | <stdin>:5:1: note: non-matching line after previous match is here
# |  #0 .omp_outlined..1 /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/openmp/tools/archer/tests/races/taskwait-depend.c:35:6 (taskwait-depend.c.tmp+0x1260da)
# | ^
# | 
# | Input file: <stdin>
# | Check file: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/openmp/tools/archer/tests/races/taskwait-depend.c
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |          .
# |          .
# |          .
# |          9:  #4 main.omp_outlined /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/openmp/tools/archer/tests/races/taskwait-depend.c:47:1 (taskwait-depend.c.tmp+0x12618a) 
# |         10:  #5 __kmp_invoke_microtask <null> (libomp.so+0xea498) 
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 18, 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/11167

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)
...
[46/74] Generating header sys/utsname.h from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/runtimes/../libc/include/sys/utsname.yaml
[47/73] Generating header sys/wait.h from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/runtimes/../libc/include/sys/wait.yaml
[48/70] Generating header sys/time.h from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/runtimes/../libc/include/sys/time.yaml
[49/70] Generating header sys/types.h from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/runtimes/../libc/include/sys/types.yaml
[50/68] Generating header termios.h from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/runtimes/../libc/include/termios.yaml
[51/57] Generating __dl_iterate_phdr_callback_t.h
[52/57] Generating struct_dl_phdr_info.h
[53/57] Generating header uchar.h from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/runtimes/../libc/include/uchar.yaml
[54/57] Generating header wchar.h from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/runtimes/../libc/include/wchar.yaml
[55/57] Building CXX object libc/src/link/CMakeFiles/libc.src.link.dl_iterate_phdr.dir/dl_iterate_phdr.cpp.o
FAILED: libc/src/link/CMakeFiles/libc.src.link.dl_iterate_phdr.dir/dl_iterate_phdr.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc -isystem /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/libc/include -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -fdiagnostics-color -g -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -std=gnu++17 -MD -MT libc/src/link/CMakeFiles/libc.src.link.dl_iterate_phdr.dir/dl_iterate_phdr.cpp.o -MF libc/src/link/CMakeFiles/libc.src.link.dl_iterate_phdr.dir/dl_iterate_phdr.cpp.o.d -o libc/src/link/CMakeFiles/libc.src.link.dl_iterate_phdr.dir/dl_iterate_phdr.cpp.o -c /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.cpp
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.cpp:9:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.h:12:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/hdr/types/struct_dl_phdr_info.h:13:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/include/llvm-libc-types/struct_dl_phdr_info.h:14:
/usr/include/elf.h:39:18: error: typedef redefinition with different types ('uint64_t' (aka 'unsigned long') vs '__u64' (aka 'unsigned long long'))
typedef uint64_t Elf64_Xword;
                 ^
/usr/include/linux/elf.h:22:15: note: previous definition is here
typedef __u64   Elf64_Xword;
                ^
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.cpp:9:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.h:12:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/hdr/types/struct_dl_phdr_info.h:13:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/include/llvm-libc-types/struct_dl_phdr_info.h:14:
/usr/include/elf.h:40:18: error: typedef redefinition with different types ('int64_t' (aka 'long') vs '__s64' (aka 'long long'))
typedef int64_t  Elf64_Sxword;
                 ^
/usr/include/linux/elf.h:23:15: note: previous definition is here
typedef __s64   Elf64_Sxword;
                ^
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.cpp:9:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.h:12:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/hdr/types/struct_dl_phdr_info.h:13:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/include/llvm-libc-types/struct_dl_phdr_info.h:14:
/usr/include/elf.h:44:18: error: typedef redefinition with different types ('uint64_t' (aka 'unsigned long') vs '__u64' (aka 'unsigned long long'))
typedef uint64_t Elf64_Addr;
                 ^
/usr/include/linux/elf.h:16:15: note: previous definition is here
typedef __u64   Elf64_Addr;
                ^
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.cpp:9:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.h:12:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/hdr/types/struct_dl_phdr_info.h:13:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/include/llvm-libc-types/struct_dl_phdr_info.h:14:
/usr/include/elf.h:48:18: error: typedef redefinition with different types ('uint64_t' (aka 'unsigned long') vs '__u64' (aka 'unsigned long long'))
typedef uint64_t Elf64_Off;
                 ^
Step 6 (build libc) failure: build libc (failure)
...
[46/74] Generating header sys/utsname.h from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/runtimes/../libc/include/sys/utsname.yaml
[47/73] Generating header sys/wait.h from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/runtimes/../libc/include/sys/wait.yaml
[48/70] Generating header sys/time.h from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/runtimes/../libc/include/sys/time.yaml
[49/70] Generating header sys/types.h from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/runtimes/../libc/include/sys/types.yaml
[50/68] Generating header termios.h from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/runtimes/../libc/include/termios.yaml
[51/57] Generating __dl_iterate_phdr_callback_t.h
[52/57] Generating struct_dl_phdr_info.h
[53/57] Generating header uchar.h from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/runtimes/../libc/include/uchar.yaml
[54/57] Generating header wchar.h from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/runtimes/../libc/include/wchar.yaml
[55/57] Building CXX object libc/src/link/CMakeFiles/libc.src.link.dl_iterate_phdr.dir/dl_iterate_phdr.cpp.o
FAILED: libc/src/link/CMakeFiles/libc.src.link.dl_iterate_phdr.dir/dl_iterate_phdr.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc -isystem /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/libc/include -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -fdiagnostics-color -g -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -std=gnu++17 -MD -MT libc/src/link/CMakeFiles/libc.src.link.dl_iterate_phdr.dir/dl_iterate_phdr.cpp.o -MF libc/src/link/CMakeFiles/libc.src.link.dl_iterate_phdr.dir/dl_iterate_phdr.cpp.o.d -o libc/src/link/CMakeFiles/libc.src.link.dl_iterate_phdr.dir/dl_iterate_phdr.cpp.o -c /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.cpp
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.cpp:9:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.h:12:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/hdr/types/struct_dl_phdr_info.h:13:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/include/llvm-libc-types/struct_dl_phdr_info.h:14:
/usr/include/elf.h:39:18: error: typedef redefinition with different types ('uint64_t' (aka 'unsigned long') vs '__u64' (aka 'unsigned long long'))
typedef uint64_t Elf64_Xword;
                 ^
/usr/include/linux/elf.h:22:15: note: previous definition is here
typedef __u64   Elf64_Xword;
                ^
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.cpp:9:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.h:12:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/hdr/types/struct_dl_phdr_info.h:13:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/include/llvm-libc-types/struct_dl_phdr_info.h:14:
/usr/include/elf.h:40:18: error: typedef redefinition with different types ('int64_t' (aka 'long') vs '__s64' (aka 'long long'))
typedef int64_t  Elf64_Sxword;
                 ^
/usr/include/linux/elf.h:23:15: note: previous definition is here
typedef __s64   Elf64_Sxword;
                ^
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.cpp:9:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.h:12:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/hdr/types/struct_dl_phdr_info.h:13:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/include/llvm-libc-types/struct_dl_phdr_info.h:14:
/usr/include/elf.h:44:18: error: typedef redefinition with different types ('uint64_t' (aka 'unsigned long') vs '__u64' (aka 'unsigned long long'))
typedef uint64_t Elf64_Addr;
                 ^
/usr/include/linux/elf.h:16:15: note: previous definition is here
typedef __u64   Elf64_Addr;
                ^
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.cpp:9:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.h:12:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/hdr/types/struct_dl_phdr_info.h:13:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/include/llvm-libc-types/struct_dl_phdr_info.h:14:
/usr/include/elf.h:48:18: error: typedef redefinition with different types ('uint64_t' (aka 'unsigned long') vs '__u64' (aka 'unsigned long long'))
typedef uint64_t Elf64_Off;
                 ^

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 18, 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/6151

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)
...
[27/166] Generating header errno.h from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/runtimes/../libc/include/errno.yaml
[28/166] Generating header stdlib.h from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/runtimes/../libc/include/stdlib.yaml
[29/166] Generating header unistd.h from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/runtimes/../libc/include/unistd.yaml
[30/166] Generating header stdio.h from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/runtimes/../libc/include/stdio.yaml
[31/166] Generating header sched.h from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/runtimes/../libc/include/sched.yaml
[32/158] Generating header signal.h from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/runtimes/../libc/include/signal.yaml
[33/145] Generating header string.h from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/runtimes/../libc/include/string.yaml
[34/145] Generating header pthread.h from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/runtimes/../libc/include/pthread.yaml
[35/88] Generating header sys/ioctl.h from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/runtimes/../libc/include/sys/ioctl.yaml
[36/87] Building CXX object libc/src/link/CMakeFiles/libc.src.link.dl_iterate_phdr.dir/dl_iterate_phdr.cpp.o
FAILED: libc/src/link/CMakeFiles/libc.src.link.dl_iterate_phdr.dir/dl_iterate_phdr.cpp.o 
/usr/local/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc -isystem /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/libc/include -mabi=ilp32d -march=rv32imafdc --target=riscv32-unknown-linux-gnu --sysroot=/opt/riscv/sysroot --gcc-toolchain=/opt/riscv -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -std=gnu++17 --target=riscv32-unknown-linux-gnu -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -idirafter=/usr/include -ffixed-point -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -MD -MT libc/src/link/CMakeFiles/libc.src.link.dl_iterate_phdr.dir/dl_iterate_phdr.cpp.o -MF libc/src/link/CMakeFiles/libc.src.link.dl_iterate_phdr.dir/dl_iterate_phdr.cpp.o.d -o libc/src/link/CMakeFiles/libc.src.link.dl_iterate_phdr.dir/dl_iterate_phdr.cpp.o -c /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.cpp
In file included from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.cpp:9:
In file included from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.h:12:
In file included from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/hdr/types/struct_dl_phdr_info.h:13:
In file included from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/include/llvm-libc-types/struct_dl_phdr_info.h:14:
/opt/riscv/sysroot/usr/include/elf.h:79:3: error: typedef redefinition with different types ('struct Elf32_Ehdr' vs 'struct elf32_hdr')
   79 | } Elf32_Ehdr;
      |   ^
/opt/riscv/sysroot/usr/include/linux/elf.h:224:3: note: previous definition is here
  224 | } Elf32_Ehdr;
      |   ^
In file included from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.cpp:9:
In file included from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.h:12:
In file included from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/hdr/types/struct_dl_phdr_info.h:13:
In file included from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/include/llvm-libc-types/struct_dl_phdr_info.h:14:
/opt/riscv/sysroot/usr/include/elf.h:97:3: error: typedef redefinition with different types ('struct Elf64_Ehdr' vs 'struct elf64_hdr')
   97 | } Elf64_Ehdr;
      |   ^
/opt/riscv/sysroot/usr/include/linux/elf.h:241:3: note: previous definition is here
  241 | } Elf64_Ehdr;
      |   ^
In file included from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.cpp:9:
In file included from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.h:12:
In file included from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/hdr/types/struct_dl_phdr_info.h:13:
In file included from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/include/llvm-libc-types/struct_dl_phdr_info.h:14:
/opt/riscv/sysroot/usr/include/elf.h:395:3: error: typedef redefinition with different types ('struct Elf32_Shdr' vs 'struct elf32_shdr')
  395 | } Elf32_Shdr;
      |   ^
/opt/riscv/sysroot/usr/include/linux/elf.h:319:3: note: previous definition is here
  319 | } Elf32_Shdr;
      |   ^
In file included from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.cpp:9:
In file included from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/link/dl_iterate_phdr.h:12:
In file included from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/hdr/types/struct_dl_phdr_info.h:13:
In file included from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/include/llvm-libc-types/struct_dl_phdr_info.h:14:
/opt/riscv/sysroot/usr/include/elf.h:409:3: error: typedef redefinition with different types ('struct Elf64_Shdr' vs 'struct elf64_shdr')
  409 | } Elf64_Shdr;
      |   ^

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