Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@ericsson.com>
To: <gdb-patches@sourceware.org>
Cc: <binutils@sourceware.org>
Subject: Re: [PATCH] gdb: Update autotools version used for gnulib import
Date: Fri, 04 May 2018 19:34:00 -0000	[thread overview]
Message-ID: <b400d1d8-29c4-dc3b-151d-ce72b80e5a53@ericsson.com> (raw)
In-Reply-To: <1525459337-26977-1-git-send-email-simon.marchi@ericsson.com>

On 2018-05-04 02:42 PM, Simon Marchi wrote:
> When trying to run the update-gnulib.sh script, I get this:
> 
> Error: Wrong automake version (Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^      =:+{}]+)}/ at /opt/automake/1.11.1/bin/automake line 4113.), we need 1.11.1.
> Aborting.
> 
> It's an issue with a regex in automake that triggers a warning starting
> with Perl 5.22.  It has been fixed in automake 1.15.1.  So I think it's
> a good excuse to bump the versions of autoconf and automake used in the
> gnulib import.
> 
> For autoconf, the 2.69 version is universally available, so it'S an easy
> choice.  For automake, different distros and distro versions have
> different automake versions, so there's no version that would make
> everybody happy.  I just went with 1.16.1, the latest release.  It's
> quite easy to build it from source.
> 
> The newer automake errors out and points out that we should modernize
> our usage of AM_INIT_AUTOMAKE:
> 
>   https://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
> 
> so I did that too.
> 
> It also complains about missing ../../ar-lib, so I ran automake
> --add-missing to add it (which is why I CCed the binutils mailing list).

When doing a full build, I got a few of these errors which I did not get previously:

  CXX    gdb.o
In file included from /home/emaisin/src/binutils-gdb/gdb/common/common-defs.h:32:0,
                 from /home/emaisin/src/binutils-gdb/gdb/defs.h:28,
                 from /home/emaisin/src/binutils-gdb/gdb/gdb.c:19:
./build-gnulib/config.h:1596:0: error: "PACKAGE_NAME" redefined [-Werror]
 #define PACKAGE_NAME "libgnu"
 ^
In file included from /home/emaisin/src/binutils-gdb/gdb/common/common-defs.h:23:0,
                 from /home/emaisin/src/binutils-gdb/gdb/defs.h:28,
                 from /home/emaisin/src/binutils-gdb/gdb/gdb.c:19:
./config.h:615:0: note: this is the location of the previous definition
 #define PACKAGE_NAME ""
 ^

The problem is that gdb/configure and gdb/gnulib/configure now generate different
value for these macros.  I don't think we really care about these values, so
we can probably just undef them between including both config.h files.  To be safe,
I also suggest undefining them after, to be sure we don't rely on them anywhere.  I
would amend the original patch with the one below.


diff --git a/gdb/common/common-defs.h b/gdb/common/common-defs.h
index 881a4ea..eb0ec21 100644
--- a/gdb/common/common-defs.h
+++ b/gdb/common/common-defs.h
@@ -21,12 +21,23 @@
 #define COMMON_DEFS_H

 #include "config.h"
+
+#undef PACKAGE_NAME
+#undef PACKAGE_VERSION
+#undef PACKAGE_STRING
+#undef PACKAGE_TARNAME
+
 #ifdef GDBSERVER
 #include "build-gnulib-gdbserver/config.h"
 #else
 #include "build-gnulib/config.h"
 #endif

+#undef PACKAGE_NAME
+#undef PACKAGE_VERSION
+#undef PACKAGE_STRING
+#undef PACKAGE_TARNAME
+
 /* From:
     https://www.gnu.org/software/gnulib/manual/html_node/stdint_002eh.html


  reply	other threads:[~2018-05-04 19:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-04 18:44 Simon Marchi
2018-05-04 19:34 ` Simon Marchi [this message]
2018-05-07  6:15 ` Alan Modra
2018-05-07 14:28   ` Simon Marchi
2018-05-08  2:30     ` Update autotools version for gdb and binutils Alan Modra
2018-05-08 20:39       ` Matt Rice
2018-05-08 22:12       ` Joseph Myers
2018-05-09 15:46         ` Simon Marchi
2018-05-10 14:40           ` Alan Modra
2018-06-15  0:49             ` 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=b400d1d8-29c4-dc3b-151d-ce72b80e5a53@ericsson.com \
    --to=simon.marchi@ericsson.com \
    --cc=binutils@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    /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