Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/4] package/lttng-tools: fix static build
Date: Tue, 8 Dec 2015 21:05:55 +0100	[thread overview]
Message-ID: <20151208200555.GQ4188@free.fr> (raw)
In-Reply-To: <1449092893-30664-2-git-send-email-s.martin49@gmail.com>

Samuel, All,

On 2015-12-02 22:48 +0100, Samuel Martin spake thusly:
> Add patch fixing configure.ac for library detection on static build.
> 
> Fixes:
>   http://autobuild.buildroot.net/results/0f1/0f1e015a0c5a5ac2beeb5011d31a1e0058a32a0d/
> 
> Upstream status: Merged
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

See below for a minor comment...

> ---
>  .../0001-configure.ac-fix-static-build.patch       | 54 ++++++++++++++++++++++
>  package/lttng-tools/lttng-tools.mk                 |  2 +
>  2 files changed, 56 insertions(+)
>  create mode 100644 package/lttng-tools/0001-configure.ac-fix-static-build.patch
> 
> diff --git a/package/lttng-tools/0001-configure.ac-fix-static-build.patch b/package/lttng-tools/0001-configure.ac-fix-static-build.patch
> new file mode 100644
> index 0000000..182f3e0
> --- /dev/null
> +++ b/package/lttng-tools/0001-configure.ac-fix-static-build.patch
> @@ -0,0 +1,54 @@
> +Upstream status: merged
> +From 75df93099f6fc18ddd1599efd1313d5260c4d49a Mon Sep 17 00:00:00 2001
> +From: Samuel Martin <s.martin49@gmail.com>
> +Date: Sun, 22 Nov 2015 23:38:00 +0100
> +Subject: [PATCH] configure.ac: fix static build
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +For static build, some extra LDFLAGS may be needed.
> +
> +Using PKG_CHECK_MODULES instead of AC_CHECK_LIB for librairy detection
> +allows to get all these flags. Then, the LIBS variable can be extended
> +with everything that is needed.
> +
> +So, use PKG_CHECK_MODULES for popt and uuid detection; which both depend
> +on libintl.
> +
> +This changes fixes build failures triggered with Buildroot, e.g.:
> +  http://autobuild.buildroot.net/results/0f1/0f1e015a0c5a5ac2beeb5011d31a1e0058a32a0d/build-end.log
> +
> +Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> +Signed-off-by: J?r?mie Galarneau <jeremie.galarneau@efficios.com>

It would have been good to poitn to the upstream commit:

    https://git.lttng.org/?p=lttng-tools.git;a=commit;h=e9cee23a2e92694ba1347fd1242026d4c19413a8

Regards,
Yann E. MORIN.

> +---
> + configure.ac | 6 ++++--
> + 1 file changed, 4 insertions(+), 2 deletions(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index 4dee4b4..9208cb3 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -175,15 +175,17 @@ AC_CHECK_LIB([pthread], [pthread_create], [],
> + )
> + 
> + # Check libpopt
> +-AC_CHECK_LIB([popt], [poptGetContext], [],
> ++PKG_CHECK_MODULES([POPT], [popt],
> ++	[LIBS="$LIBS $POPT_LIBS"],
> + 	[AC_MSG_ERROR([Cannot find libpopt. Use [LDFLAGS]=-Ldir to specify its location.])]
> + )
> + 
> + AM_PATH_XML2(2.7.6, true, AC_MSG_ERROR(No supported version of libxml2 found.))
> + 
> + # Check for libuuid
> +-AC_CHECK_LIB([uuid], [uuid_generate],
> ++PKG_CHECK_MODULES([UUID], [uuid],
> + [
> ++	LIBS="$LIBS $UUID_LIBS"
> + 	AC_DEFINE_UNQUOTED([LTTNG_HAVE_LIBUUID], 1, [Has libuuid support.])
> + 	have_libuuid=yes
> + ],
> +-- 
> +2.6.2
> +
> diff --git a/package/lttng-tools/lttng-tools.mk b/package/lttng-tools/lttng-tools.mk
> index efca6d7..b14b7e7 100644
> --- a/package/lttng-tools/lttng-tools.mk
> +++ b/package/lttng-tools/lttng-tools.mk
> @@ -10,6 +10,8 @@ LTTNG_TOOLS_SOURCE = lttng-tools-$(LTTNG_TOOLS_VERSION).tar.bz2
>  LTTNG_TOOLS_LICENSE = GPLv2+; LGPLv2.1+ for include/lttng/* and src/lib/lttng-ctl/*
>  LTTNG_TOOLS_LICENSE_FILES = gpl-2.0.txt lgpl-2.1.txt LICENSE
>  LTTNG_TOOLS_CONF_OPTS += --with-xml-prefix=$(STAGING_DIR)/usr
> +# Need autoreconf because of a patch touching configure.ac
> +LTTNG_TOOLS_AUTORECONF = YES
>  
>  # The host-lttng-babeltrace technically isn't a required build
>  # dependency. However, having the babeltrace utilities built for the
> -- 
> 2.6.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2015-12-08 20:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-02 21:48 [Buildroot] [PATCH 1/4] package/lttng-tools: remove no longer needed patch Samuel Martin
2015-12-02 21:48 ` [Buildroot] [PATCH 2/4] package/lttng-tools: fix static build Samuel Martin
2015-12-08 20:05   ` Yann E. MORIN [this message]
2015-12-02 21:48 ` [Buildroot] [PATCH 3/4] package/lttng-tools: backport patch fixing pthread_setname_np failure Samuel Martin
2015-12-08 20:08   ` Yann E. MORIN
2015-12-08 22:26     ` Samuel Martin
2015-12-02 21:48 ` [Buildroot] [PATCH 4/4] package/lttng-tools: fix static build Samuel Martin
2015-12-08 20:11   ` Yann E. MORIN
2015-12-02 22:08 ` [Buildroot] [PATCH 1/4] package/lttng-tools: remove no longer needed patch Arnout Vandecappelle
2015-12-08  9:33 ` Yann E. MORIN

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=20151208200555.GQ4188@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox