https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: dev-libs/glib-2.78.4-r1 has implicit function declarations in configure logs. Discovered on: amd64 (internal ref: python-3.12_tinderbox) System: CLANG-LLD (https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CLANG-LLD) Info about the issue: https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#QA0072
Created attachment 883682 [details] build.log build log and emerge --info
Found the following implicit function declarations in configure logs:
(In reply to Agostino Sarubbo from comment #2) > Found the following implicit function declarations in configure logs: * QA Notice: Found the following implicit function declarations in configure logs: * /var/tmp/portage/dev-libs/glib-2.78.4-r1/work/glib-2.78.4-abi_x86_64.amd64/meson-logs/meson-log.txt:4892 - aligned_alloc
iirc I looked into this before with leio and concluded it's fine, but let me check again
Yeah, it's wrong. See https://gitlab.gnome.org/GNOME/glib/-/blob/main/meson.build#L800. From aligned_alloc(3): """ Feature Test Macro Requirements for glibc (see feature_test_macros(7)): posix_memalign(): _POSIX_C_SOURCE >= 200112L aligned_alloc(): _ISOC11_SOURCE valloc(): Since glibc 2.12: (_XOPEN_SOURCE >= 500) && !(_POSIX_C_SOURCE >= 200112L) || /* glibc >= 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE Before glibc 2.12: _BSD_SOURCE || _XOPEN_SOURCE >= 500 """ They also only conditionally use >= C11: https://gitlab.gnome.org/GNOME/glib/-/blob/main/meson.build#L17. I don't know what 'c_standards' does or if it's even wired up. I don't think it's then used for the below compiler tests though.
(In reply to Sam James from comment #4) > iirc I looked into this before with leio and concluded it's fine, but let me > check again (I remember now: this part was just that the actual code use iirc falls back to something sensibleish, not plain malloc)
clang is a trash compiler. An enhanced diagnostic to provide additional fixit suggestions is, as a side effect, able to to make otherwise invalid code start compiling... depending on whether the implicit decl is part of the known list of fixits. GCC has the same fixits concept, but doesn't change the type of error as a side effect; GCC always unconditionally errors on undeclared identifiers. Madness. As far as meson is concerned, this is fixed to work correctly in meson checks, which always pass the -Werror. The issue here is just that it's erroneously reported. (And this manifests all over the place, for things that genuinely don't exist on Linux, but do exist on BSD.) Separately, this is probably an upstream bug because it's checking for something without the feature macro that would allow it to be provided... ... and GCC is genuinely and correctly reporting that it doesn't exist. But the probable intention of the upstream glib code was that it should exist. Removing from the GCC 14 tracker.
tinderbox_musl has reproduced this issue with version 2.78.6 - Updating summary.