GNU bug report logs -
#74783
gcc@4.9.4 fails to build
Previous Next
Full log
Message #11 received at 74783 <at> debbugs.gnu.org (full text, mbox):
Between 2.35 and 2.38, glibc added the following code to sys/mount.h:
> #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.
This bug report was last modified 214 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.