Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 884361 - sys-process/tiptop-2.3.1_p4 - char (const char ); ISO C99 and later do not support implicit function
Summary: sys-process/tiptop-2.3.1_p4 - char (const char ); ISO C99 and later do not su...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: c99-porting
  Show dependency tree
 
Reported: 2022-12-04 19:25 UTC by Toralf Förster
Modified: 2022-12-16 05:10 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,17.54 KB, text/plain)
2022-12-04 19:25 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,145.70 KB, text/plain)
2022-12-04 19:25 UTC, Toralf Förster
Details
environment (environment,81.15 KB, text/plain)
2022-12-04 19:25 UTC, Toralf Förster
Details
etc.clang.tar.bz2 (etc.clang.tar.bz2,702 bytes, application/x-bzip)
2022-12-04 19:25 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,20.55 KB, application/x-bzip)
2022-12-04 19:25 UTC, Toralf Förster
Details
logs.tar.bz2 (logs.tar.bz2,5.87 KB, application/x-bzip)
2022-12-04 19:25 UTC, Toralf Förster
Details
sys-process:tiptop-2.3.1_p4:20221204-191411.log (sys-process:tiptop-2.3.1_p4:20221204-191411.log,9.73 KB, text/plain)
2022-12-04 19:25 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,45.76 KB, application/x-bzip)
2022-12-04 19:25 UTC, Toralf Förster
Details
var.tmp.clang.tar.bz2 (var.tmp.clang.tar.bz2,1.34 KB, application/x-bzip)
2022-12-04 19:25 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2022-12-04 19:25:31 UTC
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
Comment 1 Toralf Förster gentoo-dev 2022-12-04 19:25:32 UTC
Created attachment 840069 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2022-12-04 19:25:33 UTC
Created attachment 840071 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2022-12-04 19:25:34 UTC
Created attachment 840073 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2022-12-04 19:25:35 UTC
Created attachment 840075 [details]
etc.clang.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2022-12-04 19:25:36 UTC
Created attachment 840077 [details]
etc.portage.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2022-12-04 19:25:37 UTC
Created attachment 840079 [details]
logs.tar.bz2
Comment 7 Toralf Förster gentoo-dev 2022-12-04 19:25:38 UTC
Created attachment 840081 [details]
sys-process:tiptop-2.3.1_p4:20221204-191411.log
Comment 8 Toralf Förster gentoo-dev 2022-12-04 19:25:39 UTC
Created attachment 840083 [details]
temp.tar.bz2
Comment 9 Toralf Förster gentoo-dev 2022-12-04 19:25:40 UTC
Created attachment 840085 [details]
var.tmp.clang.tar.bz2
Comment 10 Pascal Jäger 2022-12-10 09:04:44 UTC
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
Comment 11 Toralf Förster gentoo-dev 2022-12-10 11:13:36 UTC
maybe GNUMAKEFLAGS="$GNUMAKEFLAGS --shuffle"
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-10 22:51:19 UTC
(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".
Comment 13 Pascal Jäger 2022-12-11 21:13:59 UTC
You have -Werror=implicit-function-declaration also with your gcc, so of course this fails here like clang does with -Werror=implicit-function-declaration.
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-12 00:19:23 UTC
(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=...)
Comment 15 Larry the Git Cow gentoo-dev 2022-12-16 05:10:57 UTC
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(+)