[libc-commits] [libc] [libc] Add unistd overlay (PR #118882)

LLVM Continuous Integration via libc-commits libc-commits at lists.llvm.org
Mon Dec 9 16:05:23 PST 2024


llvm-ci wrote:

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

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

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Performing Test HAVE_PTHREAD_AFFINITY -- success
-- Configuring done
-- Generating done
-- Build files have been written to: /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build
@@@BUILD_STEP build libc@@@
Running: ninja libc
[1/29] Building CXX object projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.sysconf.dir/sysconf.cpp.o
[2/29] Building CXX object projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getuid.dir/getuid.cpp.o
FAILED: projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getuid.dir/getuid.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_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/unistd/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/unistd/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 -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getuid.dir/getuid.cpp.o -MF projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getuid.dir/getuid.cpp.o.d -o projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getuid.dir/getuid.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/unistd/linux/getuid.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/unistd/linux/getuid.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/unistd/getuid.h:17:1: error: unknown type name 'uid_t'
uid_t getuid();
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/unistd/linux/getuid.cpp:19:1: error: definition 'getuid' cannot also be an alias
LLVM_LIBC_FUNCTION(uid_t, getuid, ()) {
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/__support/common.h:54:3: note: expanded from macro 'LLVM_LIBC_FUNCTION'
  LLVM_LIBC_FUNCTION_IMPL(type, name, arglist)
  ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/__support/common.h:46:41: note: expanded from macro 'LLVM_LIBC_FUNCTION_IMPL'
  decltype(LIBC_NAMESPACE::name) name [[gnu::alias(#name)]];                   \
                                        ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/unistd/linux/getuid.cpp:19:20: error: unknown type name 'uid_t'
LLVM_LIBC_FUNCTION(uid_t, getuid, ()) {
                   ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/unistd/linux/getuid.cpp:20:39: error: use of undeclared identifier 'uid_t'
  return LIBC_NAMESPACE::syscall_impl<uid_t>(SYS_getuid);
                                      ^
4 errors generated.
[3/29] Building CXX object projects/libc/src/unistd/CMakeFiles/libc.src.unistd.swab.dir/swab.cpp.o
[4/29] Building CXX object projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.isatty.dir/isatty.cpp.o
[5/29] Building CXX object projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getpid.dir/getpid.cpp.o
FAILED: projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getpid.dir/getpid.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_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/unistd/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/unistd/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 -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getpid.dir/getpid.cpp.o -MF projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getpid.dir/getpid.cpp.o.d -o projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getpid.dir/getpid.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/unistd/linux/getpid.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/unistd/linux/getpid.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/unistd/getpid.h:17:1: error: unknown type name 'pid_t'
pid_t getpid();
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/unistd/linux/getpid.cpp:19:1: error: definition 'getpid' cannot also be an alias
LLVM_LIBC_FUNCTION(pid_t, getpid, ()) {
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/__support/common.h:54:3: note: expanded from macro 'LLVM_LIBC_FUNCTION'
  LLVM_LIBC_FUNCTION_IMPL(type, name, arglist)
  ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/__support/common.h:46:41: note: expanded from macro 'LLVM_LIBC_FUNCTION_IMPL'
  decltype(LIBC_NAMESPACE::name) name [[gnu::alias(#name)]];                   \
Step 6 (build libc) failure: build libc (failure)
@@@BUILD_STEP build libc@@@
Running: ninja libc
[1/29] Building CXX object projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.sysconf.dir/sysconf.cpp.o
[2/29] Building CXX object projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getuid.dir/getuid.cpp.o
FAILED: projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getuid.dir/getuid.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_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/unistd/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/unistd/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 -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getuid.dir/getuid.cpp.o -MF projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getuid.dir/getuid.cpp.o.d -o projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getuid.dir/getuid.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/unistd/linux/getuid.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/unistd/linux/getuid.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/unistd/getuid.h:17:1: error: unknown type name 'uid_t'
uid_t getuid();
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/unistd/linux/getuid.cpp:19:1: error: definition 'getuid' cannot also be an alias
LLVM_LIBC_FUNCTION(uid_t, getuid, ()) {
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/__support/common.h:54:3: note: expanded from macro 'LLVM_LIBC_FUNCTION'
  LLVM_LIBC_FUNCTION_IMPL(type, name, arglist)
  ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/__support/common.h:46:41: note: expanded from macro 'LLVM_LIBC_FUNCTION_IMPL'
  decltype(LIBC_NAMESPACE::name) name [[gnu::alias(#name)]];                   \
                                        ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/unistd/linux/getuid.cpp:19:20: error: unknown type name 'uid_t'
LLVM_LIBC_FUNCTION(uid_t, getuid, ()) {
                   ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/unistd/linux/getuid.cpp:20:39: error: use of undeclared identifier 'uid_t'
  return LIBC_NAMESPACE::syscall_impl<uid_t>(SYS_getuid);
                                      ^
4 errors generated.
[3/29] Building CXX object projects/libc/src/unistd/CMakeFiles/libc.src.unistd.swab.dir/swab.cpp.o
[4/29] Building CXX object projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.isatty.dir/isatty.cpp.o
[5/29] Building CXX object projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getpid.dir/getpid.cpp.o
FAILED: projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getpid.dir/getpid.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_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/unistd/linux -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/unistd/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 -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getpid.dir/getpid.cpp.o -MF projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getpid.dir/getpid.cpp.o.d -o projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getpid.dir/getpid.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/unistd/linux/getpid.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/unistd/linux/getpid.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/unistd/getpid.h:17:1: error: unknown type name 'pid_t'
pid_t getpid();
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/unistd/linux/getpid.cpp:19:1: error: definition 'getpid' cannot also be an alias
LLVM_LIBC_FUNCTION(pid_t, getpid, ()) {
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/__support/common.h:54:3: note: expanded from macro 'LLVM_LIBC_FUNCTION'
  LLVM_LIBC_FUNCTION_IMPL(type, name, arglist)
  ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/__support/common.h:46:41: note: expanded from macro 'LLVM_LIBC_FUNCTION_IMPL'
  decltype(LIBC_NAMESPACE::name) name [[gnu::alias(#name)]];                   \
                                        ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/unistd/linux/getpid.cpp:19:20: error: unknown type name 'pid_t'
LLVM_LIBC_FUNCTION(pid_t, getpid, ()) {
                   ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/src/unistd/linux/getpid.cpp:20:39: error: use of undeclared identifier 'pid_t'
  return LIBC_NAMESPACE::syscall_impl<pid_t>(SYS_getpid);
                                      ^

```

</details>

https://github.com/llvm/llvm-project/pull/118882


More information about the libc-commits mailing list