notification: Reordering libs for linker on examples and tests
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Tue, 28 Feb 2017 13:20:17 +0000 (14:20 +0100)
committerUze Choi <uzchoi@samsung.com>
Thu, 23 Mar 2017 00:07:21 +0000 (00:07 +0000)
Reordering libs by dependencies is solving observed issue on yocto:

  ld: warning: liboc.so, \
  needed by out/yocto/i586/release/libresource_directory.so, not found \
  (try using -rpath or -rpath-link)
  libresource_directory.so: \
  undefined reference to `OC::MessageContainer::representations() const'
  (...)

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I8622e0efbdad18236cb04fb14f8d01bcef7b8879
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17563
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/notification/cpp-wrapper/examples/linux/SConscript
service/notification/examples/linux/SConscript
service/notification/unittest/SConscript

index f6dd204..a217447 100755 (executable)
@@ -46,12 +46,12 @@ notification_sample_env.AppendUnique(CPPPATH = [
     ])
 
 notification_sample_env.PrependUnique(LIBS = [
+    'resource_directory',
+    'oc',
     'liboctbstack',
     'oc_logger',
-    'oc',
     'connectivity_abstraction',
     'libcoap',
-    'resource_directory'
     ])
 
 notification_sample_env.AppendUnique(CXXFLAGS = ['-std=c++0x','-frtti'])
index 13c7c8b..059c496 100644 (file)
@@ -22,11 +22,11 @@ notification_sample_env.AppendUnique(CPPPATH = ['#/resource/csdk/resource-direct
 notification_sample_env.AppendUnique(CPPPATH = ['#/resource/csdk/connectivity/api'])
 
 notification_sample_env.PrependUnique(LIBS = [
+       'resource_directory',
        'octbstack',
-       'oc_logger',
        'connectivity_abstraction',
+       'oc_logger',
        'libcoap',
-        'resource_directory'
        ])
 
 if target_os not in ['windows', 'winrt']:
index 609f0b3..1c891da 100644 (file)
@@ -55,7 +55,9 @@ GTest_Main = File(gtest_dir + '/lib/.libs/libgtest_main.a')
 
 notification_test_env.AppendUnique(LIBPATH = [lib_env.get('BUILD_DIR')])
 notification_test_env.AppendUnique(LIBS = [
-    'connectivity_abstraction', 'oc', 'octbstack', 'oc_logger', 'coap', 'resource_directory',
+    'resource_directory', 'oc', 
+    'octbstack', 'connectivity_abstraction', 'oc_logger', 
+    'coap',
     GTest_Main, GTest])
 
 if target_os not in ['windows', 'winrt']: