cc1: some warnings being treated as errors CC=cc; CFLAGS=-pipe -march=native -fno-diagnostics-color -O2 -Werror=implicit-function-declaration -Werror=implicit-int; LIBS=; $CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5 configure:3285: error: Can't run the compiler - sorry configure: error: Can't run the compiler - sorry ## ---------------- ## ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.1_desktop_systemd-j4-20220916-160005 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-12.2.1 * clang/llvm (if any): /usr/lib/llvm/14 14.0.6 Python 3.10.6 Available Rust versions: [1] rust-bin-1.63.0 * php cli (if any): GNU Make 4.3 HEAD of ::gentoo commit 975d806a2a3cb93cc6bc059cdd90d42d84cbe6e1 Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Fri Sep 16 15:31:48 2022 +0000 2022-09-16 15:31:48 UTC emerge -qpvO sys-libs/readline [ebuild U ] sys-libs/readline-8.1_p2-r1 [8.1_p2] USE="(split-usr) (unicode) utils* -static-libs -verify-sig" ABI_X86="(64) -32 (-x32)"
Created attachment 805753 [details] emerge-info.txt
Created attachment 805756 [details] emerge-history.txt
Created attachment 805759 [details] environment
Created attachment 805762 [details] etc.portage.tar.bz2
Created attachment 805765 [details] logs.tar.bz2
Created attachment 805768 [details] sys-libs:readline-8.1_p2-r1:20220916-175415.log
checking for library containing strerror... none required conftest.c:9:1: error: return type defaults to 'int' [-Werror=implicit-int] 9 | main(){exit(0);} | ^~~~ conftest.c: In function 'main': conftest.c:9:8: error: implicit declaration of function 'exit' [-Werror=implicit-function-declaration] 9 | main(){exit(0);} | ^~~~ conftest.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit' +++ |+#include <stdlib.h> 1 | /* confdefs.h */ conftest.c:9:8: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] 9 | main(){exit(0);} | ^~~~ conftest.c:9:8: note: include '<stdlib.h>' or provide a declaration of 'exit' cc1: some warnings being treated as errors CC=cc; CFLAGS=-pipe -march=native -fno-diagnostics-color -O2 -Werror=implicit-function-declaration -Werror=implicit-int; LIBS=; $CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5
The newer version (8.2_p1) only has errors about prototypes: /var/tmp/portage/sys-libs/readline-8.2_p1/work/readline-8.2/text.c:1767:1: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] I have a patch ready for the issues of that version (haven't backported the fix for the error above yet).
Please ignore comment 8, I cannot reproduce both the error in that comment (comment 8) and i also cannot reproduce the error stated in the bug title with clang-common-15.0.6[stricter].
Created attachment 868978 [details] build.log (8.1_p2-r1) Builds just fine with current clang-16 toolchain. Probably obsolete?
I confirm that "-utils" works like a workaround for this c99 bug in readline. Thanks to Sam James in https://bugs.gentoo.org/919256
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f2879693f68d2a9a489d923ffd6e4ff96ec714b commit 5f2879693f68d2a9a489d923ffd6e4ff96ec714b Author: Gabi Falk <gabifalk@gmx.com> AuthorDate: 2024-05-09 23:15:00 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-05-11 00:26:39 +0000 sys-libs/readline: USE=utils: port to modern C (C99) GCC 14 enables -Werror=implicit-function-declaration and -Werror=implicit-int by default. Closes: https://bugs.gentoo.org/870424 Closes: https://bugs.gentoo.org/919256 Link: https://lists.gnu.org/archive/html/bug-readline/2024-05/msg00000.html Signed-off-by: Gabi Falk <gabifalk@gmx.com> Closes: https://github.com/gentoo/gentoo/pull/36621 Signed-off-by: Sam James <sam@gentoo.org> .../readline/files/readline-8.1-rlfe-c99.patch | 1201 ++++++++++++++++++++ sys-libs/readline/readline-8.1_p2-r1.ebuild | 2 +- sys-libs/readline/readline-8.1_p2-r2.ebuild | 2 +- sys-libs/readline/readline-8.2_p10.ebuild | 2 +- sys-libs/readline/readline-8.3_alpha.ebuild | 1 + sys-libs/readline/readline-9999.ebuild | 1 + 6 files changed, 1206 insertions(+), 3 deletions(-)