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/31392] New: The GDB_AC_CHECK_BFD function fails with slibtool Date: Fri, 16 Feb 2024 16:52:05 +0000 [thread overview] Message-ID: <bug-31392-4717@http.sourceware.org/bugzilla/> (raw) 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.
next reply other threads:[~2024-02-16 16:52 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-02-16 16:52 orbea at riseup dot net [this message] 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
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-31392-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: linkBe 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).