From: Nick Alcock <nick.alcock@oracle.com>
To: Tom Tromey <tom@tromey.com>
Cc: Nick Alcock via Binutils <binutils@sourceware.org>,
gdb-patches@sourceware.org
Subject: Re: [PATCH 6/8] gdbserver: explicitly include gettext, etc in inprocess agent
Date: Mon, 08 Feb 2021 20:51:24 +0000 [thread overview]
Message-ID: <87blcuz3jn.fsf@esperi.org.uk> (raw)
In-Reply-To: <87k0rificn.fsf@tromey.com> (Tom Tromey's message of "Mon, 08 Feb 2021 12:51:52 -0700")
On 8 Feb 2021, Tom Tromey stated:
>>>>>> "Nick" == Nick Alcock via Binutils <binutils@sourceware.org> writes:
>
> Nick> The IPA uses gettext functionality, but does not link to $(LIBINTL), so
> Nick> fails to link when --with-included-gettext is specified.
>
> This seems strange to me.
>
> IIUC, IPA is intended to be a small library that is injected into the
> inferior. So, it seems to me that it should probably not use gettext.
CXXLD libinproctrace.so
/usr/bin/ld: ax-ipa.o: in function `ax_printf(unsigned long, unsigned long, char const*, int, unsigned long*) [clone .constprop.0]':
/home/oranix/oracle/private/binutils-gdb/x86_64-loom/gdbserver/../../gdbserver/ax.cc:928: undefined reference to `libintl_gettext'
/usr/bin/ld: /home/oranix/oracle/private/binutils-gdb/x86_64-loom/gdbserver/../../gdbserver/ax.cc:837: undefined reference to `libintl_gettext'
/usr/bin/ld: /home/oranix/oracle/private/binutils-gdb/x86_64-loom/gdbserver/../../gdbserver/ax.cc:889: undefined reference to `libintl_gettext'
/usr/bin/ld: ax-ipa.o: in function `gdb_eval_agent_expr(eval_agent_expr_context*, agent_expr*, unsigned long*)':
/home/oranix/oracle/private/binutils-gdb/x86_64-loom/gdbserver/../../gdbserver/ax.cc:1334: undefined reference to `libintl_gettext'
/usr/bin/ld: gdbsupport/common-utils-ipa.o: in function `xstrvprintf(char const*, __va_list_tag*)':
/home/oranix/oracle/private/binutils-gdb/x86_64-loom/gdbserver/../../gdbserver/../gdbsupport/common-utils.cc:57: undefined reference to `libintl_gettext'
/usr/bin/ld: gdbsupport/common-utils-ipa.o:/home/oranix/oracle/private/binutils-gdb/x86_64-loom/gdbserver/../../gdbserver/../gdbsupport/common-utils.cc:57: more undefined references to `libintl_gettext' follow
collect2: error: ld returned 1 exit status
There are four translated errors in ax.cc... but if you fix those you
find more uses in ../gdbsupport/common-utils.cc and then that calls
gdb_assert which also translates the assertion string and this is
starting to feel like a tail-chasing nightmare where fixing it would do
significant damage to the translatability of GDB itself.
Maybe some sort of -include hackery that redefines _ to nothing would do
the trick, or something to unconditionally disable NLS and recompile
everything it calls upon out of gdbsupport similarly just for the IPA...
but I tried for a while and haven't succeeded yet.
next prev parent reply other threads:[~2021-02-08 20:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-08 11:16 [PATCH 0/8 RFC] unbreak --with-included-gettext, and other configury stuff Nick Alcock
2021-02-08 11:16 ` [PATCH 6/8] gdbserver: explicitly include gettext, etc in inprocess agent Nick Alcock
2021-02-08 19:51 ` Tom Tromey
2021-02-08 20:51 ` Nick Alcock [this message]
2021-02-10 13:33 ` Nick Alcock
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=87blcuz3jn.fsf@esperi.org.uk \
--to=nick.alcock@oracle.com \
--cc=binutils@sourceware.org \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).