Bugzilla – Bug 1225794
Package ldns does not build with gcc14 because of new errors
Last modified: 2024-07-10 13:48:30 UTC
GCC 14 newly by default treats as errors a number of situations which before were only warnings. For more information see https://gcc.gnu.org/gcc-14/porting_to.html and meta bug #1220571. Because of this, package ldns fails to compile. This can be seen online at: https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/ldns/standard/x86_64 It can be reproduced locally with command: osc build --clean --alternative-project home:rguenther:nextgcc According to notes from Fedora at https://gitlab.com/fweimer-rh/fedora-modernc/-/blob/main/pkg/l/ldns.md?ref_type=heads the related upstream issues seem to be https://github.com/NLnetLabs/ldns/pull/232 and https://github.com/NLnetLabs/ldns/pull/233 and Fedora fix seems to be https://src.fedoraproject.org/rpms/ldns/c/15dbd0729dcc0b9ec083def611e11472bc4caff1?branch=rawhide The first error (that halts the build) is: [ 24s] ./contrib/python/ldns_wrapper.c: In function ‘_wrap_ldns_rdf_type2str’: [ 24s] ./contrib/python/ldns_wrapper.c:10137:16: error: implicit declaration of function ‘SWIG_Python_str_AsChar’; did you mean ‘SWIG_Python_str_FromChar’? [-Wimplicit-function-declaration] [ 24s] 10137 | arg1_str = SWIG_Python_str_AsChar(swig_obj[0]); [ 24s] | ^~~~~~~~~~~~~~~~~~~~~~ [ 24s] | SWIG_Python_str_FromChar [ 24s] ./contrib/python/ldns_wrapper.c:10137:14: error: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] [ 24s] 10137 | arg1_str = SWIG_Python_str_AsChar(swig_obj[0]); [ 24s] | ^
I have created https://build.opensuse.org/request/show/1186614 in which I added the two patches by Florian from RedHat.