Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Stephen Casner <casner@acm.org>
To: Nick Alcock <nick.alcock@oracle.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: new gdb build failures on MacOS X (... fallout from libintl fixups, see users/nalcock/included-gettext)
Date: Thu, 4 Feb 2021 13:40:49 -0800 (PST)	[thread overview]
Message-ID: <alpine.OSX.2.21.9999.2102041245240.86462@auge.attlocal.net> (raw)
In-Reply-To: <87k0rna7w4.fsf_-_@esperi.org.uk>

On Thu, 4 Feb 2021, Nick Alcock wrote:
> On 4 Feb 2021, Stephen Casner told this:
> > To satisfy those I need to hack the gdb/Makefile to append
> > /usr/lib/libiconv.dylib (the system libiconv, which is old) after two
> > instances of -liconv.  If I replace -liconv rather than appending then
> > I get three different undefined symbols:
>
> Hmm, so -liconv isn't loading /usr/lib/libiconv.dylib?

Sorry, I missed saying that -liconv gets /opt/local/lib/libiconv.{a,dylib}
which is the more current one that I installed.  I'm not sure how that
one is found.  I have tried --with-libiconv-prefix=/opt/local but, as
I mentioned, that causes -I./../intl to be removed from the bfd
compiles.

> The -L stuff I tore out of libopcodes and bfd (which might be relevant)
> is -L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl, which also
> does not explicitly cite libiconv. (The libiberty stuff is brought back
> in a bit further up, and the intl stuff should be retained via
> $(LTLIBINTL) as well.)
>
> >   "_libiconv", referenced from:
>
> Oh wonderful. _iconv *and* _libiconv?

Right.  So I presume one of the libraries links with one of them and
the main links with the other.

> > So the gdb link requires two different iconv libraries presumably
> > because different parts of the build choose different references.
>
> Looks like it. A full log of the compilation of gdb/ at least (and
> preferably the whole build) might give more info about which bits are
> using what.

I will follow up on that.

> > been trying to figure out how to fix this properly but so far I have
> > not gained enough familiarity with the configure and Makefile morass
> > to find the answer.  There is a --with-libiconv-prefix option for gdb,
> > but when I include that it causes -I./../intl to be removed from the
> > compile commands for bfd
>
> Yeah, intl/ also has --with-libiconv-prefix, which is probably
> triggering this -- though that just sets --prefix for the intl/ tree,
> which I wouldn't really expect to cause this (but I've never tried that
> option, so I'm not sure).

I'll try looking more there, too.

I should also point out that the native compile on macOS does not
build as or ld for reasons that I don't yet understand.  So I should
probably test your branch for my cross pdp11 build as well.  That one
does not build gdb (since it would never fit in the 16-bit address
space).

                                                        -- Steve

  parent reply	other threads:[~2021-02-04 21:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <874kird819.fsf@esperi.org.uk>
     [not found] ` <alpine.OSX.2.21.9999.2102041135350.86462@auge.attlocal.net>
2021-02-04 20:35   ` Nick Alcock via Gdb-patches
2021-02-04 20:43     ` Stephen Casner
2021-02-04 22:31       ` Nick Alcock via Gdb-patches
2021-02-04 21:40     ` Stephen Casner [this message]
2021-02-09 21:49     ` Andrew Burgess
2021-02-10 16:12       ` Christian Biesinger via Gdb-patches

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=alpine.OSX.2.21.9999.2102041245240.86462@auge.attlocal.net \
    --to=casner@acm.org \
    --cc=gdb-patches@sourceware.org \
    --cc=nick.alcock@oracle.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