From 2993af980993ebb70b686b1a521d98d26e85cfc2 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Tue, 21 Jul 2015 20:55:50 +0200 Subject: [PATCH] resource-manipulation: libserver_builder.so add missing depending library libserver_builder.so is also depending on liboc.so and librcs_common.so, this patch adds these dependencies to the build. liboctbstack.so is only needed when LOGGING=true is set. Without liboctbstack.so libserver_builder.so misses the dependencies to the OCLog and OCLogv symbols. Add LIBPATH to make sure the libs will be found, this fixes a problem in some jenkins tests. pthread is added two times, once should be enough. Without this the dynamic loader will not automatically load these libraries and it could result in unresolved dependencies at runtime. Change-Id: I6af126eb4af975b7231d01df922885c7dec5fc56 Signed-off-by: Hauke Mehrtens Reviewed-on: https://gerrit.iotivity.org/gerrit/1799 Tested-by: jenkins-iotivity Reviewed-by: Uze Choi --- service/resource-manipulation/src/serverBuilder/SConscript | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/service/resource-manipulation/src/serverBuilder/SConscript b/service/resource-manipulation/src/serverBuilder/SConscript index d152287..4b93547 100644 --- a/service/resource-manipulation/src/serverBuilder/SConscript +++ b/service/resource-manipulation/src/serverBuilder/SConscript @@ -47,6 +47,8 @@ server_builder_env.AppendUnique(CPPPATH = [ server_builder_env.AppendUnique(CPPPATH = [env.get('SRC_DIR')+'/extlibs', 'include']) +server_builder_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')]) + if target_os not in ['windows', 'winrt']: server_builder_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall']) if target_os != 'android': @@ -59,7 +61,10 @@ if target_os == 'android': server_builder_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions']) server_builder_env.PrependUnique(LIBS = ['gnustl_shared', 'compatibility', 'log']) -server_builder_env.AppendUnique(LIBS = ['dl']) +server_builder_env.AppendUnique(LIBS = ['dl', 'oc', 'rcs_common']) + +if env.get('LOGGING'): + server_builder_env.AppendUnique(LIBS = ['octbstack']) if not release: server_builder_env.AppendUnique(CXXFLAGS = ['--coverage']) @@ -80,7 +85,6 @@ server_builder_env.InstallTarget([server_builder_static, server_builder_shared], ###################################################################### server_builder_test_env = server_builder_env.Clone(); -server_builder_test_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')]) server_builder_test_env.AppendUnique(CPPPATH = [ env.get('SRC_DIR')+'/extlibs/hippomocks-master', gtest_dir + '/include', @@ -92,9 +96,6 @@ gtest_main = File(gtest_dir + '/lib/.libs/libgtest_main.a') server_builder_test_env.PrependUnique(LIBS = [ 'rcs_server', - 'rcs_common', - 'pthread', - 'oc', 'octbstack', 'oc_logger', 'connectivity_abstraction', -- 2.7.4