Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: gdb-patches@sources.redhat.com, binutils@sources.redhat.com
Cc: Mark Kettenis <kettenis@gnu.org>
Subject: [commit] Fix ENABLE_NLS; Was .... use ../intl/ when present
Date: Mon, 31 Jan 2005 21:22:00 -0000	[thread overview]
Message-ID: <41FEA14D.6000108@gnu.org> (raw)
In-Reply-To: <200501272037.j0RKbXCc001715@elgar.sibelius.xs4all.nl>

[-- Attachment #1: Type: text/plain, Size: 5420 bytes --]

Hello,

First lets address the technical problem:

[Several days scrounging up and installing a FreeBSD m/c, 10 minutes 
writing a patch, and then another day testing it later ...]

I've also committed the attached.  It fixes a problem where ENABLE_NLS 
was being set when there was no "nls".

This time I've regenerated both the relevant gdb and binutils configures 
(where applicable using autoconf-2.13 per Ian's recommendation).

This time I've also built things per the attached table (using CVS, not 
a snapshot - more on that latter):

                PPC-GNU/Linux    FreeBSD-4.9
gdb-default        built           built
gdb-disable        built           built
gdb-enable         built           built
bfd-default        built          [msgfmt]
bfd-disable        built          [msgfmt]
bfd-enable         built           built

Notes:

PPC-GNU/Linux: Has a full gettext installation
FreeBSD-4.9: Doesn't.
gdb-*: GDB from CVS with attach patch
bfd-*: BINUTILS from CVS with attached patch
*-default: Straight out-of-box config/build
*-disable: Configured with --disable-nls
*-enable: Configured with --enable-nls

And finally, [msgfmt]: BFD barfed vis:
   make  all-recursive
   Making all in doc
   Making all in po
   file=/home/cygnus/cagney/BINUTILS/src/bfd/po/`echo fr | sed 
's,.*/,,'`.gmo  && rm -f $file && PATH=../src:$PATH msgfmt -o $file 
/home/cygnus/cagney/BINUTILS/src/bfd/po/fr.po
   msgfmt: not found
   *** Error code 127
   Stop in /home/cagney/BINUTILS/native/bfd/po.

As you can see GDB is building fine out of CVS.  BINUTILS on the other 
hand has trouble - it can only be built if msgfmt is installed (intl/ 
doesn't include this).  (Mark, suspecting something like this is why I 
asked that you use a snapshot - it should at least avoid that).

Now the logistic, or as some would describe it, political problem:

Mark Kettenis wrote:

>    The attached should fix a further problem - it was appending NONE as the 
>    catalog suffix.  Again tested on a system with installed gettext, and 
>    with --disable-nls (which isn't very useful).
> 
>    If people still encounter problems can they please include a few details 
>    such as the broken Makefile.  Otherwize I'm put in a situtation where 
>    I'm flying blind :-(

Per above, 10 minutes with a machine with the bug and a trivial tweak 
fixes the problem, and gets GDB building when binutils can't.

> Sorry Andrew, but this just helps a tiny little bit.  I'm sorry that I
> didn't provide more details, but I wasn't asking you to fix
> gettext.m4.  The problem here is that gettext.m4 was only designed to
> be used with an included intl/ subdirectory.  Therefore it does only a
> halfhearted check for an external intl/ and never ever disables
> internationalization unless you explicitly ask for it by specifying
> --disable-nls on the command line.  Removing intl/ was a mistake that
> did go unnoticed because of limitations of cvs.  When I first noticed
> the problem in december, I looked at whether we could fix gettext.m4.
> My assessment was that it wasn't easy and that it would be much easier
> to simply bring back intl/.  Our motivation for removing intl/ was
> that it somethings caused build problems, but we never analyzed those
> problems quite in detail (my suspicion is that this case is similar to
> the ncurses breakage; compiler searching /usr/local/include but the
> linker not searching /usr/local/lib or the other way around).
> 
> The proper way to fix this seems to be to bring over intl/ from GCC.
> The wish has been expressed several times on the gdb and binutils
> mailing lists, and I haven't seen any objections.  I'll commit myself
> to doing the work in march if you'll bring back intl/ in the meantime.

GDB got out of the business of using src/intl/ for a very simple reason, 
it was broken, un-maintained, and out-of-date (sound familar?  think 
src/dejagnu/ :-).

The decision made was to drop the existing src/intl/ (known to not build 
on several systems) and instead have GDB use an external gettext when 
available, and none otherwise.  Once GDB's i18ed (at the time 0% of GDB 
was i18n) and once intl/ was up-to-date the decision was to be reviewed. 
  This way we could ensure that GDB at least built on all systems.

While regrettable, it's not unsurprising that the decision's 
implementation had a few hiccups - after all the bulk of developers 
building GDB on systems with a bundled gettext the relevant code paths 
went untested.  Oops!

The key thing to note though is that such teething problems don't 
necessarily imply the immediate need to reverse that decision.  In fact 
doing so just re-arranges the deck chairs on the titanic - it might fix 
some systems but sure as hell doesn't fix others (see above, it can't 
fix FreeBSD built from CVS).

