[libc-commits] [libc] [libc] Add strftime_l (PR #127708)
LLVM Continuous Integration via libc-commits
libc-commits at lists.llvm.org
Wed Feb 19 00:08:43 PST 2025
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `fuchsia-x86_64-linux` running on `fuchsia-debian-64-us-central1-a-1` while building `libc` at step 4 "annotate".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/12827
<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/fuchsia-linux.py ...' (failure)
...
[625/2826] Building CXX object libc/src/fenv/CMakeFiles/libc.src.fenv.fesetexcept.dir/fesetexcept.cpp.obj
[626/2826] Building CXX object libc/src/fenv/CMakeFiles/libc.src.fenv.fesetexceptflag.dir/fesetexceptflag.cpp.obj
[627/2826] Building CXX object libc/src/fenv/CMakeFiles/libc.src.fenv.feholdexcept.dir/feholdexcept.cpp.obj
[628/2826] Building CXX object libc/src/fenv/CMakeFiles/libc.src.fenv.feupdateenv.dir/feupdateenv.cpp.obj
[629/2826] Building CXX object libc/src/fenv/CMakeFiles/libc.src.fenv.fegetexcept.dir/fegetexcept.cpp.obj
[630/2826] Building CXX object libc/src/stdlib/baremetal/CMakeFiles/libc.src.stdlib.baremetal.free.dir/free.cpp.obj
[631/2826] Building CXX object libc/src/stdlib/baremetal/CMakeFiles/libc.src.stdlib.baremetal.aligned_alloc.dir/aligned_alloc.cpp.obj
[632/2826] Building CXX object libc/src/stdlib/baremetal/CMakeFiles/libc.src.stdlib.baremetal.malloc.dir/malloc.cpp.obj
[633/2826] Building CXX object libc/src/stdlib/baremetal/CMakeFiles/libc.src.stdlib.baremetal.calloc.dir/calloc.cpp.obj
[634/2826] Building CXX object libc/src/time/CMakeFiles/libc.src.time.strftime_l.dir/strftime_l.cpp.obj
FAILED: libc/src/time/CMakeFiles/libc.src.time.strftime_l.dir/strftime_l.cpp.obj
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-e3dpa0gw/bin/clang++ --target=armv6m-none-eabi -DLIBC_NAMESPACE=__llvm_libc_21_0_0_git -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc -isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-e3dpa0gw/include/armv6m-unknown-none-eabi --target=armv6m-none-eabi -Wno-atomic-alignment "-Dvfprintf(stream, format, vlist)=vprintf(format, vlist)" "-Dfprintf(stream, format, ...)=printf(format)" -D_LIBCPP_PRINT=1 -mthumb -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 -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -ffunction-sections -fdata-sections -ffile-prefix-map=/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-e3dpa0gw/runtimes/runtimes-armv6m-none-eabi-bins=../../../../llvm-project -ffile-prefix-map=/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/= -no-canonical-prefixes -Os -DNDEBUG -std=gnu++17 --target=armv6m-none-eabi -DLIBC_QSORT_IMPL=LIBC_QSORT_HEAP_SORT -DLIBC_TYPES_TIME_T_IS_32_BIT -DLIBC_ADD_NULL_CHECKS "-DLIBC_MATH=(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES)" -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -ffixed-point -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -MD -MT libc/src/time/CMakeFiles/libc.src.time.strftime_l.dir/strftime_l.cpp.obj -MF libc/src/time/CMakeFiles/libc.src.time.strftime_l.dir/strftime_l.cpp.obj.d -o libc/src/time/CMakeFiles/libc.src.time.strftime_l.dir/strftime_l.cpp.obj -c /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:25:40: error: use of undeclared identifier 'buffsz'; did you mean 'buffer'?
25 | printf_core::WriteBuffer wb(buffer, (buffsz > 0 ? buffsz - 1 : 0));
| ^~~~~~
| buffer
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:22:38: note: 'buffer' declared here
22 | (char *__restrict buffer, size_t count,
| ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:25:47: error: ordered comparison between pointer and zero ('char *' and 'int')
25 | printf_core::WriteBuffer wb(buffer, (buffsz > 0 ? buffsz - 1 : 0));
| ~~~~~~ ^ ~
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:25:53: error: use of undeclared identifier 'buffsz'; did you mean 'buffer'?
25 | printf_core::WriteBuffer wb(buffer, (buffsz > 0 ? buffsz - 1 : 0));
| ^~~~~~
| buffer
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:22:38: note: 'buffer' declared here
22 | (char *__restrict buffer, size_t count,
| ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:27:59: error: use of undeclared identifier 'timeptr'
27 | int ret = strftime_core::strftime_main(&writer, format, timeptr);
| ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:28:7: error: use of undeclared identifier 'buffsz'; did you mean 'buffer'?
28 | if (buffsz > 0) // if the buffsz is 0 the buffer may be a null pointer.
| ^~~~~~
| buffer
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:22:38: note: 'buffer' declared here
22 | (char *__restrict buffer, size_t count,
| ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:28:14: error: ordered comparison between pointer and zero ('char *' and 'int')
28 | if (buffsz > 0) // if the buffsz is 0 the buffer may be a null pointer.
| ~~~~~~ ^ ~
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:30:49: error: use of undeclared identifier 'buffsz'
30 | return (ret < 0 || static_cast<size_t>(ret) > buffsz) ? 0 : ret;
| ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:22:53: error: unused parameter 'count' [-Werror,-Wunused-parameter]
22 | (char *__restrict buffer, size_t count,
| ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:24:49: error: unused parameter 'tp' [-Werror,-Wunused-parameter]
Step 6 (build) failure: build (failure)
...
[625/2826] Building CXX object libc/src/fenv/CMakeFiles/libc.src.fenv.fesetexcept.dir/fesetexcept.cpp.obj
[626/2826] Building CXX object libc/src/fenv/CMakeFiles/libc.src.fenv.fesetexceptflag.dir/fesetexceptflag.cpp.obj
[627/2826] Building CXX object libc/src/fenv/CMakeFiles/libc.src.fenv.feholdexcept.dir/feholdexcept.cpp.obj
[628/2826] Building CXX object libc/src/fenv/CMakeFiles/libc.src.fenv.feupdateenv.dir/feupdateenv.cpp.obj
[629/2826] Building CXX object libc/src/fenv/CMakeFiles/libc.src.fenv.fegetexcept.dir/fegetexcept.cpp.obj
[630/2826] Building CXX object libc/src/stdlib/baremetal/CMakeFiles/libc.src.stdlib.baremetal.free.dir/free.cpp.obj
[631/2826] Building CXX object libc/src/stdlib/baremetal/CMakeFiles/libc.src.stdlib.baremetal.aligned_alloc.dir/aligned_alloc.cpp.obj
[632/2826] Building CXX object libc/src/stdlib/baremetal/CMakeFiles/libc.src.stdlib.baremetal.malloc.dir/malloc.cpp.obj
[633/2826] Building CXX object libc/src/stdlib/baremetal/CMakeFiles/libc.src.stdlib.baremetal.calloc.dir/calloc.cpp.obj
[634/2826] Building CXX object libc/src/time/CMakeFiles/libc.src.time.strftime_l.dir/strftime_l.cpp.obj
FAILED: libc/src/time/CMakeFiles/libc.src.time.strftime_l.dir/strftime_l.cpp.obj
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-e3dpa0gw/bin/clang++ --target=armv6m-none-eabi -DLIBC_NAMESPACE=__llvm_libc_21_0_0_git -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc -isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-e3dpa0gw/include/armv6m-unknown-none-eabi --target=armv6m-none-eabi -Wno-atomic-alignment "-Dvfprintf(stream, format, vlist)=vprintf(format, vlist)" "-Dfprintf(stream, format, ...)=printf(format)" -D_LIBCPP_PRINT=1 -mthumb -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 -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -ffunction-sections -fdata-sections -ffile-prefix-map=/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-e3dpa0gw/runtimes/runtimes-armv6m-none-eabi-bins=../../../../llvm-project -ffile-prefix-map=/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/= -no-canonical-prefixes -Os -DNDEBUG -std=gnu++17 --target=armv6m-none-eabi -DLIBC_QSORT_IMPL=LIBC_QSORT_HEAP_SORT -DLIBC_TYPES_TIME_T_IS_32_BIT -DLIBC_ADD_NULL_CHECKS "-DLIBC_MATH=(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES)" -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -ffixed-point -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -MD -MT libc/src/time/CMakeFiles/libc.src.time.strftime_l.dir/strftime_l.cpp.obj -MF libc/src/time/CMakeFiles/libc.src.time.strftime_l.dir/strftime_l.cpp.obj.d -o libc/src/time/CMakeFiles/libc.src.time.strftime_l.dir/strftime_l.cpp.obj -c /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:25:40: error: use of undeclared identifier 'buffsz'; did you mean 'buffer'?
25 | printf_core::WriteBuffer wb(buffer, (buffsz > 0 ? buffsz - 1 : 0));
| ^~~~~~
| buffer
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:22:38: note: 'buffer' declared here
22 | (char *__restrict buffer, size_t count,
| ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:25:47: error: ordered comparison between pointer and zero ('char *' and 'int')
25 | printf_core::WriteBuffer wb(buffer, (buffsz > 0 ? buffsz - 1 : 0));
| ~~~~~~ ^ ~
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:25:53: error: use of undeclared identifier 'buffsz'; did you mean 'buffer'?
25 | printf_core::WriteBuffer wb(buffer, (buffsz > 0 ? buffsz - 1 : 0));
| ^~~~~~
| buffer
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:22:38: note: 'buffer' declared here
22 | (char *__restrict buffer, size_t count,
| ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:27:59: error: use of undeclared identifier 'timeptr'
27 | int ret = strftime_core::strftime_main(&writer, format, timeptr);
| ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:28:7: error: use of undeclared identifier 'buffsz'; did you mean 'buffer'?
28 | if (buffsz > 0) // if the buffsz is 0 the buffer may be a null pointer.
| ^~~~~~
| buffer
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:22:38: note: 'buffer' declared here
22 | (char *__restrict buffer, size_t count,
| ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:28:14: error: ordered comparison between pointer and zero ('char *' and 'int')
28 | if (buffsz > 0) // if the buffsz is 0 the buffer may be a null pointer.
| ~~~~~~ ^ ~
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:30:49: error: use of undeclared identifier 'buffsz'
30 | return (ret < 0 || static_cast<size_t>(ret) > buffsz) ? 0 : ret;
| ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:22:53: error: unused parameter 'count' [-Werror,-Wunused-parameter]
22 | (char *__restrict buffer, size_t count,
| ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/time/strftime_l.cpp:24:49: error: unused parameter 'tp' [-Werror,-Wunused-parameter]
```
</details>
https://github.com/llvm/llvm-project/pull/127708
More information about the libc-commits
mailing list