From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A5136385803B; Fri, 16 Feb 2024 16:52:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A5136385803B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1708102326; bh=m9eEDuuj8YmWUlGxAg7+vzBW0sM1YpYOun+lQOAqVJI=; h=From:To:Subject:Date:From; b=LCWdBCQEvnUDu9ZIb25fUF42/Qqokh2uA0FaZFsQ+Nm/krIz17Ae/347EFOI1xcxY GPDnAb+5mruy366wEJxNpcV42E42qQhYbosffqYg717SaDBUyVvRDF76t4B+ymzzdo otwDnusVCJ7aKXwLpN6TipaQHzrwKDCTUjKoU+u8= From: "orbea at riseup dot net" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: build X-Bugzilla-Version: 14.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: orbea at riseup dot net X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31392 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=3D15371&action=3Ded= it Full build log. When building gdb using slibtool instead of GNU libtool on Gentoo Linux the build fails with undefined references. =20=20=20 /usr/lib/gcc/x86_64-gentoo-linux-musl/13/../../../../x86_64-gentoo-linux-mu= sl/bin/ld: linux-tdep.o: in function `linux_corefile_thread(thread_info*, gdbarch*, bf= d*, std::unique_ptr >&, 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 >*, int*)' =20=20=20 /usr/lib/gcc/x86_64-gentoo-linux-musl/13/../../../../x86_64-gentoo-linux-mu= sl/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 >*, int*)' This is because the 'checking for ELF support in BFD' check fails since the= re 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=3D'rlibtool' MAKEFLAGS=3D"LIBTOOL=3D${LIBTOOL}" MAKE=3D"make LIBTOOL=3D${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 n= ot inside of a Makefile. configure:28568: checking for ELF support in BFD configure:28588: $(SHELL) $(top_builddir)/libtool --quiet --mode=3Dlink x86_64-gentoo-linux-musl-gcc -o conftest -I./../include -I../bfd -I./../bfd= -O2 -pipe -Werror=3Dimplicit-function-declaration -Werror=3Dimplicit-int -L../b= fd -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 wi= th this sed as a test: sed -i -e 's|\./libtool --quiet --mode=3Dlink ||' -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 --=20 You are receiving this mail because: You are on the CC list for the bug.=