public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "orbea at riseup dot net" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug build/29372] New: slibtool build failure - make[2]: *** No rule to make target '../bfd/libbfd.a', needed by 'gdb'.  Stop.
Date: Fri, 15 Jul 2022 21:07:28 +0000	[thread overview]
Message-ID: <bug-29372-4717@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=29372

            Bug ID: 29372
           Summary: slibtool build failure - make[2]: *** No rule to make
                    target '../bfd/libbfd.a', needed by 'gdb'.  Stop.
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: orbea at riseup dot net
  Target Milestone: ---

Created attachment 14213
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14213&action=edit
Full Build Log

When building gdb with slibtool the build fails because '../bfd/libbfd.a' is
missing. This happens because of this earlier error.

  libtooldir=`rdlibtool --config | sed -n -e 's/^objdir=//p'`; \
  if [ -f $libtooldir/libopcodes.a ]; then \
    cp $libtooldir/libopcodes.a libopcodes.tmp; \
    x86_64-pc-linux-gnu-ranlib --plugin
/usr/libexec/gcc/x86_64-pc-linux-gnu/11.3.0/liblto_plugin.so libopcodes.tmp; \
    /bin/sh ./../move-if-change libopcodes.tmp libopcodes.a; \
  else true; fi
  rdlibtool: error: <compiler> is missing.

This is because of a hack as described in the code at 'bfd/Makefile.am'.

  # libtool will build .libs/libbfd.a.  We create libbfd.a in the build
  # directory so that we don't have to convert all the programs that use
  # libbfd.a simultaneously.  This is a hack which should be removed if
  # everything else starts using libtool.  FIXME.

https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=bfd/Makefile.am;h=670e0598f55f29f3d5db4ffa18e40dcbc390f977;hb=13c3e10f98ff9b89c12161e85bd576ea77460a83#l777

With slibtool --config works differently than with GNU libtool and peering into
the internal details for the libtool implementation is inherently not portable.
For example with slibtool I can get this output.

  $ slibtool --config gcc
  key             value                           annotation
  ---             -----                           ----------
  compiler        gcc                             
  target                                          
  host            x86_64-unknown-linux-gnu        native (cached in
ccenv/host.mk)
  flavor          linux                           derived from <host>
  ar              gcc-ar                          derived from <host>
  ranlib          x86_64-unknown-linux-gnu-ranlib derived from <host>
  windres                                         not applicable
  dlltool                                         not applicable
  mdso                                            not applicable

Is there anything that can be done to remove this hack so that both slibtool
and GNU libtool can be used to build gdb? This build system is intimidating for
someone not familiar with gdb.

Also please see this Gentoo issue where it was first reported:
https://bugs.gentoo.org/792969

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2022-07-15 21:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15 21:07 orbea at riseup dot net [this message]
2022-07-18 19:03 ` [Bug build/29372] " tromey at sourceware dot org
2022-07-20  2:38 ` orbea at riseup dot net
2022-07-20  2:45 ` orbea at riseup dot net
2022-11-05  5:51 ` sam at gentoo dot org
2022-11-05  8:26 ` vapier at gentoo dot org
2022-11-06  2:51 ` [Bug build/29372] build failure when using slibtool to replace libtool " vapier at gentoo dot org
2022-11-08 21:59 ` tromey at sourceware dot org
2022-11-08 22:45 ` orbea at riseup dot net
2022-11-09  2:21 ` tromey at sourceware dot org

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=bug-29372-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).