[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: max_align_t on RHEL 7.1 s390x
From: |
Bruno Haible |
Subject: |
Re: max_align_t on RHEL 7.1 s390x |
Date: |
Wed, 29 Aug 2018 22:21:39 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-130-generic; KDE/5.18.0; x86_64; ; ) |
Hi Sergio,
> I've just updated GDB's gnulib copy using a recent commit, and now I'm
> noticing a few errors when compiling things on a RHEL 7.1 s390x system.
> Here's what I'm getting
>
> In file included from
> ../../../../binutils-gdb/gdb/gnulib/import/scratch_buffer.h:9:0,
> from ../../../../binutils-gdb/gdb/gnulib/import/glob.c:87:
> ../../../../binutils-gdb/gdb/gnulib/import/malloc/scratch_buffer.h:69:3:
> error: unknown type name max_align_t
The type max_align_t is supposed to come from <stddef.h>. For this
reason, the gnulib module 'scratch_buffer' depends on the module 'stddef'.
The module 'stddef' works like this: If at configure time, <stddef.h> is
found to not define max_align_t, a replacement <stddef.h> will be generated.
Otherwise the original <stddef.h> will be used.
GCC's <stddef.h> defines max_align_t if and only if compiling for C11
or a newer standard.
Please look whether you have an stddef.h file in your build tree, and if so,
show it.
> ../../../../binutils-gdb/gdb/gnulib/import/glob.c: In function glob_in_dir:
> ../../../../binutils-gdb/gdb/gnulib/import/glob.c:1413:15: error: for loop
> initial declarations are only allowed in C99 mode
> for (size_t i = 0; i < cur; ++i)
> ^
To me, it looks like
1) you are compiling with a GCC option that enforces the super-ancient
C89 or C90 mode, and
2) you added this GCC option after configuring. That is, you configured
with CC="gcc" and then added "-std=c89" in the Makefile. DON'T DO THIS.
YOU MUST PUT GCC OPTIONS THAT DETERMINE THE SUPPORTED LANGUAGE FEATURES
IN THE CC OR CFLAGS VARIABLE. Otherwise configure guesses wrong.
If you think this is not the case, please run configure with option "-C"
and attach also the config.cache and config.status files.
Bruno
- Re: max_align_t on RHEL 7.1 s390x, (continued)
- Re: max_align_t on RHEL 7.1 s390x, Paul Eggert, 2018/08/29
- Re: max_align_t on RHEL 7.1 s390x, Sergio Durigan Junior, 2018/08/29
- Re: max_align_t on RHEL 7.1 s390x, Bruno Haible, 2018/08/29
- Re: max_align_t on RHEL 7.1 s390x, Sergio Durigan Junior, 2018/08/29
- Re: max_align_t on RHEL 7.1 s390x, Bruno Haible, 2018/08/29
- Re: max_align_t on RHEL 7.1 s390x, Sergio Durigan Junior, 2018/08/29
- hierarchical projects with configure scripts (was: Re: max_align_t on RHEL 7.1 s390x), Bruno Haible, 2018/08/29
- Re: hierarchical projects with configure scripts, Sergio Durigan Junior, 2018/08/29
- Re: hierarchical projects with configure scripts, Tom Tromey, 2018/08/31
- Re: hierarchical projects with configure scripts, Sergio Durigan Junior, 2018/08/31
Re: max_align_t on RHEL 7.1 s390x,
Bruno Haible <=