Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 923307 - dev-libs/glib-2.78.6 has implicit function declarations in configure logs
Summary: dev-libs/glib-2.78.6 has implicit function declarations in configure logs
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-30 08:30 UTC by Agostino Sarubbo
Modified: 2024-05-27 06:46 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,699.60 KB, text/plain)
2024-01-30 08:30 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2024-01-30 08:30:36 UTC
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
Comment 1 Agostino Sarubbo gentoo-dev 2024-01-30 08:30:38 UTC
Created attachment 883682 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2024-01-30 08:30:40 UTC
Found the following implicit function declarations in configure logs:
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-30 08:35:41 UTC
(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
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-30 08:36:11 UTC
iirc I looked into this before with leio and concluded it's fine, but let me check again
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-30 08:38:33 UTC
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.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-30 08:39:28 UTC
(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)
Comment 7 Eli Schwartz gentoo-dev 2024-05-22 13:59:22 UTC
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.
Comment 8 Agostino Sarubbo gentoo-dev 2024-05-27 06:46:39 UTC
tinderbox_musl has reproduced this issue with version 2.78.6 - Updating summary.