ldns fails to build with Python 3.15.0a2. In file included from ./ldns/buffer.h:16, from ./include/ldns/ldns.h:96, from ./contrib/python/ldns_wrapper.c:3547: /usr/include/assert.h:109:14: error: conflicting types for '__assert_single_arg'; have 'signed char(signed char)' 109 | extern _Bool __assert_single_arg (_Bool); | ^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/python3.15/Python.h:20, from ./contrib/python/ldns_wrapper.c:203: /usr/include/assert.h:109:14: note: previous declaration of '__assert_single_arg' with type '_Bool(_Bool)' 109 | extern _Bool __assert_single_arg (_Bool); | ^~~~~~~~~~~~~~~~~~~ make: *** [Makefile:329: ldns_wrapper.lo] Error 1 https://docs.python.org/3.15/whatsnew/3.15.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.15/fedora-rawhide-x86_64/09824725-ldns/ For all our attempts to build ldns with Python 3.15, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.15/package/ldns/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.15: https://copr.fedorainfracloud.org/coprs/g/python/python3.15/ Let us know here if you have any questions. Python 3.15 is planned to be included in Fedora 45. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
This bug also blocks builds of dnscap. After a bit of digging I found out that in Fedora Rawhide gcc uses the C23 standard, which defines bool as a keyword and deprecates _Bool. /usr/include/ldns/common.h doesn't find any previous boolean definition and ends up defining its own _Bool to signed char, which clashes with the __assert_single_arg that was previously defined with the proper _Bool type of C23. Compiling with an earlier C standard seems to work fine. Adding the following lines before the bool define check in ldns/common.h seems to resolve this issue in C23, however, I'm unsure if it's the right solution. #if (__STDC_VERSION__ >= 202300L) # define __bool_true_false_are_defined 1 #endif @pemensik
Yes, something like this is needed. I added check also for __STDC_VERSION__ definition, because c++ compiler does not define it.
FEDORA-2025-f74598b7d1 (ldns-1.9.0-1.fc44) has been submitted as an update to Fedora 44. https://bodhi.fedoraproject.org/updates/FEDORA-2025-f74598b7d1
FEDORA-2025-f74598b7d1 (ldns-1.9.0-1.fc44) has been pushed to the Fedora 44 stable repository. If problem still persists, please make note of it in this bug report.