[GH-ISSUE #6224] build: libtrace(log) warnings on Alpine #3227

Open
opened 2026-05-05 09:50:16 -06:00 by gitea-mirror · 0 comments
Owner

Originally created by @kmk3 on GitHub (Feb 27, 2024).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6224

On commit f7e2c2573 ("build: ensure fnettrace prints to stdout", 2024-02-12):

From build_src_package:

https://gitlab.com/Firejail/firejail_ci/-/jobs/6193214960:

Build log

$ apk upgrade
OK: 7 MiB in 15 packages
$ apk add build-base linux-headers gawk
(1/24) Installing libgcc (13.2.1_git20231014-r0)
(2/24) Installing jansson (2.14-r4)
(3/24) Installing libstdc++ (13.2.1_git20231014-r0)
(4/24) Installing zstd-libs (1.5.5-r8)
(5/24) Installing binutils (2.41-r0)
(6/24) Installing libmagic (5.45-r1)
(7/24) Installing file (5.45-r1)
(8/24) Installing libgomp (13.2.1_git20231014-r0)
(9/24) Installing libatomic (13.2.1_git20231014-r0)
(10/24) Installing gmp (6.3.0-r0)
(11/24) Installing isl26 (0.26-r1)
(12/24) Installing mpfr4 (4.2.1-r0)
(13/24) Installing mpc1 (1.3.1-r1)
(14/24) Installing gcc (13.2.1_git20231014-r0)
(15/24) Installing libstdc++-dev (13.2.1_git20231014-r0)
(16/24) Installing musl-dev (1.2.4_git20230717-r4)
(17/24) Installing libc-dev (0.7.2-r5)
(18/24) Installing g++ (13.2.1_git20231014-r0)
(19/24) Installing make (4.4.1-r2)
(20/24) Installing fortify-headers (1.1-r3)
(21/24) Installing patch (2.7.6-r10)
(22/24) Installing build-base (0.5-r3)
(23/24) Installing gawk (5.3.0-r0)
(24/24) Installing linux-headers (6.5-r0)
Executing busybox-1.36.1-r15.trigger
OK: 233 MiB in 39 packages
[...]
$ ./configure --prefix=/usr || (cat config.log; exit 1)
[...]
$ make
[...]
make[1]: Entering directory '/builds/Firejail/firejail_ci/src/libtrace'
gcc -ggdb -O2 -DVERSION='"0.9.73"' -Wall -Wextra  -Wformat -Wformat-security -fstack-protector-all -D_FORTIFY_SOURCE=2 -DPREFIX='"/usr"' -DSYSCONFDIR='"/etc/firejail"' -DLIBDIR='"/usr/lib"' -DBINDIR='"/usr/bin"' -DVARDIR='"/var/lib/firejail"' -MMD -MP -fPIC -g -O2  -c ../../src/libtrace/libtrace.c -o ../../src/libtrace/libtrace.o
../../src/libtrace/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);
      |                                                           ^~~~~~
../../src/libtrace/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) {
      |                                         ^~~~~~
../../src/libtrace/libtrace.c: In function 'stat64':
../../src/libtrace/libtrace.c:457:40: warning: passing argument 2 of 'orig_stat64' from incompatible pointer type [-Wincompatible-pointer-types]
  457 |         int rv = orig_stat64(pathname, statbuf);
      |                                        ^~~~~~~
      |                                        |
      |                                        struct stat64 *
../../src/libtrace/libtrace.c:457:40: note: expected 'struct stat64 *' but argument is of type 'struct stat64 *'
../../src/libtrace/libtrace.c: At top level:
../../src/libtrace/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);
      |                                                            ^~~~~~
../../src/libtrace/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) {
      |                                          ^~~~~~
../../src/libtrace/libtrace.c: In function 'lstat64':
../../src/libtrace/libtrace.c:482:41: warning: passing argument 2 of 'orig_lstat64' from incompatible pointer type [-Wincompatible-pointer-types]
  482 |         int rv = orig_lstat64(pathname, statbuf);
      |                                         ^~~~~~~
      |                                         |
      |                                         struct stat64 *
../../src/libtrace/libtrace.c:482:41: note: expected 'struct stat64 *' but argument is of type 'struct stat64 *'
gcc -Wl,-z,relro -Wl,-z,now -fPIC -shared  -o ../../src/libtrace/libtrace.so ../../src/libtrace/libtrace.o  -ldl
make[1]: Leaving directory '/builds/Firejail/firejail_ci/src/libtrace'
make -C src/libtracelog/
make[1]: Entering directory '/builds/Firejail/firejail_ci/src/libtracelog'
gcc -ggdb -O2 -DVERSION='"0.9.73"' -Wall -Wextra  -Wformat -Wformat-security -fstack-protector-all -D_FORTIFY_SOURCE=2 -DPREFIX='"/usr"' -DSYSCONFDIR='"/etc/firejail"' -DLIBDIR='"/usr/lib"' -DBINDIR='"/usr/bin"' -DVARDIR='"/var/lib/firejail"' -MMD -MP -fPIC -g -O2  -c ../../src/libtracelog/libtracelog.c -o ../../src/libtracelog/libtracelog.o
../../src/libtracelog/libtracelog.c:569:59: warning: 'struct stat64' declared inside parameter list will not be visible outside of this definition or declaration
  569 | typedef int (*orig_stat64_t)(const char *pathname, struct stat64 *buf);
      |                                                           ^~~~~~
../../src/libtracelog/libtracelog.c:571:41: warning: 'struct stat64' declared inside parameter list will not be visible outside of this definition or declaration
  571 | int stat64(const char *pathname, struct stat64 *buf) {
      |                                         ^~~~~~
../../src/libtracelog/libtracelog.c: In function 'stat64':
../../src/libtracelog/libtracelog.c:582:40: warning: passing argument 2 of 'orig_stat64' from incompatible pointer type [-Wincompatible-pointer-types]
  582 |         int rv = orig_stat64(pathname, buf);
      |                                        ^~~
      |                                        |
      |                                        struct stat64 *
../../src/libtracelog/libtracelog.c:582:40: note: expected 'struct stat64 *' but argument is of type 'struct stat64 *'
../../src/libtracelog/libtracelog.c: At top level:
../../src/libtracelog/libtracelog.c:605:60: warning: 'struct stat64' declared inside parameter list will not be visible outside of this definition or declaration
  605 | typedef int (*orig_lstat64_t)(const char *pathname, struct stat64 *buf);
      |                                                            ^~~~~~
../../src/libtracelog/libtracelog.c:607:42: warning: 'struct stat64' declared inside parameter list will not be visible outside of this definition or declaration
  607 | int lstat64(const char *pathname, struct stat64 *buf) {
      |                                          ^~~~~~
../../src/libtracelog/libtracelog.c: In function 'lstat64':
../../src/libtracelog/libtracelog.c:618:41: warning: passing argument 2 of 'orig_lstat64' from incompatible pointer type [-Wincompatible-pointer-types]
  618 |         int rv = orig_lstat64(pathname, buf);
      |                                         ^~~
      |                                         |
      |                                         struct stat64 *
../../src/libtracelog/libtracelog.c:618:41: note: expected 'struct stat64 *' but argument is of type 'struct stat64 *'
gcc -Wl,-z,relro -Wl,-z,now -fPIC -shared  -o ../../src/libtracelog/libtracelog.so ../../src/libtracelog/libtracelog.o  -ldl
make[1]: Leaving directory '/builds/Firejail/firejail_ci/src/libtracelog'

Relates to:

Originally created by @kmk3 on GitHub (Feb 27, 2024). Original GitHub issue: https://github.com/netblue30/firejail/issues/6224 On commit f7e2c2573 ("build: ensure fnettrace prints to stdout", 2024-02-12): From `build_src_package`: <https://gitlab.com/Firejail/firejail_ci/-/jobs/6193214960>: <details> <summary>Build log</summary> <p> ```console $ apk upgrade OK: 7 MiB in 15 packages $ apk add build-base linux-headers gawk (1/24) Installing libgcc (13.2.1_git20231014-r0) (2/24) Installing jansson (2.14-r4) (3/24) Installing libstdc++ (13.2.1_git20231014-r0) (4/24) Installing zstd-libs (1.5.5-r8) (5/24) Installing binutils (2.41-r0) (6/24) Installing libmagic (5.45-r1) (7/24) Installing file (5.45-r1) (8/24) Installing libgomp (13.2.1_git20231014-r0) (9/24) Installing libatomic (13.2.1_git20231014-r0) (10/24) Installing gmp (6.3.0-r0) (11/24) Installing isl26 (0.26-r1) (12/24) Installing mpfr4 (4.2.1-r0) (13/24) Installing mpc1 (1.3.1-r1) (14/24) Installing gcc (13.2.1_git20231014-r0) (15/24) Installing libstdc++-dev (13.2.1_git20231014-r0) (16/24) Installing musl-dev (1.2.4_git20230717-r4) (17/24) Installing libc-dev (0.7.2-r5) (18/24) Installing g++ (13.2.1_git20231014-r0) (19/24) Installing make (4.4.1-r2) (20/24) Installing fortify-headers (1.1-r3) (21/24) Installing patch (2.7.6-r10) (22/24) Installing build-base (0.5-r3) (23/24) Installing gawk (5.3.0-r0) (24/24) Installing linux-headers (6.5-r0) Executing busybox-1.36.1-r15.trigger OK: 233 MiB in 39 packages [...] $ ./configure --prefix=/usr || (cat config.log; exit 1) [...] $ make [...] make[1]: Entering directory '/builds/Firejail/firejail_ci/src/libtrace' gcc -ggdb -O2 -DVERSION='"0.9.73"' -Wall -Wextra -Wformat -Wformat-security -fstack-protector-all -D_FORTIFY_SOURCE=2 -DPREFIX='"/usr"' -DSYSCONFDIR='"/etc/firejail"' -DLIBDIR='"/usr/lib"' -DBINDIR='"/usr/bin"' -DVARDIR='"/var/lib/firejail"' -MMD -MP -fPIC -g -O2 -c ../../src/libtrace/libtrace.c -o ../../src/libtrace/libtrace.o ../../src/libtrace/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); | ^~~~~~ ../../src/libtrace/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) { | ^~~~~~ ../../src/libtrace/libtrace.c: In function 'stat64': ../../src/libtrace/libtrace.c:457:40: warning: passing argument 2 of 'orig_stat64' from incompatible pointer type [-Wincompatible-pointer-types] 457 | int rv = orig_stat64(pathname, statbuf); | ^~~~~~~ | | | struct stat64 * ../../src/libtrace/libtrace.c:457:40: note: expected 'struct stat64 *' but argument is of type 'struct stat64 *' ../../src/libtrace/libtrace.c: At top level: ../../src/libtrace/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); | ^~~~~~ ../../src/libtrace/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) { | ^~~~~~ ../../src/libtrace/libtrace.c: In function 'lstat64': ../../src/libtrace/libtrace.c:482:41: warning: passing argument 2 of 'orig_lstat64' from incompatible pointer type [-Wincompatible-pointer-types] 482 | int rv = orig_lstat64(pathname, statbuf); | ^~~~~~~ | | | struct stat64 * ../../src/libtrace/libtrace.c:482:41: note: expected 'struct stat64 *' but argument is of type 'struct stat64 *' gcc -Wl,-z,relro -Wl,-z,now -fPIC -shared -o ../../src/libtrace/libtrace.so ../../src/libtrace/libtrace.o -ldl make[1]: Leaving directory '/builds/Firejail/firejail_ci/src/libtrace' make -C src/libtracelog/ make[1]: Entering directory '/builds/Firejail/firejail_ci/src/libtracelog' gcc -ggdb -O2 -DVERSION='"0.9.73"' -Wall -Wextra -Wformat -Wformat-security -fstack-protector-all -D_FORTIFY_SOURCE=2 -DPREFIX='"/usr"' -DSYSCONFDIR='"/etc/firejail"' -DLIBDIR='"/usr/lib"' -DBINDIR='"/usr/bin"' -DVARDIR='"/var/lib/firejail"' -MMD -MP -fPIC -g -O2 -c ../../src/libtracelog/libtracelog.c -o ../../src/libtracelog/libtracelog.o ../../src/libtracelog/libtracelog.c:569:59: warning: 'struct stat64' declared inside parameter list will not be visible outside of this definition or declaration 569 | typedef int (*orig_stat64_t)(const char *pathname, struct stat64 *buf); | ^~~~~~ ../../src/libtracelog/libtracelog.c:571:41: warning: 'struct stat64' declared inside parameter list will not be visible outside of this definition or declaration 571 | int stat64(const char *pathname, struct stat64 *buf) { | ^~~~~~ ../../src/libtracelog/libtracelog.c: In function 'stat64': ../../src/libtracelog/libtracelog.c:582:40: warning: passing argument 2 of 'orig_stat64' from incompatible pointer type [-Wincompatible-pointer-types] 582 | int rv = orig_stat64(pathname, buf); | ^~~ | | | struct stat64 * ../../src/libtracelog/libtracelog.c:582:40: note: expected 'struct stat64 *' but argument is of type 'struct stat64 *' ../../src/libtracelog/libtracelog.c: At top level: ../../src/libtracelog/libtracelog.c:605:60: warning: 'struct stat64' declared inside parameter list will not be visible outside of this definition or declaration 605 | typedef int (*orig_lstat64_t)(const char *pathname, struct stat64 *buf); | ^~~~~~ ../../src/libtracelog/libtracelog.c:607:42: warning: 'struct stat64' declared inside parameter list will not be visible outside of this definition or declaration 607 | int lstat64(const char *pathname, struct stat64 *buf) { | ^~~~~~ ../../src/libtracelog/libtracelog.c: In function 'lstat64': ../../src/libtracelog/libtracelog.c:618:41: warning: passing argument 2 of 'orig_lstat64' from incompatible pointer type [-Wincompatible-pointer-types] 618 | int rv = orig_lstat64(pathname, buf); | ^~~ | | | struct stat64 * ../../src/libtracelog/libtracelog.c:618:41: note: expected 'struct stat64 *' but argument is of type 'struct stat64 *' gcc -Wl,-z,relro -Wl,-z,now -fPIC -shared -o ../../src/libtracelog/libtracelog.so ../../src/libtracelog/libtracelog.o -ldl make[1]: Leaving directory '/builds/Firejail/firejail_ci/src/libtracelog' ``` </p> </details> Relates to: * #5431 * #5906
gitea-mirror added the
bug
label 2026-05-05 09:50:16 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#3227
No description provided.