[libc-commits] [libc] [libc] Templatize the scanf Reader interface (PR #131037)

LLVM Continuous Integration via libc-commits libc-commits at lists.llvm.org
Tue Mar 18 00:04:05 PDT 2025


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 5 "compile-openmp".

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

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

```
Step 5 (compile-openmp) failure: build (failure)
...
0.948 [360/34/299] Building CXX object libc/src/stdio/gpu/CMakeFiles/libc.src.stdio.gpu.fgets.dir/fgets.cpp.o
0.953 [359/34/300] Building CXX object libc/src/stdio/gpu/CMakeFiles/libc.src.stdio.gpu.fread.dir/fread.cpp.o
0.967 [358/34/301] Building CXX object libc/src/stdio/gpu/CMakeFiles/libc.src.stdio.gpu.getchar.dir/getchar.cpp.o
0.979 [357/34/302] Building CXX object libc/src/stdio/gpu/CMakeFiles/libc.src.stdio.gpu.fgetc.dir/fgetc.cpp.o
0.980 [356/34/303] Building CXX object libc/src/stdio/gpu/CMakeFiles/libc.src.stdio.gpu.remove.dir/remove.cpp.o
0.982 [355/34/304] Building CXX object libc/src/stdio/gpu/CMakeFiles/libc.src.stdio.gpu.getc.dir/getc.cpp.o
0.993 [354/34/305] Building CXX object libc/src/stdio/gpu/CMakeFiles/libc.src.stdio.gpu.rename.dir/rename.cpp.o
1.009 [353/34/306] Building CXX object libc/src/stdio/gpu/CMakeFiles/libc.src.stdio.gpu.putchar.dir/putchar.cpp.o
1.011 [352/34/307] Building CXX object libc/src/stdio/gpu/CMakeFiles/libc.src.stdio.gpu.fclose.dir/fclose.cpp.o
1.022 [351/34/308] Building CXX object libc/src/stdio/CMakeFiles/libc.src.stdio.fscanf.dir/fscanf.cpp.o
FAILED: libc/src/stdio/CMakeFiles/libc.src.stdio.fscanf.dir/fscanf.cpp.o 
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./bin/clang++ --target=amdgcn-amd-amdhsa -DLIBC_NAMESPACE=__llvm_libc_21_0_0_git -D__LIBC_USE_FLOAT16_CONVERSION -I/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc -isystem /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/include/amdgcn-amd-amdhsa -O3 -DNDEBUG --target=amdgcn-amd-amdhsa -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS "-DLIBC_MATH=(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES | LIBC_MATH_NO_ERRNO | LIBC_MATH_NO_EXCEPT)" -fpie -DLIBC_FULL_BUILD -nostdlibinc -ffixed-point -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 -nogpulib -fvisibility=hidden -fconvergent-functions -flto -Wno-multi-gpu -Xclang -mcode-object-version=none -DLIBC_COPT_PUBLIC_PACKAGING -UNDEBUG -DLIBC_COPT_SCANF_DISABLE_FLOAT -DLIBC_COPT_SCANF_DISABLE_INDEX_MODE -MD -MT libc/src/stdio/CMakeFiles/libc.src.stdio.fscanf.dir/fscanf.cpp.o -MF libc/src/stdio/CMakeFiles/libc.src.stdio.fscanf.dir/fscanf.cpp.o.d -o libc/src/stdio/CMakeFiles/libc.src.stdio.fscanf.dir/fscanf.cpp.o -c /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/fscanf.cpp
In file included from /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/fscanf.cpp:14:
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/scanf_core/vfscanf_internal.h:41:42: error: no member named 'getc' in namespace '__llvm_libc_21_0_0_git'; did you mean simply 'getc'?
   41 | LIBC_INLINE int getc(::FILE *f) { return LIBC_NAMESPACE::getc(f); }
      |                                          ^~~~~~~~~~~~~~~~~~~~
      |                                          getc
<command line>:1:24: note: expanded from macro 'LIBC_NAMESPACE'
    1 | #define LIBC_NAMESPACE __llvm_libc_21_0_0_git
      |                        ^
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/scanf_core/vfscanf_internal.h:41:17: note: 'getc' declared here
   41 | LIBC_INLINE int getc(::FILE *f) { return LIBC_NAMESPACE::getc(f); }
      |                 ^
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/scanf_core/vfscanf_internal.h:43:45: error: no member named 'ungetc' in namespace '__llvm_libc_21_0_0_git'; did you mean simply 'ungetc'?
   43 | LIBC_INLINE void ungetc(int c, ::FILE *f) { LIBC_NAMESPACE::ungetc(c, f); }
      |                                             ^~~~~~~~~~~~~~~~~~~~~~
      |                                             ungetc
<command line>:1:24: note: expanded from macro 'LIBC_NAMESPACE'
    1 | #define LIBC_NAMESPACE __llvm_libc_21_0_0_git
      |                        ^
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/scanf_core/vfscanf_internal.h:43:18: note: 'ungetc' declared here
   43 | LIBC_INLINE void ungetc(int c, ::FILE *f) { LIBC_NAMESPACE::ungetc(c, f); }
      |                  ^
2 errors generated.
1.023 [351/33/309] Building CXX object libc/src/stdio/CMakeFiles/libc.src.stdio.vscanf.dir/vscanf.cpp.o
FAILED: libc/src/stdio/CMakeFiles/libc.src.stdio.vscanf.dir/vscanf.cpp.o 
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/./bin/clang++ --target=amdgcn-amd-amdhsa -DLIBC_NAMESPACE=__llvm_libc_21_0_0_git -D__LIBC_USE_FLOAT16_CONVERSION -I/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc -isystem /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/include/amdgcn-amd-amdhsa -O3 -DNDEBUG --target=amdgcn-amd-amdhsa -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS "-DLIBC_MATH=(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES | LIBC_MATH_NO_ERRNO | LIBC_MATH_NO_EXCEPT)" -fpie -DLIBC_FULL_BUILD -nostdlibinc -ffixed-point -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 -nogpulib -fvisibility=hidden -fconvergent-functions -flto -Wno-multi-gpu -Xclang -mcode-object-version=none -DLIBC_COPT_PUBLIC_PACKAGING -UNDEBUG -DLIBC_COPT_SCANF_DISABLE_FLOAT -DLIBC_COPT_SCANF_DISABLE_INDEX_MODE -MD -MT libc/src/stdio/CMakeFiles/libc.src.stdio.vscanf.dir/vscanf.cpp.o -MF libc/src/stdio/CMakeFiles/libc.src.stdio.vscanf.dir/vscanf.cpp.o.d -o libc/src/stdio/CMakeFiles/libc.src.stdio.vscanf.dir/vscanf.cpp.o -c /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/vscanf.cpp
In file included from /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/vscanf.cpp:14:
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/scanf_core/vfscanf_internal.h:41:42: error: no member named 'getc' in namespace '__llvm_libc_21_0_0_git'; did you mean simply 'getc'?
   41 | LIBC_INLINE int getc(::FILE *f) { return LIBC_NAMESPACE::getc(f); }
      |                                          ^~~~~~~~~~~~~~~~~~~~
      |                                          getc
<command line>:1:24: note: expanded from macro 'LIBC_NAMESPACE'
    1 | #define LIBC_NAMESPACE __llvm_libc_21_0_0_git
      |                        ^
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/scanf_core/vfscanf_internal.h:41:17: note: 'getc' declared here
   41 | LIBC_INLINE int getc(::FILE *f) { return LIBC_NAMESPACE::getc(f); }
      |                 ^
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/libc/src/stdio/scanf_core/vfscanf_internal.h:43:45: error: no member named 'ungetc' in namespace '__llvm_libc_21_0_0_git'; did you mean simply 'ungetc'?

```

</details>

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


More information about the libc-commits mailing list