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

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