Contrast that to the action taken - by instead fixing the configury 
problems we've now [hopefully] got a GDB that builds builds on any 
system that lacks i18n (be it a snapshot or from CVS).

Andrew

PS: It's worth nothing that the proposal to upgrade src/intl/ is 
currently blocked by BINUTILS.  It can't be scheduled until after the 
next BINUTILS has branched.

PPS: Perhaps BINUTILS turn to re-think their position - "focus on the 
core competencies" and get out of the business of maintaining intl/.

PPPS: Systems such as FreeBSD eventually end up installing gettext as 
part of the ports/packages install process.

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1007 bytes --]

2005-01-31  Andrew Cagney  <cagney@gnu.org>

	* gettext.m4: Only set ENABLE_NLS when gettext is present.

Index: gettext.m4
===================================================================
RCS file: /cvs/src/src/gettext.m4,v
retrieving revision 1.5
diff -p -u -r1.5 gettext.m4
--- gettext.m4	27 Jan 2005 14:47:56 -0000	1.5
+++ gettext.m4	31 Jan 2005 20:27:37 -0000
@@ -24,7 +24,6 @@ AC_DEFUN([CY_WITH_NLS],
 
     dnl If we use NLS figure out what method
     if test "$USE_NLS" = "yes"; then
-      AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested])
       AC_MSG_CHECKING([whether included gettext is requested])
       AC_ARG_WITH(included-gettext,
         [  --with-included-gettext use the GNU gettext library included here],
@@ -156,6 +155,9 @@ AC_DEFUN([CY_WITH_NLS],
     AC_SUBST(INTLOBJS)
     AC_SUBST(POFILES)
     AC_SUBST(POSUB)
+    if test "x$CATOBJEXT" != "x"; then
+      AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested])
+    fi
   ])
 
 AC_DEFUN([CY_GNU_GETTEXT],

  reply	other threads:[~2005-01-31 21:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-18  0:04 [patch/rfc] Only " Andrew Cagney
2005-01-18  0:24 ` Andreas Schwab
2005-01-24 19:35   ` Andrew Cagney
2005-01-24 19:32 ` Andrew Cagney
2005-01-27 14:59   ` [commit] Avoid CATOBJEXT=NONE; Was: " Andrew Cagney
2005-01-27 20:40     ` Mark Kettenis
2005-01-31 21:22       ` Andrew Cagney [this message]
2005-01-31 21:46         ` [commit] Fix ENABLE_NLS; Was .... " Daniel Jacobowitz
2005-01-31 22:37           ` Andrew Cagney

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=41FEA14D.6000108@gnu.org \
    --to=cagney@gnu.org \
    --cc=binutils@sources.redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kettenis@gnu.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