From: Simon Marchi <simon.marchi@ericsson.com>
To: Tobias Burnus <tobias.burnus@physik.fu-berlin.de>,
<gdb-patches@sourceware.org>
Subject: Re: gdb fails to build
Date: Fri, 27 Nov 2015 19:05:00 -0000 [thread overview]
Message-ID: <5658A991.4020302@ericsson.com> (raw)
In-Reply-To: <56587B86.4090603@ericsson.com>
On 15-11-27 10:49 AM, Simon Marchi wrote:
> On 15-11-27 08:31 AM, Tobias Burnus wrote:
>> Hello all,
>>
>> today, I fail to build gdb using GCC 6; looking at the changes, the culprit
>> seems to be this patch set. (I don't know whether it caused the issue or
>> just revealed it.) In any case, using yesterday's GDB with yesterday's GCC
>> worked.
>>
>> The error I see is for remove.c - using stddef.h via common-defs.h:
>>
>> gcc -g -O2 -I. -I../../gdb -I../../gdb/common -I../../gdb/config -DLOCALEDIR="\"gdb/gdb-inst/share/locale\"" -DHAVE_CONFIG_H -I../../gdb/../include/opcode -I../../gdb/../opcodes/.. -I../../gdb/../readline/.. -I../../gdb/../zlib -I../bfd -I../../gdb/../bfd -I../../gdb/../include -I../libdecnumber -I../../gdb/../libdecnumber -I../../gdb/gnulib/import -Ibuild-gnulib/import -DTUI=1 -Ipython/python/include/python2.7 -Ipython/python/include/python2.7 -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wpointer-sign -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition -Wformat-nonliteral -Werror -c -o remote.o -MT remote.o -MMD -MP -MF .deps/remote.Tpo ../../gdb/remote.c
>>
>> In file included from build-gnulib/import/stdio.h:53:0,
>> from ../../gdb/common/common-defs.h:31,
>> from ../../gdb/defs.h:28,
>> from ../../gdb/remote.c:22:
>> build-gnulib/import/stddef.h:104:3: error: conflicting types for ‘max_align_t’
>> } max_align_t;
>> ^
>>
>> In file included from build-gnulib/import/stddef.h:55:0,
>> from build-gnulib/import/stdio.h:53,
>> from ../../gdb/common/common-defs.h:31,
>> from ../../gdb/defs.h:28,
>> from ../../gdb/remote.c:22:
>> gcc/gcc-trunk/lib/gcc/x86_64-pc-linux-gnu/6.0.0/include/stddef.h:429:3: note: previous declaration of ‘max_align_t’ was here
>> } max_align_t;
>> ^
>>
>>
>> The definitions are as follows. GCC 6:
>>
>> typedef struct {
>> long long __max_align_ll __attribute__((__aligned__(__alignof__(long long))));
>> long double __max_align_ld __attribute__((__aligned__(__alignof__(long double))));
>> } max_align_t;
>>
>>
>>
>> GDB's build-gnulib:
>>
>> typedef union
>> {
>> char *__p _GL_STDDEF_ALIGNAS (char *);
>> double __d _GL_STDDEF_ALIGNAS (double);
>> long double __ld _GL_STDDEF_ALIGNAS (long double);
>> long int __i _GL_STDDEF_ALIGNAS (long int);
>> } max_align_t;
>>
>>
>> Cheers,
>>
>> Tobias
>
> I am trying to build gcc from the tree to see if I can reproduce the failure. However,
> I really can't see how this patch could cause this kind of failure... We'll see.
I just tested building gdb (622b9eb1a6047bd3ad3e1a3f120cf7318ac25b57) using gcc master:
/opt/gcc/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/opt/gcc/bin/gcc
COLLECT_LTO_WRAPPER=/opt/gcc/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/emaisin/src/gcc/configure --enable-languages=c,c++ --disable-bootstrap --prefix=/opt/gcc
Thread model: posix
gcc version 6.0.0 20151127 (experimental) (GCC)
and it works fine. Have you done a build from scratch or an incremental one? I would suggest
retrying from scratch. If you try to incrementally build, but with different compilers, then the
options configure found for the first compiler (such as whether stddef.h defines max_align_t)
might not work for the second compiler.
In gdb/build-gnulib/config.log, I have:
965 configure:16981: checking for max_align_t
966 configure:16981: result: yes
I suppose that yours says "no".
Simon
next prev parent reply other threads:[~2015-11-27 19:05 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 21:49 [PATCH v2 0/3] Remote thread name support Simon Marchi
2015-11-25 21:49 ` [PATCH v2 3/3] Add test for thread names Simon Marchi
2015-11-26 11:45 ` Pedro Alves
2015-11-26 16:00 ` Simon Marchi
2015-11-26 16:57 ` Pedro Alves
2015-11-26 18:21 ` Simon Marchi
2015-11-25 21:49 ` [PATCH v2 1/3] Constify thread name return path Simon Marchi
2015-11-26 11:21 ` Pedro Alves
2015-11-26 15:46 ` Simon Marchi
2015-11-25 21:49 ` [PATCH v2 2/3] Display names of remote threads Simon Marchi
2015-11-26 11:32 ` Pedro Alves
2015-11-26 15:52 ` Simon Marchi
2015-11-26 16:30 ` Pedro Alves
2015-11-26 17:00 ` Simon Marchi
2015-11-27 14:37 ` Yao Qi
2015-11-27 15:16 ` Simon Marchi
2015-12-01 17:08 ` [commit] Fix build error (Re: [PATCH v2 2/3] Display names of remote threads) Ulrich Weigand
2015-12-01 17:54 ` Simon Marchi
2015-11-27 13:31 ` gdb fails to build (was: Re: [PATCH v2 0/3] Remote thread name support) Tobias Burnus
2015-11-27 15:49 ` gdb fails to build Simon Marchi
2015-11-27 19:05 ` Simon Marchi [this message]
2015-11-27 22:36 ` Tobias Burnus
2015-11-27 22:47 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5658A991.4020302@ericsson.com \
--to=simon.marchi@ericsson.com \
--cc=gdb-patches@sourceware.org \
--cc=tobias.burnus@physik.fu-berlin.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox