All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2, 1/2] package/openipmi: add libexecinfo optional dependency
Date: Sun, 30 Oct 2022 19:20:41 +0100	[thread overview]
Message-ID: <20221030182041.GX1058960@scaer> (raw)
In-Reply-To: <20221030175632.4139-1-fontaine.fabrice@gmail.com>

Fabrice, All,

On 2022-10-30 18:56 +0100, Fabrice Fontaine spake thusly:
> Add libexecinfo optional dependency as upstream rejected the patch to
> add --with-execinfo=no

Indeed, they rejected it, but they suggested an alternate solution:
check for backtrace() and whether it requires -lexecinfo.

Something like:

    AC_SEARCH_LIBS(
        [backtrace],
        [execinfo],
        ,
        [AC_MSG_ERROR([backtrace() not found and no library provides it; maybe install libexecinfo])]
    )

Regards,
Yann E. MORIN.

> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> Changes v1 -> v2 (after review of Yann E. Morin):
>  - Add missing local patch
> 
>  ...igure.ac-add-without-execinfo-option.patch | 55 -------------------
>  package/openipmi/openipmi.mk                  |  6 +-
>  2 files changed, 5 insertions(+), 56 deletions(-)
>  delete mode 100644 package/openipmi/0002-configure.ac-add-without-execinfo-option.patch
> 
> diff --git a/package/openipmi/0002-configure.ac-add-without-execinfo-option.patch b/package/openipmi/0002-configure.ac-add-without-execinfo-option.patch
> deleted file mode 100644
> index e1838a06f4..0000000000
> --- a/package/openipmi/0002-configure.ac-add-without-execinfo-option.patch
> +++ /dev/null
> @@ -1,55 +0,0 @@
> -From 388033e3d0129510c3884333bc428cefeb75e0b8 Mon Sep 17 00:00:00 2001
> -From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> -Date: Mon, 3 Jan 2022 23:27:21 +0100
> -Subject: [PATCH] configure.ac: add --without-execinfo option
> -
> -Add an option to allow the user to disable execinfo to avoid the
> -following build failure on musl with
> -https://github.com/mikroskeem/libexecinfo:
> -
> -/home/buildroot/autobuild/instance-3/output-1/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-musl/10.3.0/../../../../x86_64-buildroot-linux-musl/bin/ld: /home/buildroot/autobuild/instance-3/output-1/build/openipmi-2.0.28/utils/.libs/libOpenIPMIutils.so: undefined reference to `backtrace'
> -
> -Fixes:
> - - http://autobuild.buildroot.org/results/dcc33c5cca97d538231647a94212450f043974b3
> -
> -Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> -[Upstream status: https://sourceforge.net/p/openipmi/patches/36]
> ----
> - configure.ac | 14 +++++++++++++-
> - 1 file changed, 13 insertions(+), 1 deletion(-)
> -
> -diff --git a/configure.ac b/configure.ac
> -index 607864b9..f369166f 100644
> ---- a/configure.ac
> -+++ b/configure.ac
> -@@ -77,6 +77,16 @@ AC_ARG_WITH(poptlibs,
> -     POPTLIBS="$withval"
> - )
> - 
> -+tryexecinfo=yes
> -+AC_ARG_WITH(execinfo,
> -+[  --with-execinfo[[=yes|no]]      Look for execinfo.],
> -+    if test "x$withval" = "xyes"; then
> -+      tryexecinfo=yes
> -+    elif test "x$withval" = "xno"; then
> -+      tryexecinfo=no
> -+    fi,
> -+)
> -+
> - # If UCD SNMP requires OpenSSL, this tells where to find the crypto lib
> - tryopenssl=yes
> - AC_ARG_WITH(openssl,
> -@@ -275,7 +285,9 @@ AM_PROG_CC_C_O
> - AC_PROG_LIBTOOL
> - AC_STDC_HEADERS
> - 
> --AC_CHECK_HEADERS(execinfo.h)
> -+if test "x$tryexecinfo" != "xno"; then
> -+   AC_CHECK_HEADERS(execinfo.h)
> -+fi
> - AC_CHECK_HEADERS([netinet/ether.h])
> - AC_CHECK_HEADERS([sys/ethernet.h])
> - 
> --- 
> -2.34.1
> -
> diff --git a/package/openipmi/openipmi.mk b/package/openipmi/openipmi.mk
> index b3a4d90d4b..81492ec131 100644
> --- a/package/openipmi/openipmi.mk
> +++ b/package/openipmi/openipmi.mk
> @@ -15,7 +15,6 @@ OPENIPMI_INSTALL_STAGING = YES
>  OPENIPMI_AUTORECONF = YES
>  OPENIPMI_CONF_ENV = ac_cv_path_pkgprog="$(PKG_CONFIG_HOST_BINARY)"
>  OPENIPMI_CONF_OPTS = \
> -	--with-execinfo=no \
>  	--with-glib=no \
>  	--with-tcl=no \
>  	--with-perl=no \
> @@ -26,6 +25,11 @@ ifeq ($(BR2_PACKAGE_GDBM),y)
>  OPENIPMI_DEPENDENCIES += gdbm
>  endif
>  
> +ifeq ($(BR2_PACKAGE_LIBEXECINFO),y)
> +OPENIPMI_DEPENDENCIES += libexecinfo
> +OPENIPMI_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -lexecinfo"
> +endif
> +
>  ifeq ($(BR2_PACKAGE_OPENSSL),y)
>  OPENIPMI_DEPENDENCIES += openssl
>  OPENIPMI_CONF_OPTS += --with-openssl=yes
> -- 
> 2.35.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2022-10-30 18:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-30 17:56 [Buildroot] [PATCH v2, 1/2] package/openipmi: add libexecinfo optional dependency Fabrice Fontaine
2022-10-30 17:56 ` [Buildroot] [PATCH v2, 2/2] package/openipmi: bump to version 2.0.33 Fabrice Fontaine
2022-10-30 18:20 ` Yann E. MORIN [this message]
2023-02-17 15:10   ` [Buildroot] [PATCH v2, 1/2] package/openipmi: add libexecinfo optional dependency Thomas Petazzoni via buildroot
2023-02-17 15:09 ` Thomas Petazzoni via buildroot

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=20221030182041.GX1058960@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=fontaine.fabrice@gmail.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.