From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112207 invoked by alias); 27 Nov 2015 19:05:58 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 112197 invoked by uid 89); 27 Nov 2015 19:05:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: usplmg21.ericsson.net Received: from usplmg21.ericsson.net (HELO usplmg21.ericsson.net) (198.24.6.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 27 Nov 2015 19:05:56 +0000 Received: from EUSAAHC003.ericsson.se (Unknown_Domain [147.117.188.81]) by usplmg21.ericsson.net (Symantec Mail Security) with SMTP id E3.98.32102.099A8565; Fri, 27 Nov 2015 20:05:53 +0100 (CET) Received: from [142.133.110.144] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.83) with Microsoft SMTP Server id 14.3.248.2; Fri, 27 Nov 2015 14:05:53 -0500 Subject: Re: gdb fails to build To: Tobias Burnus , References: <20151127133145.GA26571@physik.fu-berlin.de> <56587B86.4090603@ericsson.com> From: Simon Marchi Message-ID: <5658A991.4020302@ericsson.com> Date: Fri, 27 Nov 2015 19:05:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56587B86.4090603@ericsson.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00595.txt.bz2 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 culp= rit >> 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 G= CC >> 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 -DLOC= ALEDIR=3D"\"gdb/gdb-inst/share/locale\"" -DHAVE_CONFIG_H -I../../gdb/../inc= lude/opcode -I../../gdb/../opcodes/.. -I../../gdb/../readline/.. -I../../gd= b/../zlib -I../bfd -I../../gdb/../bfd -I../../gdb/../include -I../libdecnum= ber -I../../gdb/../libdecnumber -I../../gdb/gnulib/import -Ibuild-gnulib/i= mport -DTUI=3D1 -Ipython/python/include/python2.7 -Ipython/python/includ= e/python2.7 -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-funct= ion -Wno-switch -Wno-char-subscripts -Wempty-body -Wpointer-sign -Wmissing-= prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wold-sty= le-declaration -Wold-style-definition -Wformat-nonliteral -Werror -c -o rem= ote.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 =E2=80= =98max_align_t=E2=80=99 >> } 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 =E2=80=98max_align_t=E2=80=99 was here >> } max_align_t; >> ^ >> >> >> The definitions are as follows. GCC 6: >> >> typedef struct { >> long long __max_align_ll __attribute__((__aligned__(__alignof__(long l= ong)))); >> 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 >=20 > I am trying to build gcc from the tree to see if I can reproduce the fail= ure. 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=3D/opt/gcc/bin/gcc COLLECT_LTO_WRAPPER=3D/opt/gcc/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wr= apper Target: x86_64-pc-linux-gnu Configured with: /home/emaisin/src/gcc/configure --enable-languages=3Dc,c++= --disable-bootstrap --prefix=3D/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 on= e? I would suggest retrying from scratch. If you try to incrementally build, but with differe= nt compilers, then the options configure found for the first compiler (such as whether stddef.h de= fines 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