You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Meson checks for the existance of headers with something like (simplified):
#ifdef __has_include
#if !__has_include(<linux/memfd.h>)
#error "Header 'linux/memfd.h' could not be found"
#endif
#endif
Problem is, that (unlike clang) current gcc/cpp versions expand the linux part here because #define linux , so they look for the header 1/memfd.h and don't find it.
This is a gcc/cpp bug of course, but it stands to reason that knowing about this limitation with current version of gcc on Linux Meson should not check for the existance of headers differently in these cases, or work around it, e.g. by doing #undef linux (which will not fully work around the general issue of course, just one of the most common occurances).
The text was updated successfully, but these errors were encountered:
Using the __has_include("linux/memfd.h") form doesn't trigger this bug, so maybe we could use that instead. The downside is that it will find that header if it's relative to the current directory and those listed with -iquote too.
Maybe we could use that form only with specific GCC versions that we know are buggy (which is all GCC versions right now).
Actually, it doesn't matter if we use the <> or "" form because our compiler checks are run from a temporary directory anyway. It cannot find any headers in the source or builddir. Will open a PR to fix this.
This is broken on GCC due to a GCC bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80005
It doesn't matter whether we use <> or "" in our checks because we run
them from an empty temporary directory anyway.
Includes a test for all this.
Closes#1458
Meson checks for the existance of headers with something like (simplified):
Problem is, that (unlike clang) current gcc/cpp versions expand the
linux
part here because#define linux
, so they look for the header1/memfd.h
and don't find it.This is a gcc/cpp bug of course, but it stands to reason that knowing about this limitation with current version of gcc on Linux Meson should not check for the existance of headers differently in these cases, or work around it, e.g. by doing
#undef linux
(which will not fully work around the general issue of course, just one of the most common occurances).The text was updated successfully, but these errors were encountered: