You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

39 lines
1.8 KiB

From 60b43aed7e479bc6d7252f0dba2542fe7aab9195 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Date: Tue, 21 Jul 2015 22:38:02 +0200
Subject: [PATCH] mqtt-fan: libmosquittopp.so: add missing depending library
libmosquittopp.so also depends on libpthread.so, this patch adds these
dependencies to the build. In addition it puts the dependency to
mosquitto to the beginning of the list. This is needed because
mosquitto is a statically linked lib and it also has unresolved
symbols, but gcc only searches the dynamic libs defined after the
static for unresolved symbols in the static lib.
Without this the dynamic loader will not automatically load these
libraries and it could result in unresolved dependencies at runtime.
Change-Id: I866a46305c31d37cf706b9f2b965e843c35c5667
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1797
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Younghyun Joo <yh_.joo@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
---
.../plugins/mqtt-fan/lib/cpp/SConscript | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/service/protocol-plugin/plugins/mqtt-fan/lib/cpp/SConscript
+++ b/service/protocol-plugin/plugins/mqtt-fan/lib/cpp/SConscript
@@ -16,7 +16,10 @@ mosquittopp_env.AppendUnique(CPPPATH = [
if target_os not in ['windows', 'winrt']:
mosquittopp_env.AppendUnique(CFLAGS = ['-Wall', '-ggdb', '-O2', '-fPIC'])
-mosquittopp_env.AppendUnique(LIBS = ['mosquitto', 'ssl', 'crypto'])
+if target_os == 'linux':
+ mosquittopp_env.AppendUnique(LIBS = ['pthread'])
+
+mosquittopp_env.PrependUnique(LIBS = ['mosquitto', 'ssl', 'crypto'])
######################################################################
# Source files and Targets
######################################################################