Skip to content

[libc] Add functions to send/recv messages #106467

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 8 commits into from
Sep 19, 2024

Conversation

michaelrj-google
Copy link
Contributor

@michaelrj-google michaelrj-google commented Aug 28, 2024

This patch adds the necessary functions to send and receive messages
over a socket. Those functions are: recv, recvfrom, recvmsg, send,
sendto, sendmsg, and socketpair for testing.

@michaelrj-google
Copy link
Contributor Author

This patch is incomplete currently. The functions are there, but I couldn't get the tests working. I'm uploading this here in case anyone wants to help with that. The tests only need to make sure each of these functions passes and fails, since we're only testing the syscall wrapper and not the actual kernel.

Copy link

github-actions bot commented Aug 28, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@michaelrj-google michaelrj-google marked this pull request as ready for review September 18, 2024 18:26
@llvmbot llvmbot added libc bazel "Peripheral" support tier build system: utils/bazel labels Sep 18, 2024
@llvmbot
Copy link
Member

llvmbot commented Sep 18, 2024

@llvm/pr-subscribers-libc

Author: Michael Jones (michaelrj-google)

Changes

This patch adds the necessary functions to send and receive messages
over a socket. Those functions are: recv, recvfrom, recvmsg, send,
sendto, sendmsg, and socketpair for testing.


Patch is 57.97 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/106467.diff

37 Files Affected:

  • (modified) libc/config/linux/api.td (+4)
  • (modified) libc/config/linux/x86_64/entrypoints.txt (+7-1)
  • (modified) libc/hdr/types/CMakeLists.txt (+27)
  • (added) libc/hdr/types/socklen_t.h (+21)
  • (added) libc/hdr/types/ssize_t.h (+23)
  • (added) libc/hdr/types/struct_msghdr.h (+21)
  • (added) libc/hdr/types/struct_sockaddr.h (+21)
  • (modified) libc/include/CMakeLists.txt (+2)
  • (modified) libc/include/llvm-libc-types/CMakeLists.txt (+4-2)
  • (added) libc/include/llvm-libc-types/struct_iovec.h (+19)
  • (added) libc/include/llvm-libc-types/struct_msghdr.h (+26)
  • (modified) libc/newhdrgen/yaml/sys/socket.yaml (+92)
  • (modified) libc/spec/posix.td (+56)
  • (modified) libc/src/sys/socket/CMakeLists.txt (+44-2)
  • (modified) libc/src/sys/socket/linux/CMakeLists.txt (+84-3)
  • (added) libc/src/sys/socket/linux/recv.cpp (+47)
  • (added) libc/src/sys/socket/linux/recvfrom.cpp (+49)
  • (added) libc/src/sys/socket/linux/recvmsg.cpp (+42)
  • (added) libc/src/sys/socket/linux/send.cpp (+46)
  • (added) libc/src/sys/socket/linux/sendmsg.cpp (+42)
  • (added) libc/src/sys/socket/linux/sendto.cpp (+49)
  • (renamed) libc/src/sys/socket/linux/socketpair.cpp (+11-12)
  • (renamed) libc/src/sys/socket/recv.h (+5-5)
  • (added) libc/src/sys/socket/recvfrom.h (+25)
  • (added) libc/src/sys/socket/recvmsg.h (+22)
  • (added) libc/src/sys/socket/send.h (+21)
  • (added) libc/src/sys/socket/sendmsg.h (+22)
  • (added) libc/src/sys/socket/sendto.h (+25)
  • (added) libc/src/sys/socket/socketpair.h (+20)
  • (modified) libc/test/src/sys/socket/linux/CMakeLists.txt (+47-5)
  • (removed) libc/test/src/sys/socket/linux/bind_test.cpp (-54)
  • (added) libc/test/src/sys/socket/linux/send_recv_test.cpp (+73)
  • (added) libc/test/src/sys/socket/linux/sendmsg_recvmsg_test.cpp (+125)
  • (added) libc/test/src/sys/socket/linux/sendto_recvfrom_test.cpp (+75)
  • (added) libc/test/src/sys/socket/linux/socketpair_test.cpp (+37)
  • (modified) utils/bazel/llvm-project-overlay/libc/BUILD.bazel (+126)
  • (added) utils/bazel/llvm-project-overlay/libc/test/src/sys/socket/BUILD.bazel (+62)
diff --git a/libc/config/linux/api.td b/libc/config/linux/api.td
index 6a7c64296bf922..46523b4ca4b8df 100644
--- a/libc/config/linux/api.td
+++ b/libc/config/linux/api.td
@@ -193,6 +193,10 @@ def SysSocketAPI : PublicAPI<"sys/socket.h"> {
     "socklen_t",
     "struct sockaddr",
     "struct sockaddr_un",
+    "struct msghdr",
+    "struct iovec",
+    "size_t",
+    "ssize_t",
   ];
 }
 
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index 2a38db5bcdad8c..86fd33136832c7 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -1041,8 +1041,14 @@ if(LLVM_LIBC_FULL_BUILD)
     libc.src.sys.select.select
 
     # sys/socket.h entrypoints
-    libc.src.sys.socket.bind
     libc.src.sys.socket.socket
+    libc.src.sys.socket.socketpair
+    libc.src.sys.socket.send
+    libc.src.sys.socket.sendto
+    libc.src.sys.socket.sendmsg
+    libc.src.sys.socket.recv
+    libc.src.sys.socket.recvfrom
+    libc.src.sys.socket.recvmsg
   )
 endif()
 
diff --git a/libc/hdr/types/CMakeLists.txt b/libc/hdr/types/CMakeLists.txt
index 12641c4d93ffe8..2259ca02f2db69 100644
--- a/libc/hdr/types/CMakeLists.txt
+++ b/libc/hdr/types/CMakeLists.txt
@@ -199,3 +199,30 @@ add_proxy_header_library(
     libc.include.setjmp
 )
 
