public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/31392] New: The GDB_AC_CHECK_BFD function fails with slibtool
@ 2024-02-16 16:52 orbea at riseup dot net
2024-02-16 16:52 ` [Bug build/31392] " orbea at riseup dot net
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: orbea at riseup dot net @ 2024-02-16 16:52 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31392
Bug ID: 31392
Summary: The GDB_AC_CHECK_BFD function fails with slibtool
Product: gdb
Version: 14.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: build
Assignee: unassigned at sourceware dot org
Reporter: orbea at riseup dot net
Target Milestone: ---
Created attachment 15371
--> https://sourceware.org/bugzilla/attachment.cgi?id=15371&action=edit
Full build log.
When building gdb using slibtool instead of GNU libtool on Gentoo Linux the
build fails with undefined references.
/usr/lib/gcc/x86_64-gentoo-linux-musl/13/../../../../x86_64-gentoo-linux-musl/bin/ld:
linux-tdep.o: in function `linux_corefile_thread(thread_info*, gdbarch*, bfd*,
std::unique_ptr<char, gdb::xfree_deleter<char> >&, int*, gdb_signal)':
linux-tdep.c:(.text+0x234c): undefined reference to
`gcore_elf_build_thread_register_notes(gdbarch*, thread_info*, gdb_signal,
bfd*, std::unique_ptr<char, gdb::xfree_deleter<char> >*, int*)'
/usr/lib/gcc/x86_64-gentoo-linux-musl/13/../../../../x86_64-gentoo-linux-musl/bin/ld:
linux-tdep.o: in function `linux_make_corefile_notes(gdbarch*, bfd*, int*)':
linux-tdep.c:(.text+0x3ba4): undefined reference to
`gcore_elf_make_tdesc_note(gdbarch*, bfd*, std::unique_ptr<char,
gdb::xfree_deleter<char> >*, int*)'
This is because the 'checking for ELF support in BFD' check fails since there
is a hard coded './libtool' in gdb/acinclude.m4 inside of the GDB_AC_CHECK_BFD
function. As should be obvious the build inherently will not work if GNU
libtool and slibtool are used at the same time.
Where slibtool is enabled by setting the $LIBTOOL variable, for example:
LIBTOOL='rlibtool'
MAKEFLAGS="LIBTOOL=${LIBTOOL}"
MAKE="make LIBTOOL=${LIBTOOL}"
However since it ends up in the configure script changing './libtool' to
'$LIBTOOL' doesn't work since it doesn't see the $LIBTOOL set in the user's
environment and because the default value for GNU libtool fails since its not
inside of a Makefile.
configure:28568: checking for ELF support in BFD
configure:28588: $(SHELL) $(top_builddir)/libtool --quiet --mode=link
x86_64-gentoo-linux-musl-gcc -o conftest -I./../include -I../bfd -I./../bfd -O2
-pipe -Werror=implicit-function-declaration -Werror=implicit-int -L../bfd
-L../libiberty conftest.c -lbfd -liberty -ltinfow -lncursesw -lm >&5
/var/tmp/portage/dev-debug/gdb-13.2-r2/work/gdb-13.2/gdb/configure:
$(SHELL): inaccessible or not found
However I was able to get it to build with both slibtool and GNU libtool with
this sed as a test:
sed -i -e 's|\./libtool --quiet --mode=link ||' -e 's|-lbfd|-lbfd -lz|'
gdb/configure
There is likely a more elegant way of doing this?
This issue was also reported to Gentoo. https://bugs.gentoo.org/923948
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug build/31392] The GDB_AC_CHECK_BFD function fails with slibtool
2024-02-16 16:52 [Bug build/31392] New: The GDB_AC_CHECK_BFD function fails with slibtool orbea at riseup dot net
@ 2024-02-16 16:52 ` orbea at riseup dot net
2024-02-16 17:20 ` tromey at sourceware dot org
2024-02-16 17:23 ` orbea at riseup dot net
2 siblings, 0 replies; 4+ messages in thread
From: orbea at riseup dot net @ 2024-02-16 16:52 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31392
--- Comment #1 from orbea <orbea at riseup dot net> ---
Created attachment 15372
--> https://sourceware.org/bugzilla/attachment.cgi?id=15372&action=edit
gdb/config.log
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug build/31392] The GDB_AC_CHECK_BFD function fails with slibtool
2024-02-16 16:52 [Bug build/31392] New: The GDB_AC_CHECK_BFD function fails with slibtool orbea at riseup dot net
2024-02-16 16:52 ` [Bug build/31392] " orbea at riseup dot net
@ 2024-02-16 17:20 ` tromey at sourceware dot org
2024-02-16 17:23 ` orbea at riseup dot net
2 siblings, 0 replies; 4+ messages in thread
From: tromey at sourceware dot org @ 2024-02-16 17:20 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31392
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |tromey at sourceware dot org
Resolution|--- |DUPLICATE
--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
I think this a dup -- of a bug you reported in the past :)
That one has some patches; but note that patch review only
happens on the mailing list.
*** This bug has been marked as a duplicate of bug 30295 ***
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug build/31392] The GDB_AC_CHECK_BFD function fails with slibtool
2024-02-16 16:52 [Bug build/31392] New: The GDB_AC_CHECK_BFD function fails with slibtool orbea at riseup dot net
2024-02-16 16:52 ` [Bug build/31392] " orbea at riseup dot net
2024-02-16 17:20 ` tromey at sourceware dot org
@ 2024-02-16 17:23 ` orbea at riseup dot net
2 siblings, 0 replies; 4+ messages in thread
From: orbea at riseup dot net @ 2024-02-16 17:23 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31392
--- Comment #3 from orbea <orbea at riseup dot net> ---
Apologies, I forgot I did that...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-16 17:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-16 16:52 [Bug build/31392] New: The GDB_AC_CHECK_BFD function fails with slibtool orbea at riseup dot net
2024-02-16 16:52 ` [Bug build/31392] " orbea at riseup dot net
2024-02-16 17:20 ` tromey at sourceware dot org
2024-02-16 17:23 ` orbea at riseup dot net
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).