Bug 1225794 - Package ldns does not build with gcc14 because of new errors
Summary: Package ldns does not build with gcc14 because of new errors
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Network (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Adam Majer
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: modern_C
  Show dependency treegraph
 
Reported: 2024-06-02 09:50 UTC by Martin Jambor
Modified: 2024-07-10 13:48 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Jambor 2024-06-02 09:50:15 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]       |              ^
Comment 1 Martin Jambor 2024-07-10 13:48:30 UTC
I have created https://build.opensuse.org/request/show/1186614 in which I added the two patches by Florian from RedHat.