protocol-plugin: libfanserver_mqtt_plugin.so and liblightserver_mqtt_plugin.so add...
authorHauke Mehrtens <hauke.mehrtens@lantiq.com>
Tue, 21 Jul 2015 20:41:09 +0000 (22:41 +0200)
committerUze Choi <uzchoi@samsung.com>
Wed, 22 Jul 2015 12:19:08 +0000 (12:19 +0000)
libfanserver_mqtt_plugin.so and liblightserver_mqtt_plugin.so are also
depending on liboc.so and libcrypto.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.

mosquitto was only build as a static linked library so we can use the
normal LIBS mechanism and it will be statically linked.

Without this the dynamic loader will not automatically load these
libraries and it could result in unresolved dependencies at runtime.

Change-Id: Ia130827d04bd3bb1a8863fc64d0097a076edc751
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1798
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Younghyun Joo <yh_.joo@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/protocol-plugin/plugins/SConscript

index 376fe96..b8dce84 100644 (file)
@@ -49,8 +49,7 @@ if target_os == 'android':
     plugins_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
     plugins_env.AppendUnique(LIBS = ['gnustl_shared'])
 
-plugins_env.AppendUnique(LIBS = [File(env.get('BUILD_DIR') + '/libmosquitto.a'),
-        'mosquitto', 'ssl', 'rt'])
+plugins_env.PrependUnique(LIBS = ['mosquitto', 'ssl', 'crypto', 'rt', 'oc'])
 
 
 ######################################################################