Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc] gcc build failures on github action runners #119266

Closed
SchrodingerZhu opened this issue Dec 9, 2024 · 3 comments
Closed

[libc] gcc build failures on github action runners #119266

SchrodingerZhu opened this issue Dec 9, 2024 · 3 comments

Comments

@SchrodingerZhu
Copy link
Contributor

These were spotted in #119104.

The first one is at https://github.com/llvm/llvm-project/actions/runs/12217700280/job/34082285018?pr=119104

In file included from /home/runner/work/llvm-project/llvm-project/libc/src/__support/OSUtil/linux/syscall.h:13,
                 from /home/runner/work/llvm-project/llvm-project/libc/src/__support/OSUtil/syscall.h:15,
                 from /home/runner/work/llvm-project/llvm-project/libc/src/unistd/linux/pread.cpp:11:
/home/runner/work/llvm-project/llvm-project/libc/src/unistd/linux/pread.cpp:21:29: error: ‘ssize_t __llvm_libc_20_0_0_git::pread(int, void*, size_t, off_t)’ aliased to external symbol ‘pread’
[ 92%] Built target libc.src.unistd.linux.lseek
   21 | LLVM_LIBC_FUNCTION(ssize_t, pread,
      |                             ^~~~~
/home/runner/work/llvm-project/llvm-project/libc/src/__support/common.h:46:34: note: in definition of macro ‘LLVM_LIBC_FUNCTION_IMPL’
   46 |   decltype(LIBC_NAMESPACE::name) name [[gnu::alias(#name)]];                   \
      |                                  ^~~~
/home/runner/work/llvm-project/llvm-project/libc/src/unistd/linux/pread.cpp:21:1: note: in expansion of macro ‘LLVM_LIBC_FUNCTION’
   21 | LLVM_LIBC_FUNCTION(ssize_t, pread,
      | ^~~~~~~~~~~~~~~~~~
gmake[2]: *** [libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.pread.dir/build.make:79: libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.pread.dir/pread.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:147979: libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.pread.dir/all] Error 2
[ 92%] Built target libc.src.unistd.linux.link
[ 92%] Built target libc.src.unistd.linux.pipe
[ 92%] Built target libc.src.unistd.linux.pwrite
[ 92%] Built target libc.src.unistd.linux.linkat
[ 92%] Built target libc.src.unistd.linux.pipe2
In file included from /home/runner/work/llvm-project/llvm-project/libc/src/__support/OSUtil/linux/syscall.h:13,
                 from /home/runner/work/llvm-project/llvm-project/libc/src/__support/OSUtil/syscall.h:15,
                 from /home/runner/work/llvm-project/llvm-project/libc/src/unistd/linux/readlinkat.cpp:11:
/home/runner/work/llvm-project/llvm-project/libc/src/unistd/linux/readlinkat.cpp:21:29: error: ‘ssize_t __llvm_libc_20_0_0_git::readlinkat(int, const char*, char*, size_t)’ aliased to external symbol ‘readlinkat’
   21 | LLVM_LIBC_FUNCTION(ssize_t, readlinkat,
      |                             ^~~~~~~~~~
/home/runner/work/llvm-project/llvm-project/libc/src/__support/common.h:46:34: note: in definition of macro ‘LLVM_LIBC_FUNCTION_IMPL’
   46 |   decltype(LIBC_NAMESPACE::name) name [[gnu::alias(#name)]];                   \
      |                                  ^~~~
/home/runner/work/llvm-project/llvm-project/libc/src/unistd/linux/readlinkat.cpp:21:1: note: in expansion of macro ‘LLVM_LIBC_FUNCTION’
   21 | LLVM_LIBC_FUNCTION(ssize_t, readlinkat,
      | ^~~~~~~~~~~~~~~~~~
/home/runner/work/llvm-project/llvm-project/libc/src/unistd/linux/readlinkat.cpp:21:29: error: ‘ssize_t __llvm_libc_20_0_0_git::readlinkat(int, const char*, char*, size_t)’ specifies less restrictive attributes than its target ‘ssize_t readlinkat(int, const char*, char*, size_t)’: ‘leaf’, ‘nonnull’, ‘nothrow’ [-Werror=missing-attributes]
   21 | LLVM_LIBC_FUNCTION(ssize_t, readlinkat,
      |                             ^~~~~~~~~~
/home/runner/work/llvm-project/llvm-project/libc/src/__support/common.h:46:34: note: in definition of macro ‘LLVM_LIBC_FUNCTION_IMPL’
   46 |   decltype(LIBC_NAMESPACE::name) name [[gnu::alias(#name)]];                   \
      |                                  ^~~~
/home/runner/work/llvm-project/llvm-project/libc/src/unistd/linux/readlinkat.cpp:21:1: note: in expansion of macro ‘LLVM_LIBC_FUNCTION’
   21 | LLVM_LIBC_FUNCTION(ssize_t, readlinkat,
      | ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/features.h:486,
                 from /usr/include/unistd.h:25,
                 from /home/runner/work/llvm-project/llvm-project/libc/src/unistd/readlinkat.h:13,
                 from /home/runner/work/llvm-project/llvm-project/libc/src/unistd/linux/readlinkat.cpp:9:
/usr/include/x86_64-linux-gnu/bits/unistd.h:144:1: note: ‘ssize_t __llvm_libc_20_0_0_git::readlinkat(int, const char*, char*, size_t)’ target declared here
  144 | __NTH (readlinkat (int __fd, const char *__restrict __path,
      | ^~~~~
cc1plus: all warnings being treated as errors
gmake[2]: *** [libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.readlinkat.dir/build.make:79: libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.readlinkat.dir/readlinkat.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:148299: libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.readlinkat.dir/all] Error 2
[ 92%] Built target libc.src.unistd.linux.rmdir
In file included from /home/runner/work/llvm-project/llvm-project/libc/src/__support/OSUtil/linux/syscall.h:13,
                 from /home/runner/work/llvm-project/llvm-project/libc/src/__support/OSUtil/syscall.h:15,
                 from /home/runner/work/llvm-project/llvm-project/libc/src/unistd/linux/readlink.cpp:11:
/home/runner/work/llvm-project/llvm-project/libc/src/unistd/linux/readlink.cpp:21:29: error: ‘ssize_t __llvm_libc_20_0_0_git::readlink(const char*, char*, size_t)’ aliased to external symbol ‘readlink’
   21 | LLVM_LIBC_FUNCTION(ssize_t, readlink,
      |                             ^~~~~~~~
/home/runner/work/llvm-project/llvm-project/libc/src/__support/common.h:46:34: note: in definition of macro ‘LLVM_LIBC_FUNCTION_IMPL’
   46 |   decltype(LIBC_NAMESPACE::name) name [[gnu::alias(#name)]];                   \
      |                                  ^~~~
/home/runner/work/llvm-project/llvm-project/libc/src/unistd/linux/readlink.cpp:21:1: note: in expansion of macro ‘LLVM_LIBC_FUNCTION’
   21 | LLVM_LIBC_FUNCTION(ssize_t, readlink,
      | ^~~~~~~~~~~~~~~~~~
/home/runner/work/llvm-project/llvm-project/libc/src/unistd/linux/readlink.cpp:21:29: error: ‘ssize_t __llvm_libc_20_0_0_git::readlink(const char*, char*, size_t)’ specifies less restrictive attributes than its target ‘ssize_t readlink(const char*, char*, size_t)’: ‘leaf’, ‘nonnull’, ‘nothrow’ [-Werror=missing-attributes]
   21 | LLVM_LIBC_FUNCTION(ssize_t, readlink,
      |                             ^~~~~~~~
/home/runner/work/llvm-project/llvm-project/libc/src/__support/common.h:46:34: note: in definition of macro ‘LLVM_LIBC_FUNCTION_IMPL’
   46 |   decltype(LIBC_NAMESPACE::name) name [[gnu::alias(#name)]];                   \
      |                                  ^~~~
/home/runner/work/llvm-project/llvm-project/libc/src/unistd/linux/readlink.cpp:21:1: note: in expansion of macro ‘LLVM_LIBC_FUNCTION’
   21 | LLVM_LIBC_FUNCTION(ssize_t, readlink,
      | ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/features.h:486,
                 from /usr/include/unistd.h:25,
                 from /home/runner/work/llvm-project/llvm-project/libc/src/unistd/readlink.h:13,
                 from /home/runner/work/llvm-project/llvm-project/libc/src/unistd/linux/readlink.cpp:9:
/usr/include/x86_64-linux-gnu/bits/unistd.h:116:1: note: ‘ssize_t __llvm_libc_20_0_0_git::readlink(const char*, char*, size_t)’ target declared here
  116 | __NTH (readlink (const char *__restrict __path, char *__restrict __buf,
      | ^~~~~
cc1plus: all warnings being treated as errors
gmake[2]: *** [libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.readlink.dir/build.make:79: libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.readlink.dir/readlink.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:148235: libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.readlink.dir/all] Error 2
[ 92%] Built target libc.src.unistd.linux.symlinkat
[ 92%] Built target libc.src.unistd.linux.symlink
[ 92%] Built target libc.src.unistd.linux.unlinkat
[ 92%] Built target libc.src.unistd.linux.truncate
In file included from /home/runner/work/llvm-project/llvm-project/libc/src/__support/OSUtil/linux/syscall.h:13,
                 from /home/runner/work/llvm-project/llvm-project/libc/src/__support/OSUtil/syscall.h:15,
                 from /home/runner/work/llvm-project/llvm-project/libc/src/unistd/linux/getcwd.cpp:11:
/home/runner/work/llvm-project/llvm-project/libc/src/unistd/linux/getcwd.cpp:38:28: error: ‘char* __llvm_libc_20_0_0_git::getcwd(char*, size_t)’ aliased to external symbol ‘getcwd’
   38 | LLVM_LIBC_FUNCTION(char *, getcwd, (char *buf, size_t size)) {
      |                            ^~~~~~
/home/runner/work/llvm-project/llvm-project/libc/src/__support/common.h:46:34: note: in definition of macro ‘LLVM_LIBC_FUNCTION_IMPL’
   46 |   decltype(LIBC_NAMESPACE::name) name [[gnu::alias(#name)]];                   \
      |                                  ^~~~
/home/runner/work/llvm-project/llvm-project/libc/src/unistd/linux/getcwd.cpp:38:1: note: in expansion of macro ‘LLVM_LIBC_FUNCTION’
   38 | LLVM_LIBC_FUNCTION(char *, getcwd, (char *buf, size_t size)) {
      | ^~~~~~~~~~~~~~~~~~
/home/runner/work/llvm-project/llvm-project/libc/src/unistd/linux/getcwd.cpp:38:28: error: ‘char* __llvm_libc_20_0_0_git::getcwd(char*, size_t)’ specifies less restrictive attributes than its target ‘char* getcwd(char*, size_t)’: ‘leaf’, ‘nothrow’ [-Werror=missing-attributes]
   38 | LLVM_LIBC_FUNCTION(char *, getcwd, (char *buf, size_t size)) {
      |                            ^~~~~~
/home/runner/work/llvm-project/llvm-project/libc/src/__support/common.h:46:34: note: in definition of macro ‘LLVM_LIBC_FUNCTION_IMPL’
   46 |   decltype(LIBC_NAMESPACE::name) name [[gnu::alias(#name)]];                   \
      |                                  ^~~~
/home/runner/work/llvm-project/llvm-project/libc/src/unistd/linux/getcwd.cpp:38:1: note: in expansion of macro ‘LLVM_LIBC_FUNCTION’
   38 | LLVM_LIBC_FUNCTION(char *, getcwd, (char *buf, size_t size)) {
      | ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/features.h:486,
                 from /usr/include/unistd.h:25,
                 from /home/runner/work/llvm-project/llvm-project/libc/src/unistd/getcwd.h:13,
                 from /home/runner/work/llvm-project/llvm-project/libc/src/unistd/linux/getcwd.cpp:9:
/usr/include/x86_64-linux-gnu/bits/unistd.h:164:1: note: ‘char* __llvm_libc_20_0_0_git::getcwd(char*, size_t)’ target declared here
  164 | __NTH (getcwd (char *__buf, size_t __size))
      | ^~~~~
cc1plus: all warnings being treated as errors
gmake[2]: *** [libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getcwd.dir/build.make:79: libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getcwd.dir/getcwd.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:147175: libc/src/unistd/linux/CMakeFiles/libc.src.unistd.linux.getcwd.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

The second one is at https://github.com/llvm/llvm-project/actions/runs/12218362957/job/34083763790?pr=119104

FAILED: libc/src/math/generic/CMakeFiles/libc.src.math.generic.sinf16.dir/sinf16.cpp.o 
sccache /usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -I/home/runner/work/llvm-project/llvm-project/libc -isystem /home/runner/work/llvm-project/llvm-project/build/libc/include -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O2 -g -DNDEBUG -std=gnu++17 -mavx2 -mfma -msse4.2 -D__LIBC_USE_BUILTIN_CEIL_FLOOR_RINT_TRUNC -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -isystem/usr/lib/gcc/x86_64-linux-gnu/13//include -nostdinc -idirafter/usr/include -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 -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -fext-numeric-literals -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -O3 -DLIBC_COPT_PUBLIC_PACKAGING -MD -MT libc/src/math/generic/CMakeFiles/libc.src.math.generic.sinf16.dir/sinf16.cpp.o -MF libc/src/math/generic/CMakeFiles/libc.src.math.generic.sinf16.dir/sinf16.cpp.o.d -o libc/src/math/generic/CMakeFiles/libc.src.math.generic.sinf16.dir/sinf16.cpp.o -c /home/runner/work/llvm-project/llvm-project/libc/src/math/generic/sinf16.cpp
In file included from /home/runner/work/llvm-project/llvm-project/libc/src/math/generic/sinf16.cpp:16:
/home/runner/work/llvm-project/llvm-project/libc/src/__support/FPUtil/except_value_utils.h: In instantiation of ‘constexpr __llvm_libc_20_0_0_git::cpp::optional<T> __llvm_libc_20_0_0_git::fputil::ExceptValues<T, N>::lookup_odd(StorageType, bool) const [with T = _Float16; long unsigned int N = 4; StorageType = short unsigned int]’:
/home/runner/work/llvm-project/llvm-project/libc/src/math/generic/sinf16.cpp:60:43:   required from here
/home/runner/work/llvm-project/llvm-project/libc/src/__support/FPUtil/except_value_utils.h:84:20: error: conversion from ‘int’ to ‘__llvm_libc_20_0_0_git::fputil::ExceptValues<_Float16, 4>::StorageType’ {aka ‘short unsigned int’} may change value [-Werror=conversion]
   84 |           out_bits += sign ? values[i].rnd_downward_offset
      |           ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   85 |                            : values[i].rnd_upward_offset;
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/llvm-project/llvm-project/libc/src/__support/FPUtil/except_value_utils.h:88:20: error: conversion from ‘int’ to ‘__llvm_libc_20_0_0_git::fputil::ExceptValues<_Float16, 4>::StorageType’ {aka ‘short unsigned int’} may change value [-Werror=conversion]
   88 |           out_bits += sign ? values[i].rnd_upward_offset
      |           ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   89 |                            : values[i].rnd_downward_offset;
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
@nickdesaulniers
Copy link
Member

The second one seems straightforward to fix.

The first one is a duplicate of #60481.

@SchrodingerZhu
Copy link
Contributor Author

In that case, once these are fixed, it seems good to enable the gcc ci to capture future build issues like this.

@nickdesaulniers
Copy link
Member

Let's track the second issue at #120427.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants