gcc@4.9.4 fails to build

  • Open
  • quality assurance status badge
Details
2 participants
  • gay
  • Gábor Stefanik
Owner
unassigned
Submitted by
gay
Severity
normal
G
G
G
Gábor Stefanik wrote on 26 Dec 2024 09:01
(address . 74783@debbugs.gnu.org)
CA+XFjipDk+=KQ8DpH8SJJ_ue-YciLgAktU+uBTUSRgWCXCSePA@mail.gmail.com
Currently bisecting this issue, the range I have right now is
3db653a2c235207b347849200eeb3f89bb4ba51 ..
9dbaa10aa755f33f8050082bb443d1f9eabf6e21

That's a 3 minute commit time difference, but containing 216 commits.
Nothing immediately obvious to my eyes. Many (most?) of the intermediate
commits die well before they would start building gcc-4.9.4, making
bisection incredibly tedious.
Attachment: file
G
G
Gábor Stefanik wrote on 7 Jan 03:34 +0100
(address . 74783@debbugs.gnu.org)
CA+XFjiqAK_7h7xVkh_AQmAMEvqKKz6TqfidwfMxqn_muaqgV=w@mail.gmail.com
Between 2.35 and 2.38, glibc added the following code to sys/mount.h:

Toggle quote (6 lines)
> #ifdef __has_include
> # if __has_include ("linux/mount.h")
> # include "linux/mount.h"
> # endif
> #endif

This is then used to conditionally define structures that would be in
linux/mount.h, in case linux/mount.h is either unavailable or missing
those structures.

The __has_include directive was added to GCC in v5.0, and didn't
become standard until C++17. Unfortunately, this causes the first
#ifdef to fail, and so linux/mount.h is never checked. Any code trying
to include both sys/mount.h and linux/mount.h will therefore fail when
compiled with GCC < 5.0 and glibc >= 2.38.

Possible solutions:
* Patch sys/mount.h to make it include linux/mount.h unconditionally
on all platforms using the Linux kernel.
* Somehow remove linux/mount.h from GCC 4.9's
sanitizer_platform_limits_posix.cc. Unfortunately it's an indirect
include from linux/fs.h.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 74783@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 74783
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch