* [Buildroot] [PATCH 1/1] package/linknx: fix build with log4cpp
@ 2019-05-13 20:42 Fabrice Fontaine
2019-05-14 16:25 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2019-05-13 20:42 UTC (permalink / raw)
To: buildroot
Fixes:
- http://autobuild.buildroot.org/results/1863f8f27041bc15ca68e786ba3b8e4764c40574
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...Makefile.am-fix-linking-with-log4cpp.patch | 39 +++++++++++++++++++
1 file changed, 39 insertions(+)
create mode 100644 package/linknx/0003-src-Makefile.am-fix-linking-with-log4cpp.patch
diff --git a/package/linknx/0003-src-Makefile.am-fix-linking-with-log4cpp.patch b/package/linknx/0003-src-Makefile.am-fix-linking-with-log4cpp.patch
new file mode 100644
index 0000000000..253c1f6f23
--- /dev/null
+++ b/package/linknx/0003-src-Makefile.am-fix-linking-with-log4cpp.patch
@@ -0,0 +1,39 @@
+From b4595154e84e21abdc0c89f937c410cf8280991c Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Mon, 13 May 2019 22:14:43 +0200
+Subject: [PATCH] src/Makefile.am: fix linking with log4cpp
+
+linknx fails to build with log4cpp because LOG4CPP_CFLAGS (which
+contains -pthread) is added to AM_CPPFLAGS (which is not used at link
+time) instead of AM_CXXFLAGS:
+
+/home/buildroot/autobuild/instance-0/output/host/bin/mipsel-linux-g++ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -o linknx linknx.o logger.o ruleserver.o objectcontroller.o eibclient.o threads.o timermanager.o persistentstorage.o xmlserver.o smsgateway.o emailgateway.o knxconnection.o services.o suncalc.o luacondition.o ioport.o ../ticpp/libticpp.a -L/home/buildroot/autobuild/instance-0/output/host/mipsel-buildroot-linux-gnu/sysroot/usr/bin/../../usr/lib -lpthsem -L/home/buildroot/autobuild/instance-0/output/host/bin/../mipsel-buildroot-linux-gnu/sysroot/usr/lib -llog4cpp -lm
+/home/buildroot/autobuild/instance-0/output/host/mipsel-buildroot-linux-gnu/sysroot/usr/bin/../../usr/lib/liblog4cpp.so: undefined reference to `pthread_key_create'
+
+So move LOG4CPP_CFLAGS to AM_CXXFLAGS
+
+Fixes:
+ - http://autobuild.buildroot.org/results/1863f8f27041bc15ca68e786ba3b8e4764c40574
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: not sent yet]
+---
+ src/Makefile.am | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 6a4f493..92d147c 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -6,6 +6,7 @@ else
+ B64_CFLAGS=
+ B64_LIBS=
+ endif
+-AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/ticpp $(B64_CFLAGS) $(PTH_CPPFLAGS) $(LIBCURL_CPPFLAGS) $(LOG4CPP_CFLAGS) $(LUA_CFLAGS) $(MYSQL_CFLAGS) $(ESMTP_CFLAGS)
++AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/ticpp $(B64_CFLAGS) $(PTH_CPPFLAGS) $(LIBCURL_CPPFLAGS) $(LUA_CFLAGS) $(MYSQL_CFLAGS) $(ESMTP_CFLAGS)
++AM_CXXFLAGS=$(LOG4CPP_CFLAGS)
+ linknx_LDADD=$(top_srcdir)/ticpp/libticpp.a $(B64_LIBS) $(PTH_LDFLAGS) $(PTH_LIBS) $(LIBCURL) $(LOG4CPP_LIBS) $(LUA_LIBS) $(MYSQL_LIBS) $(ESMTP_LIBS) -lm
+ linknx_SOURCES=linknx.cpp logger.cpp ruleserver.cpp objectcontroller.cpp eibclient.c threads.cpp timermanager.cpp persistentstorage.cpp xmlserver.cpp smsgateway.cpp emailgateway.cpp knxconnection.cpp services.cpp suncalc.cpp luacondition.cpp ioport.cpp ruleserver.h objectcontroller.h threads.h timermanager.h persistentstorage.h xmlserver.h smsgateway.h emailgateway.h knxconnection.h services.h suncalc.h luacondition.h ioport.h logger.h
+--
+2.20.1
+
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH 1/1] package/linknx: fix build with log4cpp
2019-05-13 20:42 [Buildroot] [PATCH 1/1] package/linknx: fix build with log4cpp Fabrice Fontaine
@ 2019-05-14 16:25 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2019-05-14 16:25 UTC (permalink / raw)
To: buildroot
On Mon, 13 May 2019 22:42:06 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Fixes:
> - http://autobuild.buildroot.org/results/1863f8f27041bc15ca68e786ba3b8e4764c40574
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> ...Makefile.am-fix-linking-with-log4cpp.patch | 39 +++++++++++++++++++
> 1 file changed, 39 insertions(+)
> create mode 100644 package/linknx/0003-src-Makefile.am-fix-linking-with-log4cpp.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-14 16:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-13 20:42 [Buildroot] [PATCH 1/1] package/linknx: fix build with log4cpp Fabrice Fontaine
2019-05-14 16:25 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox