public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/29372] New: slibtool build failure - make[2]: *** No rule to make target '../bfd/libbfd.a', needed by 'gdb'.  Stop.
@ 2022-07-15 21:07 orbea at riseup dot net
  2022-07-18 19:03 ` [Bug build/29372] " tromey at sourceware dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: orbea at riseup dot net @ 2022-07-15 21:07 UTC (permalink / raw)
  To: gdb-prs

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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-11-09  2:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-15 21:07 [Bug build/29372] New: slibtool build failure - make[2]: *** No rule to make target '../bfd/libbfd.a', needed by 'gdb'. Stop orbea at riseup dot net
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

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).