https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: media-radio/fldigi-4.1.23 fails to compile (MUSL). Discovered on: amd64 (internal ref: tinderbox_musl) NOTE: This machine uses MUSL libc
Created attachment 805087 [details] build.log build log and emerge --info
Weird. A MUSL related bug has been solved already (#832231). The code afterwards build without problems under MUSL. Now it magically fails. At the moment I do not see what has changed in between. Needs to investigate some more.
This kind of one could easily be gcc 11 vs 12, but only appearing on musl. Just a missing include hopefully.
(In reply to Sam James from comment #3) > This kind of one could easily be gcc 11 vs 12, but only appearing on musl. I will have to check whats the difference between both. Some defaults may have changed. > Just a missing include hopefully. No, looks a little bit more complicated. The log show a #define nullptr NULL from one of the source files, but an additional #define NULL nullptr from included time.h When commenting out the first (conditional) definition the code compiles. Maybe it is related to the different handling of the NULL macro in glibc and musl.
(In reply to Thomas Beierlein from comment #4) > (In reply to Sam James from comment #3) > > This kind of one could easily be gcc 11 vs 12, but only appearing on musl. > > I will have to check whats the difference between both. Some defaults may > have changed. > Hmm, looks not like GCC11 vs. GCC12 related. Fails to compile even under GCC-11.3.0
Turns out, the problem is a change in definition of NULL in musl-1.2.3. See teh following commit: https://git.musl-libc.org/cgit/musl/commit?id=98e688a9da5e7b2925dda17a2d6820dddf1fb287 -#ifdef __cplusplus +#if __cplusplus >= 201103L +#define NULL nullptr +#elif defined(__cplusplus) #define NULL 0L #else #define NULL ((void*)0) As fldigi has a #define nullptr NULL it results in a circular redefinition. So but is not related to GCC12
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d149b09fb7c013457a0c866a3a6a4f9e72c3ee3 commit 2d149b09fb7c013457a0c866a3a6a4f9e72c3ee3 Author: Thomas Beierlein <tomjbe@gentoo.org> AuthorDate: 2022-09-17 12:11:20 +0000 Commit: Thomas Beierlein <tomjbe@gentoo.org> CommitDate: 2022-09-17 12:11:20 +0000 media-radio/fldigi: Drop problematic definition of nullptr Closes: https://bugs.gentoo.org/870082 Signed-off-by: Thomas Beierlein <tomjbe@gentoo.org> .../files/fldigi-drop-nullptr-definition.patch | 23 ++++++++++++++++++++++ media-radio/fldigi/fldigi-4.1.22.ebuild | 3 ++- media-radio/fldigi/fldigi-4.1.23.ebuild | 3 ++- 3 files changed, 27 insertions(+), 2 deletions(-)