[libc-commits] [libc] [libc] Add -Werror for libc tests (PR #160413)
LLVM Continuous Integration via libc-commits
libc-commits at lists.llvm.org
Wed Oct 22 11:34:44 PDT 2025
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `libc-aarch64-ubuntu-dbg` running on `libc-aarch64-ubuntu` while building `libc` at step 4 "annotate".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/104/builds/33996
<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)
...
[25/3610] Building CXX object libc/test/src/math/exhaustive/CMakeFiles/libc.test.src.math.exhaustive.atanf_test.__unit__.dir/atanf_test.cpp.o
[26/3610] Building CXX object libc/test/src/unistd/CMakeFiles/libc.test.src.unistd.isatty_test.__build__.dir/isatty_test.cpp.o
[27/3610] Building CXX object libc/test/src/unistd/CMakeFiles/libc.test.src.unistd.symlink_test.__build__.dir/symlink_test.cpp.o
[28/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.freelist_test.__unit__.__build__.dir/freelist_test.cpp.o
[29/3610] Building CXX object libc/test/src/unistd/CMakeFiles/libc.test.src.unistd.access_test.__build__.dir/access_test.cpp.o
[30/3610] Building CXX object libc/test/src/math/exhaustive/CMakeFiles/libc.test.src.math.exhaustive.acosf_test.__unit__.dir/acosf_test.cpp.o
[31/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.blockstore_test.__unit__.__build__.dir/blockstore_test.cpp.o
[32/3610] Building CXX object libc/test/src/math/exhaustive/CMakeFiles/libc.test.src.math.exhaustive.bfloat16_mul_test.__unit__.dir/bfloat16_mul_test.cpp.o
[33/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.str_to_float_test.__unit__.__build__.dir/str_to_long_double_test.cpp.o
[34/3610] Building CXX object libc/utils/MPFRWrapper/CMakeFiles/libcMPCommon.dir/MPCommon.cpp.o
FAILED: libc/utils/MPFRWrapper/CMakeFiles/libcMPCommon.dir/MPCommon.cpp.o
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wno-pass-failed -fdiagnostics-color -g -O3 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_DEFAULT -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_PLATFORM -fpie -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wstrict-prototypes -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wthread-safety -std=gnu++17 -MD -MT libc/utils/MPFRWrapper/CMakeFiles/libcMPCommon.dir/MPCommon.cpp.o -MF libc/utils/MPFRWrapper/CMakeFiles/libcMPCommon.dir/MPCommon.cpp.o.d -o libc/utils/MPFRWrapper/CMakeFiles/libcMPCommon.dir/MPCommon.cpp.o -c /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/utils/MPFRWrapper/MPCommon.cpp
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/utils/MPFRWrapper/MPCommon.cpp:508:15: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
int mod = mpfr_get_si(value_ret_exact.value, MPFR_RNDN);
~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[35/3610] Building CXX object libc/test/src/math/exhaustive/CMakeFiles/libc.test.src.math.exhaustive.bfloat16_test.__unit__.dir/bfloat16_test.cpp.o
[36/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.str_to_float_test.__unit__.__build__.dir/str_to_float_test.cpp.o
[37/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.memory_size_test.__unit__.__build__.dir/memory_size_test.cpp.o
[38/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.high_precision_decimal_test.__unit__.__build__.dir/high_precision_decimal_test.cpp.o
[39/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.str_to_float_test.__unit__.__build__.dir/str_to_double_test.cpp.o
[40/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.freestore_test.__unit__.__build__.dir/freestore_test.cpp.o
[41/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.freetrie_test.__unit__.__build__.dir/freetrie_test.cpp.o
[42/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.block_test.__unit__.__build__.dir/block_test.cpp.o
[43/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.fixedvector_test.__unit__.__build__.dir/fixedvector_test.cpp.o
[44/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.endian_internal_test.__unit__.__build__.dir/endian_internal_test.cpp.o
[45/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.math_extras_test.__unit__.__build__.dir/math_extras_test.cpp.o
[46/3610] Building CXX object libc/test/UnitTest/CMakeFiles/LibcTest.unit.dir/CmakeFilePath.cpp.o
[47/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.str_to_integer_test.__unit__.__build__.dir/str_to_integer_test.cpp.o
[48/3610] Building CXX object libc/utils/MPCWrapper/CMakeFiles/libcMPCWrapper.dir/MPCUtils.cpp.o
[49/3610] Building CXX object libc/test/UnitTest/CMakeFiles/LibcTest.unit.dir/LibcTest.cpp.o
[50/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.integer_to_string_test.__unit__.__build__.dir/integer_to_string_test.cpp.o
[51/3610] Building CXX object libc/utils/MPFRWrapper/CMakeFiles/libcMPFRWrapper.dir/MPFRUtils.cpp.o
ninja: build stopped: subcommand failed.
['ninja', 'libc-unit-tests'] 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 181, in step
yield
File "../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 154, in main
run_command(['ninja', 'libc-unit-tests'])
File "../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 196, in run_command
util.report_run_cmd(cmd, cwd=directory)
File "/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/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 '['ninja', 'libc-unit-tests']' returned non-zero exit status 1
@@@STEP_FAILURE@@@
Step 7 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[25/3610] Building CXX object libc/test/src/math/exhaustive/CMakeFiles/libc.test.src.math.exhaustive.atanf_test.__unit__.dir/atanf_test.cpp.o
[26/3610] Building CXX object libc/test/src/unistd/CMakeFiles/libc.test.src.unistd.isatty_test.__build__.dir/isatty_test.cpp.o
[27/3610] Building CXX object libc/test/src/unistd/CMakeFiles/libc.test.src.unistd.symlink_test.__build__.dir/symlink_test.cpp.o
[28/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.freelist_test.__unit__.__build__.dir/freelist_test.cpp.o
[29/3610] Building CXX object libc/test/src/unistd/CMakeFiles/libc.test.src.unistd.access_test.__build__.dir/access_test.cpp.o
[30/3610] Building CXX object libc/test/src/math/exhaustive/CMakeFiles/libc.test.src.math.exhaustive.acosf_test.__unit__.dir/acosf_test.cpp.o
[31/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.blockstore_test.__unit__.__build__.dir/blockstore_test.cpp.o
[32/3610] Building CXX object libc/test/src/math/exhaustive/CMakeFiles/libc.test.src.math.exhaustive.bfloat16_mul_test.__unit__.dir/bfloat16_mul_test.cpp.o
[33/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.str_to_float_test.__unit__.__build__.dir/str_to_long_double_test.cpp.o
[34/3610] Building CXX object libc/utils/MPFRWrapper/CMakeFiles/libcMPCommon.dir/MPCommon.cpp.o
FAILED: libc/utils/MPFRWrapper/CMakeFiles/libcMPCommon.dir/MPCommon.cpp.o
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wno-pass-failed -fdiagnostics-color -g -O3 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_DEFAULT -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_PLATFORM -fpie -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wstrict-prototypes -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wthread-safety -std=gnu++17 -MD -MT libc/utils/MPFRWrapper/CMakeFiles/libcMPCommon.dir/MPCommon.cpp.o -MF libc/utils/MPFRWrapper/CMakeFiles/libcMPCommon.dir/MPCommon.cpp.o.d -o libc/utils/MPFRWrapper/CMakeFiles/libcMPCommon.dir/MPCommon.cpp.o -c /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/utils/MPFRWrapper/MPCommon.cpp
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/utils/MPFRWrapper/MPCommon.cpp:508:15: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
int mod = mpfr_get_si(value_ret_exact.value, MPFR_RNDN);
~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[35/3610] Building CXX object libc/test/src/math/exhaustive/CMakeFiles/libc.test.src.math.exhaustive.bfloat16_test.__unit__.dir/bfloat16_test.cpp.o
[36/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.str_to_float_test.__unit__.__build__.dir/str_to_float_test.cpp.o
[37/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.memory_size_test.__unit__.__build__.dir/memory_size_test.cpp.o
[38/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.high_precision_decimal_test.__unit__.__build__.dir/high_precision_decimal_test.cpp.o
[39/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.str_to_float_test.__unit__.__build__.dir/str_to_double_test.cpp.o
[40/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.freestore_test.__unit__.__build__.dir/freestore_test.cpp.o
[41/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.freetrie_test.__unit__.__build__.dir/freetrie_test.cpp.o
[42/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.block_test.__unit__.__build__.dir/block_test.cpp.o
[43/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.fixedvector_test.__unit__.__build__.dir/fixedvector_test.cpp.o
[44/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.endian_internal_test.__unit__.__build__.dir/endian_internal_test.cpp.o
[45/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.math_extras_test.__unit__.__build__.dir/math_extras_test.cpp.o
[46/3610] Building CXX object libc/test/UnitTest/CMakeFiles/LibcTest.unit.dir/CmakeFilePath.cpp.o
[47/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.str_to_integer_test.__unit__.__build__.dir/str_to_integer_test.cpp.o
[48/3610] Building CXX object libc/utils/MPCWrapper/CMakeFiles/libcMPCWrapper.dir/MPCUtils.cpp.o
[49/3610] Building CXX object libc/test/UnitTest/CMakeFiles/LibcTest.unit.dir/LibcTest.cpp.o
[50/3610] Building CXX object libc/test/src/__support/CMakeFiles/libc.test.src.__support.integer_to_string_test.__unit__.__build__.dir/integer_to_string_test.cpp.o
[51/3610] Building CXX object libc/utils/MPFRWrapper/CMakeFiles/libcMPFRWrapper.dir/MPFRUtils.cpp.o
ninja: build stopped: subcommand failed.
['ninja', 'libc-unit-tests'] 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 181, in step
yield
File "../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 154, in main
run_command(['ninja', 'libc-unit-tests'])
File "../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 196, in run_command
util.report_run_cmd(cmd, cwd=directory)
File "/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/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 '['ninja', 'libc-unit-tests']' returned non-zero exit status 1
program finished with exit code 0
```
</details>
https://github.com/llvm/llvm-project/pull/160413
More information about the libc-commits
mailing list