Paul E Murphy wrote: > >> The missing macro is provided by glibc's cdefs.h. Thus, the wrong > >> cdefs.h was picked up. > > > > The one from glibc is meant to be included when someone writes > > #include <sys/cdefs.h> > > > > The one from Gnulib is meant to be included when someone writes > > #include <cdefs.h> > > via > > #include <libc-config.h> > > > > If the wrong one was picked up, it sounds you have too many -I options > > in your compilation commands. > > > > Oops, the trace I posted wasn't complete. Here it is in it's full form.
This error trace won't help you here. What you need, is to run the compilation command (which failed) with option -E instead of with options "-c -o OUTPUT.o", and pipe the output into a file... I see the problem now: glibc's <sys/cdefs.h> and Gnulib's <cdefs.h> have the same include guard! It could be that this patch leads to "redefined macro" warnings. But these would be better than not having macros included that the system headers (e.g. <stdio.h> in Paul Murphy's case) rely upon. 2021-01-04 Bruno Haible <br...@clisp.org> libc-config: Avoid overriding the headers from an installed newer glibc. Reported by Paul E Murphy <murp...@linux.ibm.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00106.html>. * lib/cdefs.h: Use a different include guard than glibc's <sys/cdefs.h>. diff --git a/lib/cdefs.h b/lib/cdefs.h index 6b1cf23..fd72b7b 100644 --- a/lib/cdefs.h +++ b/lib/cdefs.h @@ -15,8 +15,8 @@ License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ -#ifndef _SYS_CDEFS_H -#define _SYS_CDEFS_H 1 +#ifndef _GL_CDEFS_H +#define _GL_CDEFS_H 1 /* We are almost always included from features.h. */ #ifndef _FEATURES_H @@ -545,4 +545,4 @@ # define __HAVE_GENERIC_SELECTION 0 #endif -#endif /* sys/cdefs.h */ +#endif /* gnulib cdefs.h */