Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2, 1/1] package/binutils: fix install of libsframe
@ 2023-09-19  6:15 Fabrice Fontaine
  2023-09-20 19:35 ` Thomas Petazzoni via buildroot
  2023-09-25 11:43 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2023-09-19  6:15 UTC (permalink / raw)
  To: buildroot; +Cc: Giulio Benetti, Romain Naour, Fabrice Fontaine

Fix the following build failure with oprofile raised since bump of
binutils to version 2.40 in commit
35656482d3b74ab12a6c2395ac9ca61b60a2fd49:

configure: error: bfd library not found

[...]

configure:17928: checking for bfd_openr in -lbfd
configure:17953: /home/buildroot/autobuild/run/instance-1/output-1/host/bin/arm-linux-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  conftest.c -lbfd  -liberty -lpopt  -ldl -lintl >&5
/home/buildroot/autobuild/run/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/12.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: warning: libsframe.so.0, needed by /home/buildroot/autobuild/run/instance-1/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libbfd.so, not found (try using -rpath or -rpath-link)

Indeed, in this case, libsframe is not installed even after applying
commit 1b4d921e1da614a72fed2a79d5c4f8e0b6d1cd45 because
BR2_BINUTILS_VERSION_2_40_X is not selected by anyone (binutils package
is selected by oprofile and the toolchain is not generated by buildroot)

To fix this issue, invert the logic: install libsframe by default (i.e.
when binutils is selected or with a buildroot toolchain). libsframe will
not be installed only if binutils < 2.40 is detected.

Fixes:
 - http://autobuild.buildroot.org/results/af9a2d52823a332b48e6df14d2708b6a4b3833a4

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Changes v1 -> v2 (after review of Baruch Siach):
 - Fix title typo

 package/binutils/Config.in.host | 6 +++---
 package/binutils/binutils.mk    | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/binutils/Config.in.host b/package/binutils/Config.in.host
index 36436c0b27..bc7dc4443c 100644
--- a/package/binutils/Config.in.host
+++ b/package/binutils/Config.in.host
@@ -5,7 +5,7 @@ config BR2_PACKAGE_HOST_BINUTILS_SUPPORTS_CFI
 	default y
 	depends on !BR2_microblaze
 
-config BR2_PACKAGE_BINUTILS_HAS_LIBSFRAME
+config BR2_PACKAGE_BINUTILS_HAS_NO_LIBSFRAME
 	bool
 
 choice
@@ -17,18 +17,18 @@ choice
 
 config BR2_BINUTILS_VERSION_2_39_X
 	bool "binutils 2.39"
+	select BR2_PACKAGE_BINUTILS_HAS_NO_LIBSFRAME
 
 config BR2_BINUTILS_VERSION_2_40_X
 	bool "binutils 2.40"
-	select BR2_PACKAGE_BINUTILS_HAS_LIBSFRAME
 
 config BR2_BINUTILS_VERSION_2_41_X
 	bool "binutils 2.41"
-	select BR2_PACKAGE_BINUTILS_HAS_LIBSFRAME
 
 config BR2_BINUTILS_VERSION_ARC
 	bool "binutils arc (2.34.50)"
 	depends on BR2_arc
+	select BR2_PACKAGE_BINUTILS_HAS_NO_LIBSFRAME
 
 endchoice
 
diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
index ecb00077d6..4bc1b69fa0 100644
--- a/package/binutils/binutils.mk
+++ b/package/binutils/binutils.mk
@@ -105,7 +105,7 @@ endif
 # our TARGET_CONFIGURE_ARGS are taken into consideration for those
 BINUTILS_MAKE_ENV = $(TARGET_CONFIGURE_ARGS)
 
-ifeq ($(BR2_PACKAGE_BINUTILS_HAS_LIBSFRAME),y)
+ifeq ($(BR2_PACKAGE_BINUTILS_HAS_NO_LIBSFRAME),)
 define BINUTILS_INSTALL_STAGING_LIBSFRAME
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libsframe DESTDIR=$(STAGING_DIR) install
 endef
-- 
2.40.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2, 1/1] package/binutils: fix install of libsframe
  2023-09-19  6:15 [Buildroot] [PATCH v2, 1/1] package/binutils: fix install of libsframe Fabrice Fontaine
@ 2023-09-20 19:35 ` Thomas Petazzoni via buildroot
  2023-09-25 11:43 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-09-20 19:35 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Giulio Benetti, Romain Naour, buildroot

