clang -pipe -march=native -fno-diagnostics-color -O2 -Werror=implicit-function-declaration -Werror=implicit-int -I/usr/include/libxml2 -I.. -c -o process.o process.c clang -pipe -march=native -fno-diagnostics-color -O2 -Werror=implicit-function-declaration -Werror=implicit-int -I/usr/include/libxml2 -I.. -c -o utils-expression.o utils-expression.c clang -pipe -march=native -fno-diagnostics-color -O2 -Werror=implicit-function-declaration -Werror=implicit-int -I/usr/include/libxml2 -I.. -I. -c lex.yy.c ./calc.lex:65:16: error: call to undeclared library function 'strdup' with type 'char *(const char *)'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] yylval.txt = strdup(yytext); ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.1-j4-20221203-182649 ------------------------------------------------------------------- GNUMAKEFLAGS="$GNUMAKEFLAGS --jobserver-style=pipe" GNUMAKEFLAGS="$GNUMAKEFLAGS --shuffle" CC=clang CXX=clang++ gcc-config -l: [1] x86_64-pc-linux-gnu-12 * clang/llvm (if any): clang version 15.0.6 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/15/bin Configuration file: /etc/clang/clang.cfg /usr/lib/llvm/15 15.0.6 Python 3.10.8 Available Rust versions: [1] rust-bin-1.65.0 * The following VMs are available for generation-2: *) Eclipse Temurin JDK 17.0.5_p8 [openjdk-bin-17] 2) Eclipse Temurin JDK 8.352_p08 [openjdk-bin-8] Available Java Virtual Machines: [1] openjdk-bin-8 [2] openjdk-bin-17 system-vm php cli (if any): HEAD of ::gentoo commit 53149af4168b71f07ba6492d9dbafcd4941b071a Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Sun Dec 4 18:31:54 2022 +0000 2022-12-04 18:31:53 UTC emerge -qpvO sys-process/tiptop [ebuild N ] sys-process/tiptop-2.3.1_p4
Created attachment 840069 [details] emerge-info.txt
Created attachment 840071 [details] emerge-history.txt
Created attachment 840073 [details] environment
Created attachment 840075 [details] etc.clang.tar.bz2
Created attachment 840077 [details] etc.portage.tar.bz2
Created attachment 840079 [details] logs.tar.bz2
Created attachment 840081 [details] sys-process:tiptop-2.3.1_p4:20221204-191411.log
Created attachment 840083 [details] temp.tar.bz2
Created attachment 840085 [details] var.tmp.clang.tar.bz2
I can't reproduce this for some reason. This is the line that compiles fine for me and not for the tinderbox: clang -march=skylake -mtune=skylake -O2 -pipe -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -I/usr/include/libxml2 -I.. -I. -c lex.yy.c
maybe GNUMAKEFLAGS="$GNUMAKEFLAGS --shuffle"
(In reply to Pascal Jäger from comment #10) > I can't reproduce this for some reason. This is the line that compiles fine > for me and not for the tinderbox: > clang -march=skylake -mtune=skylake -O2 -pipe > -Werror=implicit-function-declaration -Werror=implicit-int > -Werror=int-conversion -I/usr/include/libxml2 -I.. -I. -c lex.yy.c I can hit it immediately, interestingly, with GCC: ``` x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -Wreturn-type -ggdb3 -Werror=implicit-function-declaration -Werror=implicit-int -I/usr/include/libxml2 -I.. -I. -c lex.yy.c ./calc.lex: In function ‘yylex’: ./calc.lex:65:16: error: implicit declaration of function ‘strdup’ [-Werror=implicit-function-declaration] 65 | yylval.txt = strdup(yytext); | ^~~~~~ ./calc.lex:65:16: warning: incompatible implicit declaration of built-in function ‘strdup’ [-Wbuiltin-declaration-mismatch] ./calc.lex:70:16: warning: incompatible implicit declaration of built-in function ‘strdup’ [-Wbuiltin-declaration-mismatch] 70 | yylval.txt = strdup(yytext); | ^~~~~~ ./calc.lex:75:16: warning: incompatible implicit declaration of built-in function ‘strdup’ [-Wbuiltin-declaration-mismatch] 75 | yylval.txt = strdup(yytext); | ^~~~~~ cc1: some warnings being treated as errors ``` but I, like toralf, have LEX="reflex".
You have -Werror=implicit-function-declaration also with your gcc, so of course this fails here like clang does with -Werror=implicit-function-declaration.
(In reply to Pascal Jäger from comment #13) > You have -Werror=implicit-function-declaration also with your gcc, so of > course this fails here like clang does with > -Werror=implicit-function-declaration. (I meant the interesting bit was that Clang didn't seem to expose it for you/that I managed to hit it immediately, but I guess it's because of LEX=...)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ecc97f4be1cfe35cb5da6f729028b588b462aa7 commit 4ecc97f4be1cfe35cb5da6f729028b588b462aa7 Author: Pascal Jäger <pascal.jaeger@leimstift.de> AuthorDate: 2022-12-11 22:33:55 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-12-16 05:03:30 +0000 sys-process/tiptop: fix build for clang16 - new upstream website Closes: https://bugs.gentoo.org/884361 Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de> Closes: https://github.com/gentoo/gentoo/pull/28644 Signed-off-by: Sam James <sam@gentoo.org> sys-process/tiptop/Manifest | 1 + ...user-to-run-as-root-when-paranoid_level-3.patch | 46 ++++++++++++++++++++++ ...iptop-2.3.1-implicit-function-declaration.patch | 35 ++++++++++++++++ sys-process/tiptop/metadata.xml | 3 ++ .../tiptop/tiptop-2.3.1_p4_p20221211.ebuild | 39 ++++++++++++++++++ 5 files changed, 124 insertions(+)