Welcome! Log In Create A New Profile

Advanced

nginx 1.24 + njs build errors [-Werror=dangling-pointer=] after switch from GCC 12 (Fedora 37) -> GCC13 (Fedora 38)

pgn
April 18, 2023 01:28PM
I'm building nginx mainline v1.24 on Fedora.

on F37, with gcc 12,

gcc --version
gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4)
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


build's good.

Upgrading to today's new/latest F38, with gcc 13,

gcc --version
gcc (GCC) 13.0.1 20230401 (Red Hat 13.0.1-0)
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

builds for target F38+ fail @ dangling-pointer errors,

...
src/njs_iterator.c: In function 'njs_object_iterate':
src/njs_iterator.c:358:25: error: storing the address of local variable 'string_obj' in '*args.value' [-Werror=dangling-pointer=]
358 | args->value = &string_obj;
| ~~~~~~~~~~~~^~~~~~~~~~~~~
...
cc1: all warnings being treated as errors

adding

-Wno-dangling-pointer

to build flags worksaround it, with successful build.

for ref,

FAILED build log:

https://download.copr.fedorainfracloud.org/results/pgfed/nginx-mainline/fedora-38-x86_64/05802768-nginx/build.log.gz

OK build log:

https://download.copr.fedorainfracloud.org/results/pgfed/nginx-mainline/fedora-38-x86_64/05802814-nginx/build.log.gz

I'm checking to see whether the error flag was added to GCC 13 upstream, or just to Redhat/Fedora flags ...
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

nginx 1.24 + njs build errors [-Werror=dangling-pointer=] after switch from GCC 12 (Fedora 37) -> GCC13 (Fedora 38)

pgn 437 April 18, 2023 01:28PM

Re: nginx 1.24 + njs build errors [-Werror=dangling-pointer=] after switch from GCC 12 (Fedora 37) -> GCC13 (Fedora 38)

Dmitry Volyntsev 152 April 18, 2023 09:24PM

Re: nginx 1.24 + njs build errors [-Werror=dangling-pointer=] after switch from GCC 12 (Fedora 37) -> GCC13 (Fedora 38)

pgn 127 April 18, 2023 09:50PM

Re: nginx 1.24 + njs build errors [-Werror=dangling-pointer=] after switch from GCC 12 (Fedora 37) -> GCC13 (Fedora 38)

pgn 125 April 26, 2023 01:26PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 199
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready