[libc-commits] [libc] [libc] Support %lc in printf (PR #169983)

LLVM Continuous Integration via libc-commits libc-commits at lists.llvm.org
Tue Jan 13 14:12:05 PST 2026


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `libc` at step 4 "annotate".

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

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

```
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --cmake-file=AMDGPULibcBot.cmake' (failure)
...
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/cmake/Modules/../../libc/src/stdio/printf_core/strerror_converter.h:15,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/cmake/Modules/../../libc/src/stdio/printf_core/converter.h:15,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/cmake/Modules/../../libc/src/__support/RPC/rpc_server.h:47,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/cmake/Modules/../../libc/shared/rpc_server.h:13,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/llvm/tools/llvm-gpu-loader/server.h:17,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/llvm/tools/llvm-gpu-loader/amdhsa.cpp:17:
/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/cmake/Modules/../../libc/src/stdio/printf_core/writer.h:49:30: warning: ‘maybe_unused’ attribute ignored [-Wattributes]
   49 |   [[maybe_unused]] WriteMode write_mode_;
      |                              ^~~~~~~~~~~
[4286/4884] Linking CXX executable bin/llvm-gpu-loader
FAILED: bin/llvm-gpu-loader 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/./lib  -Wl,--gc-sections tools/llvm-gpu-loader/CMakeFiles/llvm-gpu-loader.dir/llvm-gpu-loader.cpp.o tools/llvm-gpu-loader/CMakeFiles/llvm-gpu-loader.dir/amdhsa.cpp.o -o bin/llvm-gpu-loader  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/lib:/opt/rocm/lib:"  lib/libLLVMOption.so.23.0git  lib/libLLVMFrontendOffloading.so.23.0git  /opt/rocm/lib/libhsa-runtime64.so.1.14.60300  lib/libLLVMObject.so.23.0git  lib/libLLVMBinaryFormat.so.23.0git  lib/libLLVMTargetParser.so.23.0git  lib/libLLVMSupport.so.23.0git  -Wl,-rpath-link,/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/lib && :
/usr/bin/ld: tools/llvm-gpu-loader/CMakeFiles/llvm-gpu-loader.dir/amdhsa.cpp.o: in function `int __llvm_libc_common_utils::printf_core::convert<(__llvm_libc_common_utils::printf_core::WriteMode)0>(__llvm_libc_common_utils::printf_core::Writer<(__llvm_libc_common_utils::printf_core::WriteMode)0>*, __llvm_libc_common_utils::printf_core::FormatSection const&)':
amdhsa.cpp:(.text._ZN24__llvm_libc_common_utils11printf_core7convertILNS0_9WriteModeE0EEEiPNS0_6WriterIXT_EEERKNS0_13FormatSectionE[_ZN24__llvm_libc_common_utils11printf_core7convertILNS0_9WriteModeE0EEEiPNS0_6WriterIXT_EEERKNS0_13FormatSectionE]+0x556): undefined reference to `__llvm_libc_common_utils::internal::wcrtomb(char*, wchar_t, __llvm_libc_common_utils::internal::mbstate*)'
collect2: error: ld returned 1 exit status
[4287/4884] Building AMDGPUGenInstrInfo.inc...
[4288/4884] Building AMDGPUGenGlobalISel.inc...
[4289/4884] Building AMDGPUGenDAGISel.inc...
[4290/4884] Building AMDGPUGenAsmMatcher.inc...
[4291/4884] Building AMDGPUGenRegisterInfo.inc...
[4292/4884] Building AMDGPUGenRegisterBank.inc...
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 62, in step
    yield
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 53, in main
    run_command(["ninja"])
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 75, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/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 '['ninja']' returned non-zero exit status 1.
@@@STEP_FAILURE@@@
Step 7 (build cmake config) failure: build cmake config (failure)
...
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/cmake/Modules/../../libc/src/stdio/printf_core/strerror_converter.h:15,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/cmake/Modules/../../libc/src/stdio/printf_core/converter.h:15,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/cmake/Modules/../../libc/src/__support/RPC/rpc_server.h:47,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/cmake/Modules/../../libc/shared/rpc_server.h:13,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/llvm/tools/llvm-gpu-loader/server.h:17,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/llvm/tools/llvm-gpu-loader/amdhsa.cpp:17:
/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/cmake/Modules/../../libc/src/stdio/printf_core/writer.h:49:30: warning: ‘maybe_unused’ attribute ignored [-Wattributes]
   49 |   [[maybe_unused]] WriteMode write_mode_;
      |                              ^~~~~~~~~~~
[4286/4884] Linking CXX executable bin/llvm-gpu-loader
FAILED: bin/llvm-gpu-loader 
: && /usr/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/./lib  -Wl,--gc-sections tools/llvm-gpu-loader/CMakeFiles/llvm-gpu-loader.dir/llvm-gpu-loader.cpp.o tools/llvm-gpu-loader/CMakeFiles/llvm-gpu-loader.dir/amdhsa.cpp.o -o bin/llvm-gpu-loader  -Wl,-rpath,"\$ORIGIN/../lib:/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/lib:/opt/rocm/lib:"  lib/libLLVMOption.so.23.0git  lib/libLLVMFrontendOffloading.so.23.0git  /opt/rocm/lib/libhsa-runtime64.so.1.14.60300  lib/libLLVMObject.so.23.0git  lib/libLLVMBinaryFormat.so.23.0git  lib/libLLVMTargetParser.so.23.0git  lib/libLLVMSupport.so.23.0git  -Wl,-rpath-link,/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/lib && :
/usr/bin/ld: tools/llvm-gpu-loader/CMakeFiles/llvm-gpu-loader.dir/amdhsa.cpp.o: in function `int __llvm_libc_common_utils::printf_core::convert<(__llvm_libc_common_utils::printf_core::WriteMode)0>(__llvm_libc_common_utils::printf_core::Writer<(__llvm_libc_common_utils::printf_core::WriteMode)0>*, __llvm_libc_common_utils::printf_core::FormatSection const&)':
amdhsa.cpp:(.text._ZN24__llvm_libc_common_utils11printf_core7convertILNS0_9WriteModeE0EEEiPNS0_6WriterIXT_EEERKNS0_13FormatSectionE[_ZN24__llvm_libc_common_utils11printf_core7convertILNS0_9WriteModeE0EEEiPNS0_6WriterIXT_EEERKNS0_13FormatSectionE]+0x556): undefined reference to `__llvm_libc_common_utils::internal::wcrtomb(char*, wchar_t, __llvm_libc_common_utils::internal::mbstate*)'
collect2: error: ld returned 1 exit status
[4287/4884] Building AMDGPUGenInstrInfo.inc...
[4288/4884] Building AMDGPUGenGlobalISel.inc...
[4289/4884] Building AMDGPUGenDAGISel.inc...
[4290/4884] Building AMDGPUGenAsmMatcher.inc...
[4291/4884] Building AMDGPUGenRegisterInfo.inc...
[4292/4884] Building AMDGPUGenRegisterBank.inc...
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 62, in step
    yield
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 53, in main
    run_command(["ninja"])
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py", line 75, in run_command
    util.report_run_cmd(cmd, cwd=directory)
  File "/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/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 '['ninja']' returned non-zero exit status 1.
program finished with exit code 0
elapsedTime=48.825340

```

</details>

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


More information about the libc-commits mailing list