All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/swupdate: fix static build without lua
@ 2019-03-04 21:47 Fabrice Fontaine
  2019-03-04 22:58 ` James Hilliard
  2019-03-07 21:43 ` Thomas Petazzoni
  0 siblings, 2 replies; 6+ messages in thread
From: Fabrice Fontaine @ 2019-03-04 21:47 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 .../swupdate/0001-Makefile-fix-static-build.patch  | 62 ++++++++++++++++++++++
 1 file changed, 62 insertions(+)
 create mode 100644 package/swupdate/0001-Makefile-fix-static-build.patch

diff --git a/package/swupdate/0001-Makefile-fix-static-build.patch b/package/swupdate/0001-Makefile-fix-static-build.patch
new file mode 100644
index 0000000000..56901f9871
--- /dev/null
+++ b/package/swupdate/0001-Makefile-fix-static-build.patch
@@ -0,0 +1,62 @@
+From 15a324f8c67548f219256a5a75ba8123cc5bdac6 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Mon, 4 Mar 2019 21:51:36 +0100
+Subject: [PATCH] Makefile: fix static build
+
+Don't build and install lua_swupdate.so if HAVE_LUA isn't set to y
+otherwise build will fail if the toolchain only suports building static
+libraries
+
+Fixes:
+ - http://autobuild.buildroot.org/results/c11c4d26983e0347d96f3dda62e6d72b031967bb
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/sbabic/swupdate/pull/49]
+---
+ Makefile | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index cfeb9a6..cac99b5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -369,11 +369,15 @@ tools-bins	:= $(patsubst $(tools-y)/%.c,$(tools-y)/%,$(wildcard $(tools-y)/*.c))
+ tools-bins-unstr:= $(patsubst %,%_unstripped,$(tools-bins))
+ tools-all	:= $(tools-objs)
+ 
++ifeq ($(HAVE_LUA),y)
++lua_swupdate	:= lua_swupdate.so
++endif
++
+ shared-dirs	:= $(shareds-y)
+ shared-libs	:= $(patsubst %,%/built-in.o, $(shareds-y))
+ shared-all	:= $(shared-libs)
+ 
+-all: swupdate ${tools-bins} lua_swupdate.so
++all: swupdate ${tools-bins} ${lua_swupdate}
+ 
+ # Do modpost on a prelinked vmlinux. The finally linked vmlinux has
+ # relevant sections renamed as per the linker script.
+@@ -434,7 +438,6 @@ install: all
+ 	install -d ${DESTDIR}/usr/bin
+ 	install -d ${DESTDIR}/usr/include
+ 	install -d ${DESTDIR}/usr/lib
+-	install -d ${DESTDIR}/usr/lib/lua/$(LUAVER)
+ 	install -m 755 swupdate ${DESTDIR}/usr/bin
+ 	for i in ${tools-bins};do \
+ 		install -m 755 $$i ${DESTDIR}/usr/bin; \
+@@ -443,7 +446,10 @@ install: all
+ 	install -m 0644 include/swupdate_status.h ${DESTDIR}/usr/include
+ 	install -m 0644 include/progress_ipc.h ${DESTDIR}/usr/include
+ 	install -m 0755 ipc/lib.a ${DESTDIR}/usr/lib/libswupdate.a
+-	install -m 0755 lua_swupdate.so $(DESTDIR)/usr/lib/lua/$(LUAVER)
++	if [ $(HAVE_LUA) = y ]; then \
++		install -d ${DESTDIR}/usr/lib/lua/$(LUAVER); \
++		install -m 0755 ${lua_swupdate} $(DESTDIR)/usr/lib/lua/$(LUAVER); \
++	fi
+ 
+ PHONY += run-tests
+ tests: \
+-- 
+2.14.1
+
-- 
2.14.1

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

* [Buildroot] [PATCH 1/1] package/swupdate: fix static build without lua
  2019-03-04 21:47 [Buildroot] [PATCH 1/1] package/swupdate: fix static build without lua Fabrice Fontaine
@ 2019-03-04 22:58 ` James Hilliard
  2019-03-07 21:43 ` Thomas Petazzoni
  1 sibling, 0 replies; 6+ messages in thread
From: James Hilliard @ 2019-03-04 22:58 UTC (permalink / raw)
  To: buildroot

On Mon, Mar 4, 2019 at 2:51 PM Fabrice Fontaine
<fontaine.fabrice@gmail.com> wrote:
>
> Fixes:
>  - http://autobuild.buildroot.org/results/c11c4d26983e0347d96f3dda62e6d72b031967bb
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  .../swupdate/0001-Makefile-fix-static-build.patch  | 62 ++++++++++++++++++++++
>  1 file changed, 62 insertions(+)
>  create mode 100644 package/swupdate/0001-Makefile-fix-static-build.patch
>
> diff --git a/package/swupdate/0001-Makefile-fix-static-build.patch b/package/swupdate/0001-Makefile-fix-static-build.patch
> new file mode 100644
> index 0000000000..56901f9871
> --- /dev/null
> +++ b/package/swupdate/0001-Makefile-fix-static-build.patch
> @@ -0,0 +1,62 @@
> +From 15a324f8c67548f219256a5a75ba8123cc5bdac6 Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Date: Mon, 4 Mar 2019 21:51:36 +0100
> +Subject: [PATCH] Makefile: fix static build
> +
> +Don't build and install lua_swupdate.so if HAVE_LUA isn't set to y
> +otherwise build will fail if the toolchain only suports building static
> +libraries
> +
> +Fixes:
> + - http://autobuild.buildroot.org/results/c11c4d26983e0347d96f3dda62e6d72b031967bb
> +
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +[Upstream status: https://github.com/sbabic/swupdate/pull/49]
The swupdate project doesn't accept patches via github pull requests,
you should send this to the mailing list swupdate at googlegroups.com.
http://sbabic.github.io/swupdate/contributing.html
> +---
> + Makefile | 12 +++++++++---
> + 1 file changed, 9 insertions(+), 3 deletions(-)
> +
> +diff --git a/Makefile b/Makefile
> +index cfeb9a6..cac99b5 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -369,11 +369,15 @@ tools-bins       := $(patsubst $(tools-y)/%.c,$(tools-y)/%,$(wildcard $(tools-y)/*.c))
> + tools-bins-unstr:= $(patsubst %,%_unstripped,$(tools-bins))
> + tools-all     := $(tools-objs)
> +
> ++ifeq ($(HAVE_LUA),y)
> ++lua_swupdate  := lua_swupdate.so
> ++endif
> ++
> + shared-dirs   := $(shareds-y)
> + shared-libs   := $(patsubst %,%/built-in.o, $(shareds-y))
> + shared-all    := $(shared-libs)
> +
> +-all: swupdate ${tools-bins} lua_swupdate.so
> ++all: swupdate ${tools-bins} ${lua_swupdate}
> +
> + # Do modpost on a prelinked vmlinux. The finally linked vmlinux has
> + # relevant sections renamed as per the linker script.
> +@@ -434,7 +438,6 @@ install: all
> +       install -d ${DESTDIR}/usr/bin
> +       install -d ${DESTDIR}/usr/include
> +       install -d ${DESTDIR}/usr/lib
> +-      install -d ${DESTDIR}/usr/lib/lua/$(LUAVER)
> +       install -m 755 swupdate ${DESTDIR}/usr/bin
> +       for i in ${tools-bins};do \
> +               install -m 755 $$i ${DESTDIR}/usr/bin; \
> +@@ -443,7 +446,10 @@ install: all
> +       install -m 0644 include/swupdate_status.h ${DESTDIR}/usr/include
> +       install -m 0644 include/progress_ipc.h ${DESTDIR}/usr/include
> +       install -m 0755 ipc/lib.a ${DESTDIR}/usr/lib/libswupdate.a
> +-      install -m 0755 lua_swupdate.so $(DESTDIR)/usr/lib/lua/$(LUAVER)
> ++      if [ $(HAVE_LUA) = y ]; then \
> ++              install -d ${DESTDIR}/usr/lib/lua/$(LUAVER); \
> ++              install -m 0755 ${lua_swupdate} $(DESTDIR)/usr/lib/lua/$(LUAVER); \
> ++      fi
> +
> + PHONY += run-tests
> + tests: \
> +--
> +2.14.1
> +
> --
> 2.14.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 1/1] package/swupdate: fix static build without lua
  2019-03-04 21:47 [Buildroot] [PATCH 1/1] package/swupdate: fix static build without lua Fabrice Fontaine
  2019-03-04 22:58 ` James Hilliard
@ 2019-03-07 21:43 ` Thomas Petazzoni
  2019-03-08 18:19   ` Fabrice Fontaine
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2019-03-07 21:43 UTC (permalink / raw)
  To: buildroot

Hello Fabrice,

On Mon,  4 Mar 2019 22:47:20 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> diff --git a/package/swupdate/0001-Makefile-fix-static-build.patch b/package/swupdate/0001-Makefile-fix-static-build.patch
> new file mode 100644
> index 0000000000..56901f9871
> --- /dev/null
> +++ b/package/swupdate/0001-Makefile-fix-static-build.patch
> @@ -0,0 +1,62 @@
> +From 15a324f8c67548f219256a5a75ba8123cc5bdac6 Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Date: Mon, 4 Mar 2019 21:51:36 +0100
> +Subject: [PATCH] Makefile: fix static build
> +
> +Don't build and install lua_swupdate.so if HAVE_LUA isn't set to y
> +otherwise build will fail if the toolchain only suports building static
> +libraries
> +
> +Fixes:
> + - http://autobuild.buildroot.org/results/c11c4d26983e0347d96f3dda62e6d72b031967bb
> +
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +[Upstream status: https://github.com/sbabic/swupdate/pull/49]
> +---
> + Makefile | 12 +++++++++---
> + 1 file changed, 9 insertions(+), 3 deletions(-)
> +
> +diff --git a/Makefile b/Makefile
> +index cfeb9a6..cac99b5 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -369,11 +369,15 @@ tools-bins	:= $(patsubst $(tools-y)/%.c,$(tools-y)/%,$(wildcard $(tools-y)/*.c))
> + tools-bins-unstr:= $(patsubst %,%_unstripped,$(tools-bins))
> + tools-all	:= $(tools-objs)
> + 
> ++ifeq ($(HAVE_LUA),y)
> ++lua_swupdate	:= lua_swupdate.so
> ++endif

I am a bit confused. How could lua_swupdate.so build at all (even in
shared library configurations) when HAVE_LUA is not enabled ?

I see the patch has been applied upstream, so I guess it is correct,
but still that confuses me a bit. Or maybe lua_swupdate.so doesn't link
with Lua ? 

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 1/1] package/swupdate: fix static build without lua
  2019-03-07 21:43 ` Thomas Petazzoni
@ 2019-03-08 18:19   ` Fabrice Fontaine
  2019-03-26 23:01     ` Arnout Vandecappelle
  0 siblings, 1 reply; 6+ messages in thread
From: Fabrice Fontaine @ 2019-03-08 18:19 UTC (permalink / raw)
  To: buildroot

Hello Thomas,
Le jeu. 7 mars 2019 ? 22:43, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> a ?crit :
>
> Hello Fabrice,
>
> On Mon,  4 Mar 2019 22:47:20 +0100
> Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
>
> > diff --git a/package/swupdate/0001-Makefile-fix-static-build.patch b/package/swupdate/0001-Makefile-fix-static-build.patch
> > new file mode 100644
> > index 0000000000..56901f9871
> > --- /dev/null
> > +++ b/package/swupdate/0001-Makefile-fix-static-build.patch
> > @@ -0,0 +1,62 @@
> > +From 15a324f8c67548f219256a5a75ba8123cc5bdac6 Mon Sep 17 00:00:00 2001
> > +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > +Date: Mon, 4 Mar 2019 21:51:36 +0100
> > +Subject: [PATCH] Makefile: fix static build
> > +
> > +Don't build and install lua_swupdate.so if HAVE_LUA isn't set to y
> > +otherwise build will fail if the toolchain only suports building static
> > +libraries
> > +
> > +Fixes:
> > + - http://autobuild.buildroot.org/results/c11c4d26983e0347d96f3dda62e6d72b031967bb
> > +
> > +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > +[Upstream status: https://github.com/sbabic/swupdate/pull/49]
> > +---
> > + Makefile | 12 +++++++++---
> > + 1 file changed, 9 insertions(+), 3 deletions(-)
> > +
> > +diff --git a/Makefile b/Makefile
> > +index cfeb9a6..cac99b5 100644
> > +--- a/Makefile
> > ++++ b/Makefile
> > +@@ -369,11 +369,15 @@ tools-bins     := $(patsubst $(tools-y)/%.c,$(tools-y)/%,$(wildcard $(tools-y)/*.c))
> > + tools-bins-unstr:= $(patsubst %,%_unstripped,$(tools-bins))
> > + tools-all   := $(tools-objs)
> > +
> > ++ifeq ($(HAVE_LUA),y)
> > ++lua_swupdate        := lua_swupdate.so
> > ++endif
>
> I am a bit confused. How could lua_swupdate.so build at all (even in
> shared library configurations) when HAVE_LUA is not enabled ?
>
> I see the patch has been applied upstream, so I guess it is correct,
> but still that confuses me a bit. Or maybe lua_swupdate.so doesn't link
> with Lua ?
The issue (fixed by the patch) is that swudpate always tries to build
lua_swupdate.so even if there is no object files in this shared
library when CONFIG_LUA is not set.

Here is an extract of bindings/Makefile (see
https://github.com/sbabic/swupdate/commit/624904cc18003fae413011563dac83a333f10509):
obj-$(CONFIG_LUA) += auxiliar.o lua_swupdate.o

>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

Best Regards,

Fabrice

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

* [Buildroot] [PATCH 1/1] package/swupdate: fix static build without lua
  2019-03-08 18:19   ` Fabrice Fontaine
@ 2019-03-26 23:01     ` Arnout Vandecappelle
  2019-03-28  9:53       ` Peter Korsgaard
  0 siblings, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2019-03-26 23:01 UTC (permalink / raw)
  To: buildroot



On 08/03/2019 19:19, Fabrice Fontaine wrote:
> The issue (fixed by the patch) is that swudpate always tries to build
> lua_swupdate.so even if there is no object files in this shared
> library when CONFIG_LUA is not set.

 I've included this explanation in the commit message and applied to master, thanks.

 Regards,
 Arnout

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

* [Buildroot] [PATCH 1/1] package/swupdate: fix static build without lua
  2019-03-26 23:01     ` Arnout Vandecappelle
@ 2019-03-28  9:53       ` Peter Korsgaard
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2019-03-28  9:53 UTC (permalink / raw)
  To: buildroot

>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

 > On 08/03/2019 19:19, Fabrice Fontaine wrote:
 >> The issue (fixed by the patch) is that swudpate always tries to build
 >> lua_swupdate.so even if there is no object files in this shared
 >> library when CONFIG_LUA is not set.

 >  I've included this explanation in the commit message and applied to master, thanks.

Committed to 2018.11.x and 2019.02.x, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2019-03-28  9:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-04 21:47 [Buildroot] [PATCH 1/1] package/swupdate: fix static build without lua Fabrice Fontaine
2019-03-04 22:58 ` James Hilliard
2019-03-07 21:43 ` Thomas Petazzoni
2019-03-08 18:19   ` Fabrice Fontaine
2019-03-26 23:01     ` Arnout Vandecappelle
2019-03-28  9:53       ` Peter Korsgaard

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.