Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: libtrace(log) warnings on Alpine #6224

Open
kmk3 opened this issue Feb 27, 2024 · 0 comments
Open

build: libtrace(log) warnings on Alpine #6224

kmk3 opened this issue Feb 27, 2024 · 0 comments

Comments

@kmk3
Copy link
Collaborator

kmk3 commented Feb 27, 2024

On commit f7e2c25 ("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 #5431 #5906.

kmk3 added a commit to kmk3/firejail that referenced this issue Feb 29, 2024
For consistency and to make it clearer where jobs differ (for example,
to see where `--enable-analyzer` is used).

Changes:

* Always use --prefix=/usr and --enable-fatal-warnings (except in the
  Alpine job due to current warnings; see netblue30#6224)
* Use the same argument order

Note: mkdeb.sh and platform/rpm/mkrpm.sh already pass `--prefix=/usr` to
./configure.
kmk3 added a commit to kmk3/firejail that referenced this issue Feb 29, 2024
For consistency and to make it clearer where jobs differ (for example,
to see where `--enable-analyzer` is used).

Changes:

* Always use --prefix=/usr and --enable-fatal-warnings (except in the
  Alpine job due to current warnings; see netblue30#6224)
* Use the same argument order

Note: mkdeb.sh and platform/rpm/mkrpm.sh already pass `--prefix=/usr` to
./configure.
kmk3 added a commit to kmk3/firejail that referenced this issue Feb 29, 2024
For consistency and to make it clearer where jobs differ (for example,
to see where `--enable-analyzer` is used).

Changes:

* Always use --prefix=/usr and --enable-fatal-warnings (except in the
  Alpine job due to current warnings; see netblue30#6224)
* Use the same argument order

Note: mkdeb.sh and platform/rpm/mkrpm.sh already pass `--prefix=/usr` to
./configure.
kmk3 added a commit to kmk3/firejail that referenced this issue Feb 29, 2024
For consistency and to make it clearer where jobs differ (for example,
to see where `--enable-analyzer` is used).

Changes:

* Always use --prefix=/usr and --enable-fatal-warnings (except in the
  Alpine job due to current warnings; see netblue30#6224)
* Use the same argument order

Note: mkdeb.sh and platform/rpm/mkrpm.sh already pass `--prefix=/usr` to
./configure.
kmk3 added a commit to kmk3/firejail that referenced this issue Feb 29, 2024
For consistency and to make it clearer where jobs differ (for example,
to see where `--enable-analyzer` is used).

Changes:

* Always use --prefix=/usr and --enable-fatal-warnings (except in the
  Alpine job due to current warnings; see netblue30#6224)
* Use the same argument order

Note: mkdeb.sh and platform/rpm/mkrpm.sh already pass `--prefix=/usr` to
./configure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant