From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126285 invoked by alias); 27 Nov 2015 22:47:21 -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 126191 invoked by uid 89); 27 Nov 2015 22:47:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham 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 22:47:18 +0000 Received: from EUSAAHC007.ericsson.se (Unknown_Domain [147.117.188.93]) by usplmg21.ericsson.net (Symantec Mail Security) with SMTP id 4B.B3.32102.27DD8565; Fri, 27 Nov 2015 23:47:15 +0100 (CET) Received: from [142.133.110.144] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.95) with Microsoft SMTP Server id 14.3.248.2; Fri, 27 Nov 2015 17:47:16 -0500 Subject: Re: gdb fails to build To: Tobias Burnus References: <20151127133145.GA26571@physik.fu-berlin.de> <56587B86.4090603@ericsson.com> <5658A991.4020302@ericsson.com> <20151127223556.GA26669@physik.fu-berlin.de> CC: From: Simon Marchi Message-ID: <5658DD73.3000607@ericsson.com> Date: Fri, 27 Nov 2015 22:47: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: <20151127223556.GA26669@physik.fu-berlin.de> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00597.txt.bz2 On 15-11-27 05:35 PM, Tobias Burnus wrote: > On Fri, Nov 27, 2015 at 02:05:53PM -0500, Simon Marchi wrote: >> I just tested building gdb (622b9eb1a6047bd3ad3e1a3f120cf7318ac25b57) us= ing gcc master: >> /opt/gcc/bin/gcc -v >> gcc version 6.0.0 20151127 (experimental) (GCC) >> and it works fine. Have you done a build from scratch or an incremental= one? >> >> 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". >=20 > I think I found the issue of mine: I accidentally start a new > shell in my build script: > time (make "$@" && make install) > which overrides the set PATH - such that ./configure runs with > /usr/bin/gcc while make runs with gcc 6. >=20 > Thus, I had "result: no" but before your patch, it didn't fail. >=20 > Sorry for the false alarm! Ah that makes sense. > * * * >=20 > Still, using GCC 6 through out still fails - albeit due to an other issue: >=20 > make[4]: Entering directory `/data/local_users/tobiasb/gdb/binutils-gdb/b= uild/gold' > g++ -DHAVE_CONFIG_H -I. -I../../gold -I../../gold -I../../gold/../includ= e -I../../gold/../elfcpp -DLOCALEDIR=3D"\"/data/local_users/tobiasb/gdb/gdb= -inst/share/locale\"" -DBINDIR=3D"\"/data/local_users/tobiasb/gdb/gdb-inst/= bin\"" -DTOOLBINDIR=3D"\"/data/local_users/tobiasb/gdb/gdb-inst/x86_64-pc-l= inux-gnu/bin\"" -DTOOLLIBDIR=3D"\"/data/local_users/tobiasb/gdb/gdb-inst/x8= 6_64-pc-linux-gnu/lib\"" -W -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_= OFFSET_BITS=3D64 -frandom-seed=3Ddirsearch.o -I../../gold/../zlib -g -O2 -M= T dirsearch.o -MD -MP -MF .deps/dirsearch.Tpo -c -o dirsearch.o ../../gold/= dirsearch.cc > ../../gold/dirsearch.cc:125:1: error: =E2=80=98{anonymous}::Dir_caches::~= Dir_caches()=E2=80=99 defined but not used [-Werror=3Dunused-function] > Dir_caches::~Dir_caches() > ^~~~~~~~~~ >=20 > That's with GDB 622b9eb1a6047bd3ad3e1a3f120cf7318ac25b57 > and GCC 335ce86cb6cea8046993ab93d573316fd9ff798c (r231023). >=20 > I wonder why that didn't show up with before > when configuring with GCC 4.4 and building GCC 6. >=20 > I assume it didn't show up for you as you didn't use > '--enable-ld --enable-gold' - or did you also build gold? >=20 > Cheers, >=20 > Tobias >=20 No I don't build gold. I generally use the following configure line. Sinc= e I am interested in gdb, I disable pretty much everything else. ~/src/binutils-gdb/configure \ --enable-targets=3Dall \ CFLAGS=3D"-g3 -O0" CXXFLAGS=3D"-g3 -O0" \ --with-python=3D/usr/bin/python3 \ --disable-ld --disable-gold --disable-gas --disable-binutils --disable-gp= rof I can also see some similar warnings causing failure in bfd and opcodes, wh= ich is required to build gdb (things like unused function/variable, variable may be used befor= e assigned). I then go in the offending subdirectory and build the file without -Werror. For y= ou example, it would be: make CFLAGS=3D"-Wno-error" dirsearch.o in $(builddir)/gold. The right thing to do, however, would be to fix the w= arning at the source. So if time was not an issue, I would go and fix all these little warnings, = but unfortunately I don't have that luxury :(.