+
+add_proxy_header_library(
+  struct_msghdr
+  HDRS
+    struct_msghdr.h
+  FULL_BUILD_DEPENDS
+    libc.include.llvm-libc-types.struct_msghdr
+    libc.include.sys_socket
+)
+
+add_proxy_header_library(
+  struct_sockaddr
+  HDRS
+    struct_sockaddr.h
+  FULL_BUILD_DEPENDS
+    libc.include.llvm-libc-types.struct_sockaddr
+    libc.include.sys_socket
+)
+
+add_proxy_header_library(
+  socklen_t
+  HDRS
+    socklen_t.h
+  FULL_BUILD_DEPENDS
+    libc.include.llvm-libc-types.socklen_t
+    libc.include.sys_socket
+)
diff --git a/libc/hdr/types/socklen_t.h b/libc/hdr/types/socklen_t.h
new file mode 100644
index 00000000000000..79a6b9c7deadf0
--- /dev/null
+++ b/libc/hdr/types/socklen_t.h
@@ -0,0 +1,21 @@
+//===-- Proxy for socklen_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_HDR_TYPES_SOCKLEN_T_H
+#define LLVM_LIBC_HDR_TYPES_SOCKLEN_T_H
+
+#ifdef LIBC_FULL_BUILD
+
+#include "include/llvm-libc-types/socklen_t.h"
+
+#else
+
+#include <signal.h>
+
+#endif // LIBC_FULL_BUILD
+
+#endif // LLVM_LIBC_HDR_TYPES_SOCKLEN_T_H
diff --git a/libc/hdr/types/ssize_t.h b/libc/hdr/types/ssize_t.h
new file mode 100644
index 00000000000000..4d2000780ee11f
--- /dev/null
+++ b/libc/hdr/types/ssize_t.h
@@ -0,0 +1,23 @@
+//===-- Proxy for ssize_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_HDR_TYPES_SSIZE_T_H
+#define LLVM_LIBC_HDR_TYPES_SSIZE_T_H
+
+#ifdef LIBC_FULL_BUILD
+
+#include "include/llvm-libc-types/ssize_t.h"
+
+#else
+
+#define __need_ssize_t
+#include <stddef.h>
+#undef __need_ssize_t
+
+#endif // LIBC_FULL_BUILD
+
+#endif // LLVM_LIBC_HDR_TYPES_SSIZE_T_H
diff --git a/libc/hdr/types/struct_msghdr.h b/libc/hdr/types/struct_msghdr.h
new file mode 100644
index 00000000000000..6a36af791e2147
--- /dev/null
+++ b/libc/hdr/types/struct_msghdr.h
@@ -0,0 +1,21 @@
+//===-- Proxy for struct msghdr  ------------------------------------------===//
+//
+// 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_MSGHDR_H
+#define LLVM_LIBC_HDR_TYPES_STRUCT_MSGHDR_H
+
+#ifdef LIBC_FULL_BUILD
+
+#include "include/llvm-libc-types/struct_msghdr.h"
+
+#else
+
+#include <sys/socket.h>
+
+#endif // LIBC_FULL_BUILD
+
+#endif // LLVM_LIBC_HDR_TYPES_STRUCT_MSGHDR_H
diff --git a/libc/hdr/types/struct_sockaddr.h b/libc/hdr/types/struct_sockaddr.h
new file mode 100644
index 00000000000000..0fc31d53748540
--- /dev/null
+++ b/libc/hdr/types/struct_sockaddr.h
@@ -0,0 +1,21 @@
+//===-- Proxy for struct sockaddr  ----------------------------------------===//
+//
+// 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_SOCKADDR_H
+#define LLVM_LIBC_HDR_TYPES_STRUCT_SOCKADDR_H
+
+#ifdef LIBC_FULL_BUILD
+
+#include "include/llvm-libc-types/struct_sockaddr.h"
+
+#else
+
+#include <sys/socket.h>
+
+#endif // LIBC_FULL_BUILD
+
+#endif // LLVM_LIBC_HDR_TYPES_STRUCT_SOCKADDR_H
diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt
index dfa5063889e8ab..16c2ac5124c843 100644
--- a/libc/include/CMakeLists.txt
+++ b/libc/include/CMakeLists.txt
@@ -593,6 +593,8 @@ add_header_macro(
     .llvm-libc-macros.sys_socket_macros
     .llvm-libc-types.sa_family_t
     .llvm-libc-types.socklen_t
+    .llvm-libc-types.struct_iovec
+    .llvm-libc-types.struct_msghdr
     .llvm-libc-types.struct_sockaddr
     .llvm-libc-types.struct_sockaddr_un
 )
diff --git a/libc/include/llvm-libc-types/CMakeLists.txt b/libc/include/llvm-libc-types/CMakeLists.txt
index 583b84ccaae67c..a4cf4631c8470e 100644
--- a/libc/include/llvm-libc-types/CMakeLists.txt
+++ b/libc/include/llvm-libc-types/CMakeLists.txt
@@ -117,8 +117,10 @@ add_header(
 add_header(wint_t HDR wint_t.h)
 add_header(sa_family_t HDR sa_family_t.h)
 add_header(socklen_t HDR socklen_t.h)
-add_header(struct_sockaddr_un HDR struct_sockaddr_un.h)
-add_header(struct_sockaddr HDR struct_sockaddr.h)
+add_header(struct_sockaddr_un HDR struct_sockaddr_un.h DEPENDS .sa_family_t)
+add_header(struct_sockaddr HDR struct_sockaddr.h DEPENDS .sa_family_t)
+add_header(struct_iovec HDR struct_iovec.h DEPENDS .size_t)
+add_header(struct_msghdr HDR struct_msghdr.h DEPENDS .size_t .socklen_t .struct_iovec)
 add_header(rpc_opcodes_t HDR rpc_opcodes_t.h)
 add_header(ACTION HDR ACTION.h)
 add_header(ENTRY HDR ENTRY.h)
diff --git a/libc/include/llvm-libc-types/struct_iovec.h b/libc/include/llvm-libc-types/struct_iovec.h
new file mode 100644
index 00000000000000..4f889d3d038a11
--- /dev/null
+++ b/libc/include/llvm-libc-types/struct_iovec.h
@@ -0,0 +1,19 @@
+//===-- Definition of struct iovec ----------------------------------------===//
+//
+// 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_IOVEC_H__
+#define __LLVM_LIBC_TYPES_STRUCT_IOVEC_H__
+
+#include "llvm-libc-types/size_t.h"
+
+struct iovec {
+  void *iov_base;
+  size_t iov_len;
+};
+
+#endif // __LLVM_LIBC_TYPES_STRUCT_IOVEC_H__
diff --git a/libc/include/llvm-libc-types/struct_msghdr.h b/libc/include/llvm-libc-types/struct_msghdr.h
new file mode 100644
index 00000000000000..afd37263fd22c1
--- /dev/null
+++ b/libc/include/llvm-libc-types/struct_msghdr.h
@@ -0,0 +1,26 @@
+//===-- Definition of struct msghdr ---------------------------------------===//
+//
+// 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_MSGHDR_H__
+#define __LLVM_LIBC_TYPES_STRUCT_MSGHDR_H__
+
+#include "llvm-libc-types/size_t.h"
+#include "llvm-libc-types/socklen_t.h"
+#include "llvm-libc-types/struct_iovec.h"
+
+struct msghdr {
+  void *msg_name;        /* Optional address */
+  socklen_t msg_namelen; /* Size of address */
+  struct iovec *msg_iov; /* Scatter/gather array */
+  size_t msg_iovlen;     /* # elements in msg_iov */
+  void *msg_control;     /* Ancillary data, see below */
+  size_t msg_controllen; /* Ancillary data buffer len */
+  int msg_flags;         /* Flags (unused) */
+};
+
+#endif // __LLVM_LIBC_TYPES_STRUCT_MSGHDR_H__
diff --git a/libc/newhdrgen/yaml/sys/socket.yaml b/libc/newhdrgen/yaml/sys/socket.yaml
index 3b8bf4cecfe5aa..accb4b14099e82 100644
--- a/libc/newhdrgen/yaml/sys/socket.yaml
+++ b/libc/newhdrgen/yaml/sys/socket.yaml
@@ -5,9 +5,21 @@ types:
   - type_name: struct_sockaddr
   - type_name: socklen_t
   - type_name: sa_family_t
+  - type_name: struct_msghdr
+  - type_name: struct_iovec
+  - type_name: size_t
+  - type_name: ssize_t
 enums: []
 objects: []
 functions:
+  - name: accept
+    standards:
+      - POSIX
+    return_type: int
+    arguments:
+      - type: int
+      - type: sockaddr *__restrict
+      - type: socklen_t *__restrict
   - name: bind
     standards:
       - POSIX
@@ -16,6 +28,77 @@ functions:
       - type: int
       - type: const struct sockaddr *
       - type: socklen_t
+  - name: connect
+    standards:
+      - POSIX
+    return_type: int
+    arguments:
+      - type: int
+      - type: const struct sockaddr *
+      - type: socklen_t
+  - name: listen
+    standards:
+      - POSIX
+    return_type: int
+    arguments:
+      - type: int
+      - type: int
+  - name: recv
+    standards:
+      - POSIX
+    return_type: ssize_t
+    arguments:
+      - type: int
+      - type: const void *
+      - type: size_t
+      - type: int
+  - name: recvfrom
+    standards:
+      - POSIX
+    return_type: ssize_t
+    arguments:
+      - type: int
+      - type: const void*
+      - type: size_t
+      - type: int
+      - type: const struct sockaddr *
+      - type: socklen_t
+  - name: recvmsg
+    standards:
+      - POSIX
+    return_type: ssize_t
+    arguments:
+      - type: int
+      - type: const struct msghdr *
+      - type: int
+  - name: send
+    standards:
+      - POSIX
+    return_type: ssize_t
+    arguments:
+      - type: int
+      - type: const void*
+      - type: size_t
+      - type: int
+  - name: sendmsg
+    standards:
+      - POSIX
+    return_type: ssize_t
+    arguments:
+      - type: int
+      - type: const struct msghdr *
+      - type: int
+  - name: sendto
+    standards:
+      - POSIX
+    return_type: ssize_t
+    arguments:
+      - type: int
+      - type: const void *
+      - type: size_t
+      - type: int
+      - type: const struct sockaddr *
+      - type: socklen_t
   - name: socket
     standards:
       - POSIX
@@ -24,3 +107,12 @@ functions:
       - type: int
       - type: int
       - type: int
+  - name: socketpair
+    standards:
+      - posix
+    return_type: int
+    arguments:
+      - type: int
+      - type: int
+      - type: int
+      - type: int*
diff --git a/libc/spec/posix.td b/libc/spec/posix.td
index 085f2ec34ab346..beede79a38ec24 100644
--- a/libc/spec/posix.td
+++ b/libc/spec/posix.td
@@ -80,11 +80,20 @@ def GetoptArgvT : NamedType<"__getoptargv_t">;
 
 def SAFamilyType : NamedType<"sa_family_t">;
 def SocklenType : NamedType<"socklen_t">;
+def SocklenPtr : PtrType<SocklenType>;
 
 def StructSockAddr : NamedType<"struct sockaddr">;
 def StructSockAddrPtr : PtrType<StructSockAddr>;
 def ConstStructSockAddrPtr : ConstType<StructSockAddrPtr>;
 
+def StructMsghdr : NamedType<"struct msghdr">;
+def StructMsghdrPtr : PtrType<StructMsghdr>;
+def ConstStructMsghdrPtr : ConstType<StructMsghdrPtr>;
+
+def StructIovec : NamedType<"struct iovec">;
+def StructIovecPtr : PtrType<StructIovec>;
+def ConstStructIovecPtr : ConstType<StructIovecPtr>;
+
 def StructSockAddrUn : NamedType<"struct sockaddr_un">;
 
 def StructStatvfs : NamedType<"struct statvfs">;
@@ -1711,10 +1720,14 @@ def POSIX : StandardSpec<"POSIX"> {
         Macro<"SOCK_PACKET">,
       ], // Macros
       [
+        SizeTType,
+        SSizeTType,
         SAFamilyType,
         StructSockAddr,
         StructSockAddrUn,
         SocklenType,
+        StructIovec,
+        StructMsghdr,
       ], // Types
       [], // Enumerations
       [
@@ -1723,11 +1736,54 @@ def POSIX : StandardSpec<"POSIX"> {
           RetValSpec<IntType>,
           [ArgSpec<IntType>, ArgSpec<IntType>, ArgSpec<IntType>]
         >,
+        FunctionSpec<
+          "socketpair",
+          RetValSpec<IntType>,
+          [ArgSpec<IntType>, ArgSpec<IntType>, ArgSpec<IntType>, ArgSpec<IntPtr>]
+        >,
         FunctionSpec<
           "bind",
           RetValSpec<IntType>,
           [ArgSpec<IntType>, ArgSpec<ConstStructSockAddrPtr>, ArgSpec<SocklenType>]
         >,
+        FunctionSpec<
+          "send",
+          RetValSpec<SSizeTType>,
+          [ArgSpec<IntType>, ArgSpec<ConstVoidPtr>, ArgSpec<SizeTType>, ArgSpec<IntType>]
+        >,
+        FunctionSpec<
+          "sendto",
+          RetValSpec<SSizeTType>,
+          [
+            ArgSpec<IntType>, ArgSpec<ConstVoidPtr>, ArgSpec<SizeTType>,
+            ArgSpec<IntType>, ArgSpec<ConstStructSockAddrPtr>,
+            ArgSpec<SocklenType>
+          ]
+        >,
+        FunctionSpec<
+          "sendmsg",
+          RetValSpec<SSizeTType>,
+          [ArgSpec<IntType>, ArgSpec<ConstStructMsghdrPtr>, ArgSpec<IntType>]
+        >,
+        FunctionSpec<
+          "recv",
+          RetValSpec<SSizeTType>,
+          [ArgSpec<IntType>, ArgSpec<VoidPtr>, ArgSpec<SizeTType>, ArgSpec<IntType>]
+        >,
+        FunctionSpec<
+          "recvfrom",
+          RetValSpec<SSizeTType>,
+          [
+            ArgSpec<IntType>, ArgSpec<VoidPtr>, ArgSpec<SizeTType>,
+            ArgSpec<IntType>, ArgSpec<StructSockAddrPtr>,
+            ArgSpec<SocklenPtr>
+          ]
+        >,
+        FunctionSpec<
+          "recvmsg",
+          RetValSpec<SSizeTType>,
+          [ArgSpec<IntType>, ArgSpec<StructMsghdrPtr>, ArgSpec<IntType>]
+        >,
       ]  // Functions
   >;
 
diff --git a/libc/src/sys/socket/CMakeLists.txt b/libc/src/sys/socket/CMakeLists.txt
index e0bc48735a0314..e283c12abef378 100644
--- a/libc/src/sys/socket/CMakeLists.txt
+++ b/libc/src/sys/socket/CMakeLists.txt
@@ -10,8 +10,50 @@ add_entrypoint_object(
 )
 
 add_entrypoint_object(
-  bind
+  socketpair
   ALIAS
   DEPENDS
-    .${LIBC_TARGET_OS}.bind
+    .${LIBC_TARGET_OS}.socketpair
+)
+
+add_entrypoint_object(
+  send
+  ALIAS
+  DEPENDS
+    .${LIBC_TARGET_OS}.send
+)
+
+add_entrypoint_object(
+  sendto
+  ALIAS
+  DEPENDS
+    .${LIBC_TARGET_OS}.sendto
+)
+
+add_entrypoint_object(
+  sendmsg
+  ALIAS
+  DEPENDS
+    .${LIBC_TARGET_OS}.sendmsg
+)
+
+add_entrypoint_object(
+  recv
+  ALIAS
+  DEPENDS
+    .${LIBC_TARGET_OS}.recv
+)
+
+add_entrypoint_object(
+  recvfrom
+  ALIAS
+  DEPENDS
+    .${LIBC_TARGET_OS}.recvfrom
+)
+
+add_entrypoint_object(
+  recvmsg
+  ALIAS
+  DEPENDS
+    .${LIBC_TARGET_OS}.recvmsg
 )
diff --git a/libc/src/sys/socket/linux/CMakeLists.txt b/libc/src/sys/socket/linux/CMakeLists.txt
index fc9febdec2cc3c..5ced5c5e310d6e 100644
--- a/libc/src/sys/socket/linux/CMakeLists.txt
+++ b/libc/src/sys/socket/linux/CMakeLists.txt
@@ -12,14 +12,95 @@ add_entrypoint_object(
 )
 
 add_entrypoint_object(
-  bind
+  socketpair
   SRCS
-    bind.cpp
+    socketpair.cpp
   HDRS
-    ../bind.h
+    ../socketpair.h
   DEPENDS
     libc.include.sys_syscall
     libc.include.sys_socket
     libc.src.__support.OSUtil.osutil
     libc.src.errno.errno
 )
+
+add_entrypoint_object(
+  send
+  SRCS
+    send.cpp
+  HDRS
+    ../send.h
+  DEPENDS
+    libc.include.sys_syscall
+    libc.hdr.types.struct_sockaddr
+    libc.hdr.types.socklen_t
+    libc.src.__support.OSUtil.osutil
+    libc.src.errno.errno
+)
+
+add_entrypoint_object(
+  sendto
+  SRCS
+    sendto.cpp
+  HDRS
+    ../sendto.h
+  DEPENDS
+    libc.include.sys_syscall
+    libc.hdr.types.struct_sockaddr
+    libc.hdr.types.socklen_t
+    libc.src.__support.OSUtil.osutil
+    libc.src.errno.errno
+)
+
+add_entrypoint_object(
+  sendmsg
+  SRCS
+    sendmsg.cpp
+  HDRS
+    ../sendmsg.h
+  DEPENDS
+    libc.include.sys_syscall
+    libc.hdr.types.struct_msghdr
+    libc.src.__support.OSUtil.osutil
+    libc.src.errno.errno
+)
+add_entrypoint_object(
+  recv
+  SRCS
+    recv.cpp
+  HDRS
+    ../recv.h
+  DEPENDS
+    libc.include.sys_syscall
+    libc.hdr.types.struct_sockaddr
+    libc.hdr.types.socklen_t
+    libc.src.__support.OSUtil.osutil
+    libc.src.errno.errno
+)
+
+add_entrypoint_object(
+  recvfrom
+  SRCS
+    recvfrom.cpp
+  HDRS
+    ../recvfrom.h
+  DEPENDS
+    libc.include.sys_syscall
+    libc.hdr.types.struct_sockaddr
+    libc.hdr.types.socklen_t
+    libc.src.__support.OSUtil.osutil
+    libc.src.errno.errno
+)
+
+add_entrypoint_object(
+  recvmsg
+  SRCS
+    recvmsg.cpp
+  HDRS
+    ../recvmsg.h
+  DEPENDS
+    libc.include.sys_syscall
+    libc.hdr.types.struct_msghdr
+    libc.src.__support.OSUtil.osutil
+    libc.src.errno.errno
+)
diff --git a/libc/src/sys/socket/linux/recv.cpp b/libc/src/sys/socket/linux/recv.cpp
new file mode 100644
index 00000000000000..96acf449dc4bfd
--- /dev/null
+++ b/libc/src/sys/socket/linux/recv.cpp
@@ -0,0 +1,47 @@
+//===-- Linux implementation of recv --------------------------------------===//
+//
+// 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/sys/socket/recv.h"
+
+#include "hdr/types/socklen_t.h"
+#include "hdr/types/ssize_t.h"
+#include "hdr/types/struct_sockaddr.h"
+#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
+#include "src/__support/common.h"
+#include "src/errno/libc_errno.h"
+#include <linux/net.h>   // For SYS_SOCKET socketcall number.
+#include <sys/syscall.h> // For syscall numbers.
+
+namespace LIBC_NAMESPACE_DECL {
+
+LLVM_LIBC_FUNCTION(ssize_t, recv,
+                   (int sockfd, const void *buf, size_t len, int flags)) {
+#ifdef SYS_recv
+  ssize_t ret =
+      LIBC_NAMESPACE::syscall_impl<int>(SYS_recv, sockfd, buf, len, flags);
+#elif defined(SYS_recvfrom)
+  ssize_t ret = LIBC_NAMESPACE::syscall_impl<int>(SYS_recvfrom, sockfd,
+                                                  reinterpret_cast<long>(buf),
+                                                  len, flags, nullptr, 0);
+#elif defined(SYS_socketcall)
+  unsigned long sockcall_args[4] = {
+      static_cast<unsigned long>(sockfd), reinterpret_cast<unsigned long>(buf),
+      static_cast<unsigned long>(len), static_cast<unsigned long>(flags)};
+  ssize_t ret = LIBC_NAMESPACE::syscall_impl<int>(SYS_socketcall, SYS_RECV,
+                                                  sockcall_args);
+#else
+#error "socket and socketcall syscalls unavailable for this platform."
+#endif
+  if (ret < 0) {
+    libc_errno = static_cast<int>(-ret);
+    return -1;
+  }
+  return ret;
+}
+
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/sys/socket/linux/recvfrom.cpp b/libc/src/sys/socket/linux/recvfrom.cpp
new file mode 100644
index 00000000000000..17489a99c922dc
--- /dev/null
+++ b/libc/src/sys/socket/linux/recvfrom.cpp
@@ -0,0 +1,49 @@
+//===-- Linux implementation of recvfrom ----------------------------------===//
+//
+// 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/sys/socket/recvfrom.h"
+
+#include "hdr/types/socklen_t.h"
+#include "hdr/types/ssize_t.h"
+#include "hdr/types/struct_sockaddr.h"
+#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
+#include "src/__support/common.h"
+#include "src/errno/libc_errno.h"
+#include <linux/net.h>   // For SYS_SOCK...
[truncated]

#ifndef __LLVM_LIBC_TYPES_STRUCT_IOVEC_H__
#define __LLVM_LIBC_TYPES_STRUCT_IOVEC_H__

#include "llvm-libc-types/size_t.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

it should be relative to this file's path, so just:

#include "size_t.h"

ASSERT_EQ(recv_result, ssize_t(-1));
ASSERT_ERRNO_FAILURE();

LIBC_NAMESPACE::libc_errno = 0; // reset errno to avoid test ordering issues.
Copy link
Contributor

Choose a reason for hiding this comment

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

Shall we also reset the libc_errno to 0 at the beginning of these tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

right now we assume that all tests start with libc_errno = 0. At some point we should enforce that in our test framework, but that's out of scope for this patch.

@michaelrj-google michaelrj-google merged commit f6b4c34 into llvm:main Sep 19, 2024
7 checks passed
@michaelrj-google michaelrj-google deleted the libcSendRecvMsg branch September 19, 2024 21:43
@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 19, 2024

LLVM Buildbot has detected a new failure on builder libc-aarch64-ubuntu-fullbuild-dbg running on libc-aarch64-ubuntu while building libc,utils at step 4 "annotate".

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

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-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:72 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.sys.socket.bind".
Call Stack (most recent call first):
  /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:142 (get_all_object_file_deps)
  /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/lib/CMakeLists.txt:22 (add_entrypoint_library)


CMake Error at /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/CMakeLists.txt:104 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.sys.socket.bind".


-- Compiler-RT supported architectures: aarch64
-- Builtin supported architectures: aarch64
-- Performing additional configure checks with target flags: -march=armv8-a
-- For aarch64 builtins preferring aarch64/fp_mode.c to fp_mode.c
-- Builtin supported architectures: aarch64
-- Generated Sanitizer SUPPORTED_TOOLS list on "Linux" is "asan;lsan;hwasan;msan;tsan;ubsan"
-- sanitizer_common tests on "Linux" will run against "asan;lsan;hwasan;msan;tsan;ubsan"
-- Clang version: 20.0.0git
-- Registering ExampleIRTransforms as a pass plugin (static build: OFF)
-- Registering Bye as a pass plugin (static build: OFF)
-- Google Benchmark version: v0.0.0, normalized to 0.0.0
-- Enabling additional flags: -DINCLUDE_DIRECTORIES=/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/third-party/benchmark/include
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- failed to compile
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Performing Test HAVE_PTHREAD_AFFINITY -- failed to compile
-- Configuring incomplete, errors occurred!
See also "/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/build/CMakeFiles/CMakeOutput.log".
See also "/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/build/CMakeFiles/CMakeError.log".
['cmake', '../llvm-project/llvm', '-GNinja', '-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_ENABLE_PROJECTS=llvm;libc;clang;compiler-rt', '-DLLVM_LIBC_INCLUDE_SCUDO=ON', '-DLIBC_INCLUDE_BENCHMARKS=ON', '-DLLVM_LIBC_FULL_BUILD=ON'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 164, in step
    yield
  File "../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 113, in main
    run_command(['cmake', os.path.join(source_dir, 'llvm')] + cmake_args)
  File "../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 179, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-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/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['cmake', '../llvm-project/llvm', '-GNinja', '-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_ENABLE_PROJECTS=llvm;libc;clang;compiler-rt', '-DLLVM_LIBC_INCLUDE_SCUDO=ON', '-DLIBC_INCLUDE_BENCHMARKS=ON', '-DLLVM_LIBC_FULL_BUILD=ON']' returned non-zero exit status 1
@@@STEP_FAILURE@@@
@@@BUILD_STEP build libc@@@
Running: ninja libc
Step 5 (cmake) failure: cmake (failure)
...
  get_target_property() called with non-existent target
  "libc.src.sys.socket.bind".
Call Stack (most recent call first):
  /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:142 (get_all_object_file_deps)
  /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/lib/CMakeLists.txt:22 (add_entrypoint_library)


CMake Error at /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:72 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.sys.socket.bind".
Call Stack (most recent call first):
  /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:142 (get_all_object_file_deps)
  /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/lib/CMakeLists.txt:22 (add_entrypoint_library)
CMake Error at /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/CMakeLists.txt:104 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.sys.socket.bind".
-- Compiler-RT supported architectures: aarch64
-- Builtin supported architectures: aarch64
-- Performing additional configure checks with target flags: -march=armv8-a
-- For aarch64 builtins preferring aarch64/fp_mode.c to fp_mode.c
-- Builtin supported architectures: aarch64
-- Generated Sanitizer SUPPORTED_TOOLS list on "Linux" is "asan;lsan;hwasan;msan;tsan;ubsan"
-- sanitizer_common tests on "Linux" will run against "asan;lsan;hwasan;msan;tsan;ubsan"
-- Clang version: 20.0.0git
-- Registering ExampleIRTransforms as a pass plugin (static build: OFF)
-- Registering Bye as a pass plugin (static build: OFF)
-- Google Benchmark version: v0.0.0, normalized to 0.0.0
-- Enabling additional flags: -DINCLUDE_DIRECTORIES=/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/third-party/benchmark/include
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- failed to compile
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Performing Test HAVE_PTHREAD_AFFINITY -- failed to compile
-- Configuring incomplete, errors occurred!
See also "/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/build/CMakeFiles/CMakeOutput.log".
See also "/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/build/CMakeFiles/CMakeError.log".
['cmake', '../llvm-project/llvm', '-GNinja', '-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_ENABLE_PROJECTS=llvm;libc;clang;compiler-rt', '-DLLVM_LIBC_INCLUDE_SCUDO=ON', '-DLIBC_INCLUDE_BENCHMARKS=ON', '-DLLVM_LIBC_FULL_BUILD=ON'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 164, in step
    yield
  File "../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 113, in main
    run_command(['cmake', os.path.join(source_dir, 'llvm')] + cmake_args)
  File "../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 179, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-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/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['cmake', '../llvm-project/llvm', '-GNinja', '-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_ENABLE_PROJECTS=llvm;libc;clang;compiler-rt', '-DLLVM_LIBC_INCLUDE_SCUDO=ON', '-DLIBC_INCLUDE_BENCHMARKS=ON', '-DLLVM_LIBC_FULL_BUILD=ON']' returned non-zero exit status 1

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 19, 2024

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,utils at step 4 "annotate".

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

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)
...
[372/539] Building CXX object projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.munlock.dir/munlock.cpp.o
[373/539] Building CXX object projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.mlockall.dir/mlockall.cpp.o
[374/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_unlock.dir/pthread_rwlock_unlock.cpp.o
[375/539] Building CXX object projects/libc/src/sys/resource/linux/CMakeFiles/libc.src.sys.resource.linux.getrlimit.dir/getrlimit.cpp.o
[376/539] Building CXX object projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.msync.dir/msync.cpp.o
[377/539] Building CXX object projects/libc/src/sys/resource/linux/CMakeFiles/libc.src.sys.resource.linux.setrlimit.dir/setrlimit.cpp.o
[378/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.socket.dir/socket.cpp.o
[379/539] Building CXX object projects/libc/src/sys/random/linux/CMakeFiles/libc.src.sys.random.linux.getrandom.dir/getrandom.cpp.o
[380/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.socketpair.dir/socketpair.cpp.o
[381/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o
FAILED: projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/projects/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -O1 -fsanitize=address -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 -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o -MF projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o.d -o projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/sys/socket/linux/sendto.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/sys/socket/linux/sendto.cpp:9:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/sys/socket/sendto.h:14:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/hdr/types/struct_sockaddr.h:13:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/include/llvm-libc-types/struct_sockaddr.h:18:8: error: flexible array members are a C99 feature [-Werror,-Wc99-extensions]
  char sa_data[];
       ^
1 error generated.
[382/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o
FAILED: projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/projects/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -O1 -fsanitize=address -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 -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o -MF projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o.d -o projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/sys/socket/linux/recvfrom.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/sys/socket/linux/recvfrom.cpp:9:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/sys/socket/recvfrom.h:14:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/hdr/types/struct_sockaddr.h:13:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/include/llvm-libc-types/struct_sockaddr.h:18:8: error: flexible array members are a C99 feature [-Werror,-Wc99-extensions]
  char sa_data[];
       ^
1 error generated.
[383/539] Building CXX object projects/libc/src/sys/select/linux/CMakeFiles/libc.src.sys.select.linux.select.dir/select.cpp.o
[384/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendmsg.dir/sendmsg.cpp.o
[385/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.send.dir/send.cpp.o
[386/539] Building CXX object projects/libc/src/sys/sendfile/linux/CMakeFiles/libc.src.sys.sendfile.linux.sendfile.dir/sendfile.cpp.o
[387/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recv.dir/recv.cpp.o
[388/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvmsg.dir/recvmsg.cpp.o
[389/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.fchmod.dir/fchmod.cpp.o
[390/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.chmod.dir/chmod.cpp.o
[391/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.fchmodat.dir/fchmodat.cpp.o
[392/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.mkdir.dir/mkdir.cpp.o
[393/539] Building CXX object projects/libc/src/sys/utsname/linux/CMakeFiles/libc.src.sys.utsname.linux.uname.dir/uname.cpp.o
[394/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_rdlock.dir/pthread_rwlock_rdlock.cpp.o
[395/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.mkdirat.dir/mkdirat.cpp.o
[396/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.stat.dir/stat.cpp.o
[397/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_wrlock.dir/pthread_rwlock_wrlock.cpp.o
[398/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.lstat.dir/lstat.cpp.o
[399/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.fstat.dir/fstat.cpp.o
[400/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_timedwrlock.dir/pthread_rwlock_timedwrlock.cpp.o
[401/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_timedrdlock.dir/pthread_rwlock_timedrdlock.cpp.o
[402/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_clockwrlock.dir/pthread_rwlock_clockwrlock.cpp.o
Step 6 (build libc) failure: build libc (failure)
...
[372/539] Building CXX object projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.munlock.dir/munlock.cpp.o
[373/539] Building CXX object projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.mlockall.dir/mlockall.cpp.o
[374/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_unlock.dir/pthread_rwlock_unlock.cpp.o
[375/539] Building CXX object projects/libc/src/sys/resource/linux/CMakeFiles/libc.src.sys.resource.linux.getrlimit.dir/getrlimit.cpp.o
[376/539] Building CXX object projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.msync.dir/msync.cpp.o
[377/539] Building CXX object projects/libc/src/sys/resource/linux/CMakeFiles/libc.src.sys.resource.linux.setrlimit.dir/setrlimit.cpp.o
[378/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.socket.dir/socket.cpp.o
[379/539] Building CXX object projects/libc/src/sys/random/linux/CMakeFiles/libc.src.sys.random.linux.getrandom.dir/getrandom.cpp.o
[380/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.socketpair.dir/socketpair.cpp.o
[381/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o
FAILED: projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/projects/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -O1 -fsanitize=address -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 -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o -MF projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o.d -o projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/sys/socket/linux/sendto.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/sys/socket/linux/sendto.cpp:9:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/sys/socket/sendto.h:14:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/hdr/types/struct_sockaddr.h:13:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/include/llvm-libc-types/struct_sockaddr.h:18:8: error: flexible array members are a C99 feature [-Werror,-Wc99-extensions]
  char sa_data[];
       ^
1 error generated.
[382/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o
FAILED: projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/projects/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -O1 -fsanitize=address -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 -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o -MF projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o.d -o projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/sys/socket/linux/recvfrom.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/sys/socket/linux/recvfrom.cpp:9:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/sys/socket/recvfrom.h:14:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/hdr/types/struct_sockaddr.h:13:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/include/llvm-libc-types/struct_sockaddr.h:18:8: error: flexible array members are a C99 feature [-Werror,-Wc99-extensions]
  char sa_data[];
       ^
1 error generated.
[383/539] Building CXX object projects/libc/src/sys/select/linux/CMakeFiles/libc.src.sys.select.linux.select.dir/select.cpp.o
[384/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendmsg.dir/sendmsg.cpp.o
[385/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.send.dir/send.cpp.o
[386/539] Building CXX object projects/libc/src/sys/sendfile/linux/CMakeFiles/libc.src.sys.sendfile.linux.sendfile.dir/sendfile.cpp.o
[387/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recv.dir/recv.cpp.o
[388/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvmsg.dir/recvmsg.cpp.o
[389/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.fchmod.dir/fchmod.cpp.o
[390/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.chmod.dir/chmod.cpp.o
[391/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.fchmodat.dir/fchmodat.cpp.o
[392/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.mkdir.dir/mkdir.cpp.o
[393/539] Building CXX object projects/libc/src/sys/utsname/linux/CMakeFiles/libc.src.sys.utsname.linux.uname.dir/uname.cpp.o
[394/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_rdlock.dir/pthread_rwlock_rdlock.cpp.o
[395/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.mkdirat.dir/mkdirat.cpp.o
[396/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.stat.dir/stat.cpp.o
[397/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_wrlock.dir/pthread_rwlock_wrlock.cpp.o
[398/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.lstat.dir/lstat.cpp.o
[399/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.fstat.dir/fstat.cpp.o
[400/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_timedwrlock.dir/pthread_rwlock_timedwrlock.cpp.o
[401/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_timedrdlock.dir/pthread_rwlock_timedrdlock.cpp.o
[402/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_clockwrlock.dir/pthread_rwlock_clockwrlock.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 19, 2024

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,utils at step 4 "annotate".

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

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)
...
[384/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_rdlock.dir/pthread_rwlock_rdlock.cpp.o
[385/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_wrlock.dir/pthread_rwlock_wrlock.cpp.o
[386/539] Building CXX object projects/libc/src/sys/resource/linux/CMakeFiles/libc.src.sys.resource.linux.getrlimit.dir/getrlimit.cpp.o
[387/539] Building CXX object projects/libc/src/sys/random/linux/CMakeFiles/libc.src.sys.random.linux.getrandom.dir/getrandom.cpp.o
[388/539] Building CXX object projects/libc/src/sys/resource/linux/CMakeFiles/libc.src.sys.resource.linux.setrlimit.dir/setrlimit.cpp.o
[389/539] Building CXX object projects/libc/src/sys/select/linux/CMakeFiles/libc.src.sys.select.linux.select.dir/select.cpp.o
[390/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.socket.dir/socket.cpp.o
[391/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.socketpair.dir/socketpair.cpp.o
[392/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.send.dir/send.cpp.o
[393/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o
FAILED: projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/projects/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -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 -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 -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o -MF projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o.d -o projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux/sendto.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux/sendto.cpp:9:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/src/sys/socket/sendto.h:14:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/hdr/types/struct_sockaddr.h:13:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/include/llvm-libc-types/struct_sockaddr.h:18:8: error: flexible array members are a C99 feature [-Werror,-Wc99-extensions]
  char sa_data[];
       ^
1 error generated.
[394/539] Building CXX object projects/libc/src/termios/linux/CMakeFiles/libc.src.termios.linux.cfgetospeed.dir/cfgetospeed.cpp.o
[395/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvmsg.dir/recvmsg.cpp.o
[396/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.fchmod.dir/fchmod.cpp.o
[397/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recv.dir/recv.cpp.o
[398/539] Building CXX object projects/libc/src/termios/linux/CMakeFiles/libc.src.termios.linux.cfgetispeed.dir/cfgetispeed.cpp.o
[399/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.chmod.dir/chmod.cpp.o
[400/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o
FAILED: projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/projects/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -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 -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 -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o -MF projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o.d -o projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux/recvfrom.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux/recvfrom.cpp:9:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/src/sys/socket/recvfrom.h:14:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/hdr/types/struct_sockaddr.h:13:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/include/llvm-libc-types/struct_sockaddr.h:18:8: error: flexible array members are a C99 feature [-Werror,-Wc99-extensions]
  char sa_data[];
       ^
1 error generated.
[401/539] Building CXX object projects/libc/src/sys/sendfile/linux/CMakeFiles/libc.src.sys.sendfile.linux.sendfile.dir/sendfile.cpp.o
[402/539] Building CXX object projects/libc/src/termios/linux/CMakeFiles/libc.src.termios.linux.cfsetispeed.dir/cfsetispeed.cpp.o
[403/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendmsg.dir/sendmsg.cpp.o
[404/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.mkdirat.dir/mkdirat.cpp.o
[405/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.mkdir.dir/mkdir.cpp.o
[406/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.stat.dir/stat.cpp.o
[407/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.lstat.dir/lstat.cpp.o
[408/539] Building CXX object projects/libc/src/string/CMakeFiles/libc.src.string.memmove.dir/memmove.cpp.o
[409/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.fchmodat.dir/fchmodat.cpp.o
[410/539] Building CXX object projects/libc/src/sys/utsname/linux/CMakeFiles/libc.src.sys.utsname.linux.uname.dir/uname.cpp.o
[411/539] Building CXX object projects/libc/src/termios/linux/CMakeFiles/libc.src.termios.linux.cfsetospeed.dir/cfsetospeed.cpp.o
[412/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.fstat.dir/fstat.cpp.o
[413/539] Building CXX object projects/libc/src/sys/prctl/linux/CMakeFiles/libc.src.sys.prctl.linux.prctl.dir/prctl.cpp.o
[414/539] Building CXX object projects/libc/src/termios/linux/CMakeFiles/libc.src.termios.linux.tcflush.dir/tcflush.cpp.o
Step 6 (build libc) failure: build libc (failure)
...
[384/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_rdlock.dir/pthread_rwlock_rdlock.cpp.o
[385/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_wrlock.dir/pthread_rwlock_wrlock.cpp.o
[386/539] Building CXX object projects/libc/src/sys/resource/linux/CMakeFiles/libc.src.sys.resource.linux.getrlimit.dir/getrlimit.cpp.o
[387/539] Building CXX object projects/libc/src/sys/random/linux/CMakeFiles/libc.src.sys.random.linux.getrandom.dir/getrandom.cpp.o
[388/539] Building CXX object projects/libc/src/sys/resource/linux/CMakeFiles/libc.src.sys.resource.linux.setrlimit.dir/setrlimit.cpp.o
[389/539] Building CXX object projects/libc/src/sys/select/linux/CMakeFiles/libc.src.sys.select.linux.select.dir/select.cpp.o
[390/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.socket.dir/socket.cpp.o
[391/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.socketpair.dir/socketpair.cpp.o
[392/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.send.dir/send.cpp.o
[393/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o
FAILED: projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/projects/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -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 -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 -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o -MF projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o.d -o projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux/sendto.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux/sendto.cpp:9:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/src/sys/socket/sendto.h:14:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/hdr/types/struct_sockaddr.h:13:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/include/llvm-libc-types/struct_sockaddr.h:18:8: error: flexible array members are a C99 feature [-Werror,-Wc99-extensions]
  char sa_data[];
       ^
1 error generated.
[394/539] Building CXX object projects/libc/src/termios/linux/CMakeFiles/libc.src.termios.linux.cfgetospeed.dir/cfgetospeed.cpp.o
[395/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvmsg.dir/recvmsg.cpp.o
[396/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.fchmod.dir/fchmod.cpp.o
[397/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recv.dir/recv.cpp.o
[398/539] Building CXX object projects/libc/src/termios/linux/CMakeFiles/libc.src.termios.linux.cfgetispeed.dir/cfgetispeed.cpp.o
[399/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.chmod.dir/chmod.cpp.o
[400/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o
FAILED: projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/projects/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -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 -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 -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o -MF projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o.d -o projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux/recvfrom.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux/recvfrom.cpp:9:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/src/sys/socket/recvfrom.h:14:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/hdr/types/struct_sockaddr.h:13:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/include/llvm-libc-types/struct_sockaddr.h:18:8: error: flexible array members are a C99 feature [-Werror,-Wc99-extensions]
  char sa_data[];
       ^
1 error generated.
[401/539] Building CXX object projects/libc/src/sys/sendfile/linux/CMakeFiles/libc.src.sys.sendfile.linux.sendfile.dir/sendfile.cpp.o
[402/539] Building CXX object projects/libc/src/termios/linux/CMakeFiles/libc.src.termios.linux.cfsetispeed.dir/cfsetispeed.cpp.o
[403/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendmsg.dir/sendmsg.cpp.o
[404/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.mkdirat.dir/mkdirat.cpp.o
[405/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.mkdir.dir/mkdir.cpp.o
[406/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.stat.dir/stat.cpp.o
[407/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.lstat.dir/lstat.cpp.o
[408/539] Building CXX object projects/libc/src/string/CMakeFiles/libc.src.string.memmove.dir/memmove.cpp.o
[409/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.fchmodat.dir/fchmodat.cpp.o
[410/539] Building CXX object projects/libc/src/sys/utsname/linux/CMakeFiles/libc.src.sys.utsname.linux.uname.dir/uname.cpp.o
[411/539] Building CXX object projects/libc/src/termios/linux/CMakeFiles/libc.src.termios.linux.cfsetospeed.dir/cfsetospeed.cpp.o
[412/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.fstat.dir/fstat.cpp.o
[413/539] Building CXX object projects/libc/src/sys/prctl/linux/CMakeFiles/libc.src.sys.prctl.linux.prctl.dir/prctl.cpp.o
[414/539] Building CXX object projects/libc/src/termios/linux/CMakeFiles/libc.src.termios.linux.tcflush.dir/tcflush.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 19, 2024

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,utils at step 4 "annotate".

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

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)
...
[377/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_clockwrlock.dir/pthread_rwlock_clockwrlock.cpp.o
[378/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_clockrdlock.dir/pthread_rwlock_clockrdlock.cpp.o
[379/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_timedrdlock.dir/pthread_rwlock_timedrdlock.cpp.o
[380/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_unlock.dir/pthread_rwlock_unlock.cpp.o
[381/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_timedwrlock.dir/pthread_rwlock_timedwrlock.cpp.o
[382/539] Building CXX object projects/libc/src/sys/select/linux/CMakeFiles/libc.src.sys.select.linux.select.dir/select.cpp.o
[383/539] Building CXX object projects/libc/src/string/CMakeFiles/libc.src.string.strxfrm_l.dir/strxfrm_l.cpp.o
[384/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.socketpair.dir/socketpair.cpp.o
[385/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.send.dir/send.cpp.o
[386/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o
FAILED: projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -isystem/usr/lib/gcc/x86_64-linux-gnu/12//include -nostdinc -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 -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o -MF projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o.d -o projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux/sendto.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/hdr/types/struct_sockaddr.h:13,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/sys/socket/sendto.h:14,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux/sendto.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/include/llvm-libc-types/struct_sockaddr.h:18:8: error: ISO C++ forbids flexible array member ‘sa_data’ [-Werror=pedantic]
   18 |   char sa_data[];
      |        ^~~~~~~
cc1plus: all warnings being treated as errors
[387/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recv.dir/recv.cpp.o
[388/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o
FAILED: projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -isystem/usr/lib/gcc/x86_64-linux-gnu/12//include -nostdinc -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 -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o -MF projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o.d -o projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux/recvfrom.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/hdr/types/struct_sockaddr.h:13,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/sys/socket/recvfrom.h:14,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux/recvfrom.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/include/llvm-libc-types/struct_sockaddr.h:18:8: error: ISO C++ forbids flexible array member ‘sa_data’ [-Werror=pedantic]
   18 |   char sa_data[];
      |        ^~~~~~~
cc1plus: all warnings being treated as errors
[389/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvmsg.dir/recvmsg.cpp.o
[390/539] Building CXX object projects/libc/src/sys/sendfile/linux/CMakeFiles/libc.src.sys.sendfile.linux.sendfile.dir/sendfile.cpp.o
[391/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.fchmodat.dir/fchmodat.cpp.o
[392/539] Building CXX object projects/libc/src/string/CMakeFiles/libc.src.string.strxfrm.dir/strxfrm.cpp.o
[393/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendmsg.dir/sendmsg.cpp.o
[394/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.chmod.dir/chmod.cpp.o
[395/539] Building CXX object projects/libc/src/termios/linux/CMakeFiles/libc.src.termios.linux.cfgetispeed.dir/cfgetispeed.cpp.o
[396/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.fchmod.dir/fchmod.cpp.o
[397/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.mkdirat.dir/mkdirat.cpp.o
[398/539] Building CXX object projects/libc/src/termios/linux/CMakeFiles/libc.src.termios.linux.cfgetospeed.dir/cfgetospeed.cpp.o
[399/539] Building CXX object projects/libc/src/termios/linux/CMakeFiles/libc.src.termios.linux.cfsetispeed.dir/cfsetispeed.cpp.o
[400/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.mkdir.dir/mkdir.cpp.o
[401/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.fstat.dir/fstat.cpp.o
[402/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.stat.dir/stat.cpp.o
[403/539] Building CXX object projects/libc/src/sys/prctl/linux/CMakeFiles/libc.src.sys.prctl.linux.prctl.dir/prctl.cpp.o
[404/539] Building CXX object projects/libc/src/sys/utsname/linux/CMakeFiles/libc.src.sys.utsname.linux.uname.dir/uname.cpp.o
[405/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.lstat.dir/lstat.cpp.o
[406/539] Building CXX object projects/libc/src/string/CMakeFiles/libc.src.string.memset_explicit.dir/memset_explicit.cpp.o
[407/539] Building CXX object projects/libc/src/sys/wait/linux/CMakeFiles/libc.src.sys.wait.linux.wait4.dir/wait4.cpp.o
Step 6 (build libc) failure: build libc (failure)
...
[377/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_clockwrlock.dir/pthread_rwlock_clockwrlock.cpp.o
[378/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_clockrdlock.dir/pthread_rwlock_clockrdlock.cpp.o
[379/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_timedrdlock.dir/pthread_rwlock_timedrdlock.cpp.o
[380/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_unlock.dir/pthread_rwlock_unlock.cpp.o
[381/539] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_rwlock_timedwrlock.dir/pthread_rwlock_timedwrlock.cpp.o
[382/539] Building CXX object projects/libc/src/sys/select/linux/CMakeFiles/libc.src.sys.select.linux.select.dir/select.cpp.o
[383/539] Building CXX object projects/libc/src/string/CMakeFiles/libc.src.string.strxfrm_l.dir/strxfrm_l.cpp.o
[384/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.socketpair.dir/socketpair.cpp.o
[385/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.send.dir/send.cpp.o
[386/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o
FAILED: projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -isystem/usr/lib/gcc/x86_64-linux-gnu/12//include -nostdinc -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 -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o -MF projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o.d -o projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendto.dir/sendto.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux/sendto.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/hdr/types/struct_sockaddr.h:13,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/sys/socket/sendto.h:14,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux/sendto.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/include/llvm-libc-types/struct_sockaddr.h:18:8: error: ISO C++ forbids flexible array member ‘sa_data’ [-Werror=pedantic]
   18 |   char sa_data[];
      |        ^~~~~~~
cc1plus: all warnings being treated as errors
[387/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recv.dir/recv.cpp.o
[388/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o
FAILED: projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -isystem/usr/lib/gcc/x86_64-linux-gnu/12//include -nostdinc -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 -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o -MF projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o.d -o projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvfrom.dir/recvfrom.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux/recvfrom.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/hdr/types/struct_sockaddr.h:13,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/sys/socket/recvfrom.h:14,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/sys/socket/linux/recvfrom.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/include/llvm-libc-types/struct_sockaddr.h:18:8: error: ISO C++ forbids flexible array member ‘sa_data’ [-Werror=pedantic]
   18 |   char sa_data[];
      |        ^~~~~~~
cc1plus: all warnings being treated as errors
[389/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.recvmsg.dir/recvmsg.cpp.o
[390/539] Building CXX object projects/libc/src/sys/sendfile/linux/CMakeFiles/libc.src.sys.sendfile.linux.sendfile.dir/sendfile.cpp.o
[391/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.fchmodat.dir/fchmodat.cpp.o
[392/539] Building CXX object projects/libc/src/string/CMakeFiles/libc.src.string.strxfrm.dir/strxfrm.cpp.o
[393/539] Building CXX object projects/libc/src/sys/socket/linux/CMakeFiles/libc.src.sys.socket.linux.sendmsg.dir/sendmsg.cpp.o
[394/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.chmod.dir/chmod.cpp.o
[395/539] Building CXX object projects/libc/src/termios/linux/CMakeFiles/libc.src.termios.linux.cfgetispeed.dir/cfgetispeed.cpp.o
[396/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.fchmod.dir/fchmod.cpp.o
[397/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.mkdirat.dir/mkdirat.cpp.o
[398/539] Building CXX object projects/libc/src/termios/linux/CMakeFiles/libc.src.termios.linux.cfgetospeed.dir/cfgetospeed.cpp.o
[399/539] Building CXX object projects/libc/src/termios/linux/CMakeFiles/libc.src.termios.linux.cfsetispeed.dir/cfsetispeed.cpp.o
[400/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.mkdir.dir/mkdir.cpp.o
[401/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.fstat.dir/fstat.cpp.o
[402/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.stat.dir/stat.cpp.o
[403/539] Building CXX object projects/libc/src/sys/prctl/linux/CMakeFiles/libc.src.sys.prctl.linux.prctl.dir/prctl.cpp.o
[404/539] Building CXX object projects/libc/src/sys/utsname/linux/CMakeFiles/libc.src.sys.utsname.linux.uname.dir/uname.cpp.o
[405/539] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.lstat.dir/lstat.cpp.o
[406/539] Building CXX object projects/libc/src/string/CMakeFiles/libc.src.string.memset_explicit.dir/memset_explicit.cpp.o
[407/539] Building CXX object projects/libc/src/sys/wait/linux/CMakeFiles/libc.src.sys.wait.linux.wait4.dir/wait4.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 19, 2024

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

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

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:70 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.sys.socket.bind".
Call Stack (most recent call first):
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:142 (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:72 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.sys.socket.bind".
Call Stack (most recent call first):
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:142 (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/test/src/CMakeLists.txt:104 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.sys.socket.bind".


-- Registering ExampleIRTransforms as a pass plugin (static build: OFF)
-- Registering Bye as a pass plugin (static build: OFF)
-- Google Benchmark version: v0.0.0, normalized to 0.0.0
-- Enabling additional flags: -DINCLUDE_DIRECTORIES=/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/third-party/benchmark/include
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- failed to compile
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Performing Test HAVE_PTHREAD_AFFINITY -- failed to compile
-- 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/llvm', '-GNinja', '-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_ENABLE_PROJECTS=llvm;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 164, 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 113, in main
    run_command(['cmake', os.path.join(source_dir, 'llvm')] + 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 179, 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/llvm', '-GNinja', '-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_ENABLE_PROJECTS=llvm;libc', '-DLLVM_LIBC_FULL_BUILD=ON']' returned non-zero exit status 1.
@@@STEP_FAILURE@@@
@@@BUILD_STEP build libc@@@
Running: ninja libc
Step 5 (cmake) failure: cmake (failure)
...
  "libc.src.sys.socket.bind".
Call Stack (most recent call first):
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:63 (collect_object_file_deps)
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:142 (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:70 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.sys.socket.bind".
Call Stack (most recent call first):
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:142 (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:72 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.sys.socket.bind".
Call Stack (most recent call first):
  /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/cmake/modules/LLVMLibCLibraryRules.cmake:142 (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/test/src/CMakeLists.txt:104 (get_target_property):
  get_target_property() called with non-existent target
  "libc.src.sys.socket.bind".
-- Registering ExampleIRTransforms as a pass plugin (static build: OFF)
-- Registering Bye as a pass plugin (static build: OFF)
-- Google Benchmark version: v0.0.0, normalized to 0.0.0
-- Enabling additional flags: -DINCLUDE_DIRECTORIES=/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/third-party/benchmark/include
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- failed to compile
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Performing Test HAVE_PTHREAD_AFFINITY -- failed to compile
-- 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/llvm', '-GNinja', '-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_ENABLE_PROJECTS=llvm;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 164, 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 113, in main
    run_command(['cmake', os.path.join(source_dir, 'llvm')] + 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 179, 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/llvm', '-GNinja', '-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', '-DCMAKE_BUILD_TYPE=Debug', '-DLLVM_ENABLE_PROJECTS=llvm;libc', '-DLLVM_LIBC_FULL_BUILD=ON']' returned non-zero exit status 1.

michaelrj-google added a commit to michaelrj-google/llvm-project that referenced this pull request Sep 19, 2024
Fixes llvm#106467.
Bind was accidentally removed while trying to clean up functions that
didn't end up being needed. The GCC issue was just a warning treated as
an error.
michaelrj-google added a commit that referenced this pull request Sep 19, 2024
Fixes #106467.
Bind was accidentally removed while trying to clean up functions that
didn't end up being needed. The GCC issue was just a warning treated as
an error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bazel "Peripheral" support tier build system: utils/bazel libc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants