Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 937374 - sys-apps/firejail-0.9.72 fails to compile: libtrace.c:457:40: error: passing argument 2 of orig_stat64 from incompatible pointer type [-Wincompatible-pointer-types]
Summary: sys-apps/firejail-0.9.72 fails to compile: libtrace.c:457:40: error: passing ...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Hank Leininger
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: c99-porting gcc-14-stable
  Show dependency tree
 
Reported: 2024-08-05 11:49 UTC by Agostino Sarubbo
Modified: 2024-11-08 14:33 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,136.92 KB, text/plain)
2024-08-05 11:49 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2024-08-05 11:49:21 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: sys-apps/firejail-0.9.72 fails to compile.
Discovered on: amd64 (internal ref: tinderbox_musl)
System: MUSL-SYSTEM (https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#MUSL)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0003
Comment 1 Agostino Sarubbo gentoo-dev 2024-08-05 11:49:22 UTC
Created attachment 899078 [details]
build.log

build log and emerge --info
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2024-11-08 14:33:30 UTC
Builds fine here with gcc-14 and clang-18.  This looks like a musl-only issue where struct stat64 is not defined or defined elsewhere.



libtrace.c:451:59: warning: 'struct stat64' declared inside parameter list will not be visible outside of this definition or declaration
  451 | typedef int (*orig_stat64_t)(const char *pathname, struct stat64 *statbuf);
      |                                                           ^~~~~~
libtrace.c:453:41: warning: 'struct stat64' declared inside parameter list will not be visible outside of this definition or declaration
  453 | int stat64(const char *pathname, struct stat64 *statbuf) {
      |                                         ^~~~~~
libtrace.c: In function 'stat64':
libtrace.c:457:40: error: passing argument 2 of 'orig_stat64' from incompatible pointer type [-Wincompatible-pointer-types[https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wincompatible-pointer-types]]
  457 |         int rv = orig_stat64(pathname, statbuf);
      |                                        ^~~~~~~
      |                                        |
      |                                        struct stat64 *
libtrace.c:457:40: note: expected 'struct stat64 *' but argument is of type 'struct stat64 *'
libtrace.c: At top level:
x86_64-pc-linux-musl-gcc -pie -fPIE -Wl,-z,relro -Wl,-z,now  -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--defsym=__gentoo_check_ldflags__=0 -o fnettrace-icmp main.o  
libtrace.c:476:60: warning: 'struct stat64' declared inside parameter list will not be visible outside of this definition or declaration
  476 | typedef int (*orig_lstat64_t)(const char *pathname, struct stat64 *statbuf);
      |                                                            ^~~~~~
libtrace.c:478:42: warning: 'struct stat64' declared inside parameter list will not be visible outside of this definition or declaration
  478 | int lstat64(const char *pathname, struct stat64 *statbuf) {
      |                                          ^~~~~~
libtrace.c: In function 'lstat64':
libtrace.c:482:41: error: passing argument 2 of 'orig_lstat64' from incompatible pointer type [-Wincompatible-pointer-types[https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wincompatible-pointer-types]]
  482 |         int rv = orig_lstat64(pathname, statbuf);
      |                                         ^~~~~~~
      |                                         |
      |                                         struct stat64 *
libtrace.c:482:41: note: expected 'struct stat64 *' but argument is of type 'struct stat64 *'