[libc-commits] [libc] [libc] remove #include <fcntl.h> and add proxy or type (PR #113836)
LLVM Continuous Integration via libc-commits
libc-commits at lists.llvm.org
Mon Oct 28 13:43:11 PDT 2024
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `libc-riscv32-qemu-yocto-fullbuild-dbg` running on `rv32gc-qemu-system` while building `libc` at step 4 "annotate".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/196/builds/167
<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_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Performing Test HAVE_PTHREAD_AFFINITY -- success
-- Configuring done (5.7s)
-- Generating done (5.8s)
-- Build files have been written to: /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build
@@@BUILD_STEP build libc@@@
Running: ninja libc
[1/29] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.mkdir.dir/mkdir.cpp.o
FAILED: projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.mkdir.dir/mkdir.cpp.o
/usr/local/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/projects/libc/src/sys/stat/linux -I/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/sys/stat/linux -I/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc -isystem /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/projects/libc/include -mabi=ilp32d -march=rv32imafdc --target=riscv32-unknown-linux-gnu --sysroot=/opt/riscv/sysroot --gcc-toolchain=/opt/riscv -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 -std=c++17 --target=riscv32-unknown-linux-gnu -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -idirafter=/usr/include -ffixed-point -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -MD -MT projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.mkdir.dir/mkdir.cpp.o -MF projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.mkdir.dir/mkdir.cpp.o.d -o projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.mkdir.dir/mkdir.cpp.o -c /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/sys/stat/linux/mkdir.cpp
/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/sys/stat/linux/mkdir.cpp:27:54: error: use of undeclared identifier 'AT_FDCWD'
27 | LIBC_NAMESPACE::syscall_impl<int>(SYS_mkdirat, AT_FDCWD, path, mode);
| ^
1 error generated.
[2/29] Building CXX object projects/libc/src/stdio/linux/CMakeFiles/libc.src.stdio.linux.remove.dir/remove.cpp.o
[3/29] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.chmod.dir/chmod.cpp.o
FAILED: projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.chmod.dir/chmod.cpp.o
/usr/local/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/projects/libc/src/sys/stat/linux -I/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/sys/stat/linux -I/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc -isystem /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/projects/libc/include -mabi=ilp32d -march=rv32imafdc --target=riscv32-unknown-linux-gnu --sysroot=/opt/riscv/sysroot --gcc-toolchain=/opt/riscv -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 -std=c++17 --target=riscv32-unknown-linux-gnu -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -idirafter=/usr/include -ffixed-point -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -MD -MT projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.chmod.dir/chmod.cpp.o -MF projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.chmod.dir/chmod.cpp.o.d -o projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.chmod.dir/chmod.cpp.o -c /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/sys/stat/linux/chmod.cpp
/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/sys/stat/linux/chmod.cpp:26:62: error: use of undeclared identifier 'AT_FDCWD'
26 | int ret = LIBC_NAMESPACE::syscall_impl<int>(SYS_fchmodat2, AT_FDCWD, path,
| ^
/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/sys/stat/linux/chmod.cpp:27:56: error: use of undeclared identifier 'AT_SYMLINK_NOFOLLOW'
27 | mode, 0, AT_SYMLINK_NOFOLLOW);
| ^
2 errors generated.
[4/29] Building CXX object projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.readlinkat.dir/readlinkat.cpp.o
[5/29] Building CXX object projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.symlinkat.dir/symlinkat.cpp.o
[6/29] Building CXX object projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.unlinkat.dir/unlinkat.cpp.o
[7/29] Building CXX object projects/libc/src/fcntl/linux/CMakeFiles/libc.src.fcntl.linux.creat.dir/creat.cpp.o
[8/29] Building CXX object projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.unlink.dir/unlink.cpp.o
[9/29] Building CXX object projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.access.dir/access.cpp.o
[10/29] Building CXX object projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.symlink.dir/symlink.cpp.o
[11/29] Building CXX object projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.readlink.dir/readlink.cpp.o
[12/29] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.fchmod.dir/fchmod.cpp.o
[13/29] Building CXX object projects/libc/src/fcntl/linux/CMakeFiles/libc.src.fcntl.linux.open.dir/open.cpp.o
[14/29] Building CXX object projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.rmdir.dir/rmdir.cpp.o
[15/29] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.lstat.dir/lstat.cpp.o
[16/29] Building CXX object projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.link.dir/link.cpp.o
[17/29] Building CXX object projects/libc/src/fcntl/linux/CMakeFiles/libc.src.fcntl.linux.openat.dir/openat.cpp.o
[18/29] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.stat.dir/stat.cpp.o
[19/29] Building CXX object projects/libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.linkat.dir/linkat.cpp.o
[20/29] Building CXX object projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/fcntl.cpp.o
[21/29] Building CXX object projects/libc/src/sys/stat/linux/CMakeFiles/libc.src.sys.stat.linux.fstat.dir/fstat.cpp.o
[22/29] Building CXX object projects/libc/src/spawn/linux/CMakeFiles/libc.src.spawn.linux.posix_spawn.dir/posix_spawn.cpp.o
FAILED: projects/libc/src/spawn/linux/CMakeFiles/libc.src.spawn.linux.posix_spawn.dir/posix_spawn.cpp.o
/usr/local/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/projects/libc/src/spawn/linux -I/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/spawn/linux -I/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc -isystem /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/projects/libc/include -mabi=ilp32d -march=rv32imafdc --target=riscv32-unknown-linux-gnu --sysroot=/opt/riscv/sysroot --gcc-toolchain=/opt/riscv -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 -std=c++17 --target=riscv32-unknown-linux-gnu -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -idirafter=/usr/include -ffixed-point -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -MD -MT projects/libc/src/spawn/linux/CMakeFiles/libc.src.spawn.linux.posix_spawn.dir/posix_spawn.cpp.o -MF projects/libc/src/spawn/linux/CMakeFiles/libc.src.spawn.linux.posix_spawn.dir/posix_spawn.cpp.o.d -o projects/libc/src/spawn/linux/CMakeFiles/libc.src.spawn.linux.posix_spawn.dir/posix_spawn.cpp.o -c /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/spawn/linux/posix_spawn.cpp
/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/spawn/linux/posix_spawn.cpp:43:58: error: use of undeclared identifier 'AT_FDCWD'
```
</details>
https://github.com/llvm/llvm-project/pull/113836
More information about the libc-commits
mailing list