Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] openzwave: fix compilation of MinOZW
@ 2016-09-27 15:00 Fabrice Fontaine
  2016-10-23 12:38 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2016-09-27 15:00 UTC (permalink / raw)
  To: buildroot

LIBDIR was used in cpp/examples/MinOZW/Makefile to add dynamic
libraries. However, as it was unset by default, the cross-compilation
could fail if the host had a library such as libnss3.so in /.
To fix this issue, this patch sets LIBDIR to top_buildir if it is unset

Fixes:
  http://autobuild.buildroot.net/results/68719fdf1320a69310bada6d3c47654dacdb5898

Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
---
 .../openzwave/0003-Fix-compilation-of-MinOZW.patch | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 package/openzwave/0003-Fix-compilation-of-MinOZW.patch

diff --git a/package/openzwave/0003-Fix-compilation-of-MinOZW.patch b/package/openzwave/0003-Fix-compilation-of-MinOZW.patch
new file mode 100644
index 0000000..99a590e
--- /dev/null
+++ b/package/openzwave/0003-Fix-compilation-of-MinOZW.patch
@@ -0,0 +1,38 @@
+From 5916ec261d3bb9a62c3951959ceb6c79d2389b3b Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fabrice.fontaine@orange.com>
+Date: Tue, 27 Sep 2016 15:50:21 +0200
+Subject: [PATCH] Fix compilation of MinOZW
+
+LIBDIR was used in cpp/examples/MinOZW/Makefile to add dynamic
+libraries. However, as it was unset by default, the cross-compilation
+could fail if the host had a library such as libnss3.so in /.
+To fix this issue, this patch sets LIBDIR to top_buildir if it is unset
+
+Fixes:
+  http://autobuild.buildroot.net/results/68719fdf1320a69310bada6d3c47654dacdb5898
+
+Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
+---
+ cpp/examples/MinOZW/Makefile | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/cpp/examples/MinOZW/Makefile b/cpp/examples/MinOZW/Makefile
+index e575632..95d684b 100644
+--- a/cpp/examples/MinOZW/Makefile
++++ b/cpp/examples/MinOZW/Makefile
+@@ -17,9 +17,11 @@ DEBUG_LDFLAGS	:= -g
+ 
+ top_srcdir := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../../../)
+ 
++#where is put the temporary library
++LIBDIR  	?= $(top_builddir)
+ 
+ INCLUDES	:= -I $(top_srcdir)/cpp/src -I $(top_srcdir)/cpp/tinyxml/ -I $(top_srcdir)/cpp/hidapi/hidapi/
+-LIBS =  $(wildcard $(LIBDIR)/*.so $(LIBDIR)/*.dylib $(top_builddir)/*.so $(top_builddir)/*.dylib $(top_builddir)/cpp/build/*.so $(top_builddir)/cpp/build/*.dylib )
++LIBS =  $(wildcard $(LIBDIR)/*.so $(LIBDIR)/*.dylib $(top_builddir)/cpp/build/*.so $(top_builddir)/cpp/build/*.dylib )
+ LIBSDIR = $(abspath $(dir $(firstword $(LIBS))))
+ minozwsrc := $(notdir $(wildcard $(top_srcdir)/cpp/examples/MinOZW/*.cpp))
+ VPATH := $(top_srcdir)/cpp/examples/MinOZW
+-- 
+2.7.4
+
-- 
2.7.4

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

* [Buildroot] [PATCH 1/1] openzwave: fix compilation of MinOZW
  2016-09-27 15:00 [Buildroot] [PATCH 1/1] openzwave: fix compilation of MinOZW Fabrice Fontaine
@ 2016-10-23 12:38 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2016-10-23 12:38 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 27 Sep 2016 17:00:45 +0200, Fabrice Fontaine wrote:
> LIBDIR was used in cpp/examples/MinOZW/Makefile to add dynamic
> libraries. However, as it was unset by default, the cross-compilation
> could fail if the host had a library such as libnss3.so in /.
> To fix this issue, this patch sets LIBDIR to top_buildir if it is unset
> 
> Fixes:
>   http://autobuild.buildroot.net/results/68719fdf1320a69310bada6d3c47654dacdb5898
> 
> Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>

Why is a patch needed?

Doing the following seems to be sufficient:

diff --git a/package/openzwave/openzwave.mk b/package/openzwave/openzwave.mk
index 2723086..9c50cb8 100644
--- a/package/openzwave/openzwave.mk
+++ b/package/openzwave/openzwave.mk
@@ -29,7 +29,8 @@ OPENZWAVE_MAKE_OPTS = \
        instlibdir=/usr/lib \
        pkgconfigdir=/usr/lib/pkgconfig \
        sysconfdir=/etc/openzwave \
-       DOXYGEN=
+       DOXYGEN= \
+       LIBDIR=$(@D)
 
 define OPENZWAVE_BUILD_CMDS
        $(TARGET_MAKE_ENV) $(MAKE) $(OPENZWAVE_MAKE_OPTS) -C $(@D)

If you agree with this, could you submit a patch with this solution,
preferably after adding a comment that explains why we're passing such
a strange value for LIBDIR.

Of course, please submit a bug report to the upstream project.

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

end of thread, other threads:[~2016-10-23 12:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-27 15:00 [Buildroot] [PATCH 1/1] openzwave: fix compilation of MinOZW Fabrice Fontaine
2016-10-23 12:38 ` Thomas Petazzoni

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