* [Buildroot] [PATCH] btrfs-progs: fix static build
@ 2014-11-28 7:18 Baruch Siach
2014-11-28 8:01 ` Peter Korsgaard
2014-11-28 21:41 ` Thomas Petazzoni
0 siblings, 2 replies; 4+ messages in thread
From: Baruch Siach @ 2014-11-28 7:18 UTC (permalink / raw)
To: buildroot
libuuid needs -lintl when BR2_NEEDS_GETTEXT_IF_LOCALE is set.
Fixes:
http://autobuild.buildroot.net/results/9f1/9f182cd5955d724750135bcd6cb7e315fb28334f/
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
package/btrfs-progs/btrfs-progs.mk | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/btrfs-progs/btrfs-progs.mk b/package/btrfs-progs/btrfs-progs.mk
index d16fa0d9aa6f..7122df1b0e76 100644
--- a/package/btrfs-progs/btrfs-progs.mk
+++ b/package/btrfs-progs/btrfs-progs.mk
@@ -17,6 +17,10 @@ BTRFS_PROGS_LICENSE_FILES = COPYING
ifeq ($(BR2_PREFER_STATIC_LIB),y)
BTRFS_PROGS_MAKE_TARGET = static
BTRFS_PROGS_MAKE_INSTALL_TARGET = install-static
+ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
+# Add -lintl for libuuid
+BTRFS_PROGS_MAKE_FLAGS += lib_LIBS="-luuid -lblkid -lm -lz -llzo2 -L. -lintl"
+endif
else
BTRFS_PROGS_MAKE_TARGET = all
BTRFS_PROGS_MAKE_INSTALL_TARGET = install
--
2.1.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] btrfs-progs: fix static build
2014-11-28 7:18 [Buildroot] [PATCH] btrfs-progs: fix static build Baruch Siach
@ 2014-11-28 8:01 ` Peter Korsgaard
2014-11-28 21:41 ` Thomas Petazzoni
1 sibling, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2014-11-28 8:01 UTC (permalink / raw)
To: buildroot
>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:
> libuuid needs -lintl when BR2_NEEDS_GETTEXT_IF_LOCALE is set.
> Fixes:
> http://autobuild.buildroot.net/results/9f1/9f182cd5955d724750135bcd6cb7e315fb28334f/
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] btrfs-progs: fix static build
2014-11-28 7:18 [Buildroot] [PATCH] btrfs-progs: fix static build Baruch Siach
2014-11-28 8:01 ` Peter Korsgaard
@ 2014-11-28 21:41 ` Thomas Petazzoni
2014-11-29 19:00 ` Baruch Siach
1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2014-11-28 21:41 UTC (permalink / raw)
To: buildroot
Dear Baruch Siach,
On Fri, 28 Nov 2014 09:18:12 +0200, Baruch Siach wrote:
> diff --git a/package/btrfs-progs/btrfs-progs.mk b/package/btrfs-progs/btrfs-progs.mk
> index d16fa0d9aa6f..7122df1b0e76 100644
> --- a/package/btrfs-progs/btrfs-progs.mk
> +++ b/package/btrfs-progs/btrfs-progs.mk
> @@ -17,6 +17,10 @@ BTRFS_PROGS_LICENSE_FILES = COPYING
> ifeq ($(BR2_PREFER_STATIC_LIB),y)
> BTRFS_PROGS_MAKE_TARGET = static
> BTRFS_PROGS_MAKE_INSTALL_TARGET = install-static
> +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
> +# Add -lintl for libuuid
> +BTRFS_PROGS_MAKE_FLAGS += lib_LIBS="-luuid -lblkid -lm -lz -llzo2 -L. -lintl"
> +endif
This is really ugly and not maintainable, we are doing this all over
the place to solve static linking issues, and it's going to be a
never-ending story. If the package doesn't use pkg-config, can't we at
least use it here, like:
lib_LIBS="$(shell pkg-config ...)"
?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] btrfs-progs: fix static build
2014-11-28 21:41 ` Thomas Petazzoni
@ 2014-11-29 19:00 ` Baruch Siach
0 siblings, 0 replies; 4+ messages in thread
From: Baruch Siach @ 2014-11-29 19:00 UTC (permalink / raw)
To: buildroot
Hi Thomas,
On Fri, Nov 28, 2014 at 10:41:17PM +0100, Thomas Petazzoni wrote:
> On Fri, 28 Nov 2014 09:18:12 +0200, Baruch Siach wrote:
> > diff --git a/package/btrfs-progs/btrfs-progs.mk
> > b/package/btrfs-progs/btrfs-progs.mk
> > index d16fa0d9aa6f..7122df1b0e76 100644
> > --- a/package/btrfs-progs/btrfs-progs.mk
> > +++ b/package/btrfs-progs/btrfs-progs.mk
> > @@ -17,6 +17,10 @@ BTRFS_PROGS_LICENSE_FILES = COPYING
> > ifeq ($(BR2_PREFER_STATIC_LIB),y)
> > BTRFS_PROGS_MAKE_TARGET = static
> > BTRFS_PROGS_MAKE_INSTALL_TARGET = install-static
> > +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
> > +# Add -lintl for libuuid
> > +BTRFS_PROGS_MAKE_FLAGS += lib_LIBS="-luuid -lblkid -lm -lz -llzo2 -L. -lintl"
> > +endif
>
> This is really ugly and not maintainable, we are doing this all over
> the place to solve static linking issues, and it's going to be a
> never-ending story.
I agree it is ugly. The thing is that this list of libraries is copied
verbatim from btrfs-progs Makefile (except -lintl). I found no way to specify
additional library dependencies.
> If the package doesn't use pkg-config, can't we at
> least use it here, like:
>
> lib_LIBS="$(shell pkg-config ...)"
>
> ?
uuid.pc does not list -lintl because this is something we add locally since
commit a8273c4272b1b8 (util-linux: fix libintl linking if present). Yann has
proposed a patch (http://patchwork.ozlabs.org/patch/416000/) adding -lintl to
uuid.pc when applicable. We'll still need to repeat the rest of the list,
something like:
lib_LIBS="-luuid -lblkid -lm -lz -llzo2 -L. $(shell pkg-config ...)"
so I'm not sure it buy us much.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-29 19:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-28 7:18 [Buildroot] [PATCH] btrfs-progs: fix static build Baruch Siach
2014-11-28 8:01 ` Peter Korsgaard
2014-11-28 21:41 ` Thomas Petazzoni
2014-11-29 19:00 ` Baruch Siach
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox