Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v1] package/libcamera: fix uclibc/musl compile with libexecinfo enabled
@ 2022-01-31 23:07 Peter Seiderer
  2022-02-01 22:32 ` Peter Seiderer
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Seiderer @ 2022-01-31 23:07 UTC (permalink / raw)
  To: buildroot; +Cc: Kieran Bingham

- depend and link against libexecinfo if enabled to fix linking failure
  in case execinfo.h is detected, see
  libcamera-40f5fddca7f774944a53f58eeaebc4db79c373d8/meson.build:

   32 if cc.has_header_symbol('execinfo.h', 'backtrace')
   33     config_h.set('HAVE_BACKTRACE', 1)
   34 endif

- libexecinfo already depends on !BR2_TOOLCHAIN_USES_GLIBC

Fixes:

  - http://autobuild.buildroot.net/results/a1077815895ab847c5ca82ec17c7d13fe97cff53

  .../powerpc-buildroot-linux-uclibc/bin/ld: src/libcamera/base/libcamera-base.so.p/log.cpp.o: in function `libcamera::Logger::backtrace()':
  log.cpp:(.text+0x34b0): undefined reference to `backtrace'
  .../powerpc-buildroot-linux-uclibc/bin/ld: log.cpp:(.text+0x34c0): undefined reference to `backtrace_symbols'

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 package/libcamera/libcamera.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/libcamera/libcamera.mk b/package/libcamera/libcamera.mk
index 524cf07e03..9be45d248a 100644
--- a/package/libcamera/libcamera.mk
+++ b/package/libcamera/libcamera.mk
@@ -99,4 +99,9 @@ else
 LIBCAMERA_CONF_OPTS += -Dtracing=disabled
 endif
 
+ifeq ($(BR2_PACKAGE_LIBEXECINFO),y)
+LIBCAMERA_DEPENDENCIES += libexecinfo
+LIBCAMERA_LDFLAGS += -lexecinfo
+endif
+
 $(eval $(meson-package))
-- 
2.34.1

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

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

* Re: [Buildroot] [PATCH v1] package/libcamera: fix uclibc/musl compile with libexecinfo enabled
  2022-01-31 23:07 [Buildroot] [PATCH v1] package/libcamera: fix uclibc/musl compile with libexecinfo enabled Peter Seiderer
@ 2022-02-01 22:32 ` Peter Seiderer
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Seiderer @ 2022-02-01 22:32 UTC (permalink / raw)
  To: buildroot; +Cc: Kieran Bingham

On Tue,  1 Feb 2022 00:07:30 +0100, Peter Seiderer <ps.report@gmx.net> wrote:

> - depend and link against libexecinfo if enabled to fix linking failure
>   in case execinfo.h is detected, see
>   libcamera-40f5fddca7f774944a53f58eeaebc4db79c373d8/meson.build:
>
>    32 if cc.has_header_symbol('execinfo.h', 'backtrace')
>    33     config_h.set('HAVE_BACKTRACE', 1)
>    34 endif
>
> - libexecinfo already depends on !BR2_TOOLCHAIN_USES_GLIBC
>
> Fixes:
>
>   - http://autobuild.buildroot.net/results/a1077815895ab847c5ca82ec17c7d13fe97cff53
>
>   .../powerpc-buildroot-linux-uclibc/bin/ld: src/libcamera/base/libcamera-base.so.p/log.cpp.o: in function `libcamera::Logger::backtrace()':
>   log.cpp:(.text+0x34b0): undefined reference to `backtrace'
>   .../powerpc-buildroot-linux-uclibc/bin/ld: log.cpp:(.text+0x34c0): undefined reference to `backtrace_symbols'
>
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
>  package/libcamera/libcamera.mk | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/package/libcamera/libcamera.mk b/package/libcamera/libcamera.mk
> index 524cf07e03..9be45d248a 100644
> --- a/package/libcamera/libcamera.mk
> +++ b/package/libcamera/libcamera.mk
> @@ -99,4 +99,9 @@ else
>  LIBCAMERA_CONF_OPTS += -Dtracing=disabled
>  endif
>
> +ifeq ($(BR2_PACKAGE_LIBEXECINFO),y)
> +LIBCAMERA_DEPENDENCIES += libexecinfo
> +LIBCAMERA_LDFLAGS += -lexecinfo

Should be:

	LIBCAMERA_LDFLAGS = $(TARGET_LDFLAGS) -lexecinfo

Updated patch will follow...

Regards,
Peter

> +endif
> +
>  $(eval $(meson-package))

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

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

end of thread, other threads:[~2022-02-01 22:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-31 23:07 [Buildroot] [PATCH v1] package/libcamera: fix uclibc/musl compile with libexecinfo enabled Peter Seiderer
2022-02-01 22:32 ` Peter Seiderer

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