On Tue, 19 Sep 2023 08:15:56 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Fix the following build failure with oprofile raised since bump of
> binutils to version 2.40 in commit
> 35656482d3b74ab12a6c2395ac9ca61b60a2fd49:
> 
> configure: error: bfd library not found
> 
> [...]
> 
> configure:17928: checking for bfd_openr in -lbfd
> configure:17953: /home/buildroot/autobuild/run/instance-1/output-1/host/bin/arm-linux-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  conftest.c -lbfd  -liberty -lpopt  -ldl -lintl >&5
> /home/buildroot/autobuild/run/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/12.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: warning: libsframe.so.0, needed by /home/buildroot/autobuild/run/instance-1/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libbfd.so, not found (try using -rpath or -rpath-link)
> 
> Indeed, in this case, libsframe is not installed even after applying
> commit 1b4d921e1da614a72fed2a79d5c4f8e0b6d1cd45 because
> BR2_BINUTILS_VERSION_2_40_X is not selected by anyone (binutils package
> is selected by oprofile and the toolchain is not generated by buildroot)
> 
> To fix this issue, invert the logic: install libsframe by default (i.e.
> when binutils is selected or with a buildroot toolchain). libsframe will
> not be installed only if binutils < 2.40 is detected.
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/af9a2d52823a332b48e6df14d2708b6a4b3833a4
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> Changes v1 -> v2 (after review of Baruch Siach):
>  - Fix title typo

I think I would have preferred to keep positive logic and do it like
this:

config BR2_PACKAGE_BINUTILS_HAS_LIBSFRAME
	bool
	default y if !BR2_BINUTILS_VERSION_2_39_X && !BR2_BINUTILS_VERSION_ARC

but OK, those "old" binutils versions are soon going to go away, so
this BR2_PACKAGE_BINUTILS_HAS_NO_LIBSFRAME is not going to be there
forever. So I've applied your patch. Thanks!

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2, 1/1] package/binutils: fix install of libsframe
  2023-09-19  6:15 [Buildroot] [PATCH v2, 1/1] package/binutils: fix install of libsframe Fabrice Fontaine
  2023-09-20 19:35 ` Thomas Petazzoni via buildroot
@ 2023-09-25 11:43 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2023-09-25 11:43 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Giulio Benetti, Romain Naour, buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Fix the following build failure with oprofile raised since bump of
 > binutils to version 2.40 in commit
 > 35656482d3b74ab12a6c2395ac9ca61b60a2fd49:

 > configure: error: bfd library not found

 > [...]

 > configure:17928: checking for bfd_openr in -lbfd
 > configure:17953:
 > /home/buildroot/autobuild/run/instance-1/output-1/host/bin/arm-linux-gcc
 > -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
 > -D_FILE_OFFSET_BITS=64 -Os -g0 -D_LARGEFILE_SOURCE
 > -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lbfd -liberty
 > -lpopt -ldl -lintl >&5
 > /home/buildroot/autobuild/run/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/12.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld:
 > warning: libsframe.so.0, needed by
 > /home/buildroot/autobuild/run/instance-1/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libbfd.so,
 > not found (try using -rpath or -rpath-link)

 > Indeed, in this case, libsframe is not installed even after applying
 > commit 1b4d921e1da614a72fed2a79d5c4f8e0b6d1cd45 because
 > BR2_BINUTILS_VERSION_2_40_X is not selected by anyone (binutils package
 > is selected by oprofile and the toolchain is not generated by buildroot)

 > To fix this issue, invert the logic: install libsframe by default (i.e.
 > when binutils is selected or with a buildroot toolchain). libsframe will
 > not be installed only if binutils < 2.40 is detected.

 > Fixes:
 >  - http://autobuild.buildroot.org/results/af9a2d52823a332b48e6df14d2708b6a4b3833a4

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
 > ---
 > Changes v1 -> v2 (after review of Baruch Siach):
 >  - Fix title typo

Committed to 2023.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-09-25 11:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-19  6:15 [Buildroot] [PATCH v2, 1/1] package/binutils: fix install of libsframe Fabrice Fontaine
2023-09-20 19:35 ` Thomas Petazzoni via buildroot
2023-09-25 11:43 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox