Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@ericsson.com>
To: Tobias Burnus <tobias.burnus@physik.fu-berlin.de>
Cc: <gdb-patches@sourceware.org>
Subject: Re: gdb fails to build
Date: Fri, 27 Nov 2015 22:47:00 -0000	[thread overview]
Message-ID: <5658DD73.3000607@ericsson.com> (raw)
In-Reply-To: <20151127223556.GA26669@physik.fu-berlin.de>

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) using 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".
> 
> 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.
> 
> Thus, I had "result: no" but before your patch, it didn't fail.
> 
> Sorry for the false alarm!

Ah that makes sense.

>  * * *
> 
> Still, using GCC 6 through out still fails - albeit due to an other issue:
> 
> make[4]: Entering directory `/data/local_users/tobiasb/gdb/binutils-gdb/build/gold'
> g++ -DHAVE_CONFIG_H -I. -I../../gold  -I../../gold -I../../gold/../include -I../../gold/../elfcpp -DLOCALEDIR="\"/data/local_users/tobiasb/gdb/gdb-inst/share/locale\"" -DBINDIR="\"/data/local_users/tobiasb/gdb/gdb-inst/bin\"" -DTOOLBINDIR="\"/data/local_users/tobiasb/gdb/gdb-inst/x86_64-pc-linux-gnu/bin\"" -DTOOLLIBDIR="\"/data/local_users/tobiasb/gdb/gdb-inst/x86_64-pc-linux-gnu/lib\""   -W -Wall    -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -frandom-seed=dirsearch.o -I../../gold/../zlib -g -O2 -MT dirsearch.o -MD -MP -MF .deps/dirsearch.Tpo -c -o dirsearch.o ../../gold/dirsearch.cc
> ../../gold/dirsearch.cc:125:1: error: ‘{anonymous}::Dir_caches::~Dir_caches()’ defined but not used [-Werror=unused-function]
>  Dir_caches::~Dir_caches()
>  ^~~~~~~~~~
> 
> That's with GDB 622b9eb1a6047bd3ad3e1a3f120cf7318ac25b57
> and GCC 335ce86cb6cea8046993ab93d573316fd9ff798c (r231023).
> 
> I wonder why that didn't show up with before
> when configuring with GCC 4.4 and building GCC 6.
> 
> I assume it didn't show up for you as you didn't use
> '--enable-ld --enable-gold' - or did you also build gold?
> 
> Cheers,
> 
> Tobias
> 

No I don't build gold.  I generally use the following configure line.  Since I am interested
in gdb, I disable pretty much everything else.

~/src/binutils-gdb/configure \
  --enable-targets=all \
  CFLAGS="-g3 -O0" CXXFLAGS="-g3 -O0" \
  --with-python=/usr/bin/python3 \
  --disable-ld --disable-gold --disable-gas --disable-binutils --disable-gprof

I can also see some similar warnings causing failure in bfd and opcodes, which is required to
build gdb (things like unused function/variable, variable may be used before assigned).  I then
go in the offending subdirectory and build the file without -Werror.  For you example, it would
be:

  make CFLAGS="-Wno-error" dirsearch.o

in $(builddir)/gold.  The right thing to do, however, would be to fix the warning 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 :(.


      reply	other threads:[~2015-11-27 22:47 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 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-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-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
2015-11-27 22:36       ` Tobias Burnus
2015-11-27 22:47         ` Simon Marchi [this message]

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=5658DD73.3000607@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