On 1/4/21 12:27 PM, Bruno Haible wrote:
Paul E Murphy wrote:
We ran into the following:
In file included from
/home/tuliom/opt/at-next-15.0-0-alpha/include/stdio.h:871,
from ./stdio.h:43,
from
/home/tuliom/tmp/at-build-tray/at15.0-0-alpha.redhat-8_ppc64le_ppc64le/sources
/gdb/gnulib/import/tempname.h:23,
from
/home/tuliom/tmp/at-build-tray/at15.0-0-alpha.redhat-8_ppc64le_ppc64le/sources
/gdb/gnulib/import/tempname.c:20:
/home/tuliom/opt/at-next-15.0-0-alpha/include/bits/stdio-ldbl.h: In
function ‘__LDBL_REDIR1_DECL’:
/home/tuliom/opt/at-next-15.0-0-alpha/include/bits/stdio-ldbl.h:36:1:
error: expected declaration specifiers before ‘__LDBL_REDIR1_DECL’
36 | __LDBL_REDIR1_DECL (scanf, __isoc99_scanfieee128)
| ^~~~~~~~~~~~~~~~~~
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.
The gnulib headers are included as expected.
Note, this is building with -mabi=ieeelongdouble option, thus this
requires both a sufficiently new gcc (8+) and glibc (2.23+).
In file included from
/home/murp/opt/at-next-15.0-0-alpha/include/stdio.h:871,
from ./stdio.h:43,
from
/home/murp/tmp/at-build-tray/at15.0-0-alpha.ubuntu-18_ppc64le_ppc64le/sources/gdb/gnulib/import/tempname.h:23,
from
/home/murp/tmp/at-build-tray/at15.0-0-alpha.ubuntu-18_ppc64le_ppc64le/sources/gdb/gnulib/import/tempname.c:20:
/home/murp/opt/at-next-15.0-0-alpha/include/bits/stdio-ldbl.h: In
function ‘__LDBL_REDIR1_DECL’:
/home/murp/opt/at-next-15.0-0-alpha/include/bits/stdio-ldbl.h:36:1:
error: expected declaration specifiers before ‘__LDBL_REDIR1_DECL’
36 | __LDBL_REDIR1_DECL (scanf, __isoc99_scanfieee128)
| ^~~~~~~~~~~~~~~~~~
In file included from ./stdio.h:53,
from
/home/murp/tmp/at-build-tray/at15.0-0-alpha.ubuntu-18_ppc64le_ppc64le/sources/gdb/gnulib/import/tempname.h:23,
from
/home/murp/tmp/at-build-tray/at15.0-0-alpha.ubuntu-18_ppc64le_ppc64le/sources/gdb/gnulib/import/tempname.c:20: