All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] Fix build of lttng-libust
@ 2017-10-30 16:31 Norbert Lange
  2017-10-30 19:40 ` Thomas Petazzoni
  0 siblings, 1 reply; 13+ messages in thread
From: Norbert Lange @ 2017-10-30 16:31 UTC (permalink / raw)
  To: buildroot

The build of doc/examples/cmake-multiple-shared-libraries
does fail as a dependend library is missing.
This issue is not specific to builroot and should ideally
be fixed upstream (Issue: https://bugs.lttng.org/issues/1132)

The fix is done without any indepth knowledge of the CMake
mechanisms, but seems to work correctly

Signed-off-by: Norbert Lange <norbert.lange@andritz.com>
---
 package/lttng-libust/0005_fix_build.patch | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 package/lttng-libust/0005_fix_build.patch

diff --git a/package/lttng-libust/0005_fix_build.patch b/package/lttng-libust/0005_fix_build.patch
new file mode 100644
index 0000000000..96be80aaa6
--- /dev/null
+++ b/package/lttng-libust/0005_fix_build.patch
@@ -0,0 +1,28 @@
+diff -burN lttng-ust-2.9.0.org/doc/examples/cmake-multiple-shared-libraries/cmake/FindLTTngUST.cmake lttng-ust-2.9.0/doc/examples/cmake-multiple-shared-libraries/cmake/FindLTTngUST.cmake
+--- lttng-ust-2.9.0.org/doc/examples/cmake-multiple-shared-libraries/cmake/FindLTTngUST.cmake	2016-11-29 02:46:24.000000000 +0100
++++ lttng-ust-2.9.0/doc/examples/cmake-multiple-shared-libraries/cmake/FindLTTngUST.cmake	2017-10-30 17:01:42.321775178 +0100
+@@ -49,6 +49,8 @@
+ # build is a possibility (Yocto).
+ find_path(LTTNGUST_INCLUDE_DIRS_GENERATED NAMES lttng/ust-config.h)
+ find_library(LTTNGUST_LIBRARIES NAMES lttng-ust)
++find_library(LTTNGUST_LIBRARIES_DEP NAMES lttng-ust-tracepoint)
++
+ 
+ if(LTTNGUST_INCLUDE_DIRS AND LTTNGUST_INCLUDE_DIRS_GENERATED AND LTTNGUST_LIBRARIES)
+   # find tracef() and tracelog() support
+@@ -97,13 +99,14 @@
+     add_library(LTTng::UST UNKNOWN IMPORTED)
+     set_target_properties(LTTng::UST PROPERTIES
+       INTERFACE_INCLUDE_DIRECTORIES "${LTTNGUST_INCLUDE_DIRS};${LTTNGUST_INCLUDE_DIRS_GENERATED}"
+-      INTERFACE_LINK_LIBRARIES ${CMAKE_DL_LIBS}
++      INTERFACE_LINK_LIBRARIES "${LTTNGUST_LIBRARIES_DEP};${CMAKE_DL_LIBS}"
+       IMPORTED_LINK_INTERFACE_LANGUAGES "C"
+       IMPORTED_LOCATION "${LTTNGUST_LIBRARIES}")
+   endif()
+ 
+   # add libdl to required libraries
+-  set(LTTNGUST_LIBRARIES ${LTTNGUST_LIBRARIES} ${CMAKE_DL_LIBS})
++  set(LTTNGUST_LIBRARIES ${LTTNGUST_LIBRARIES} ${LTTNGUST_LIBRARIES_DEP} ${CMAKE_DL_LIBS})
+ endif()
+ 
+ # handle the QUIETLY and REQUIRED arguments and set LTTNGUST_FOUND to
-- 
2.14.2

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-11-06 21:41 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-30 16:31 [Buildroot] [PATCH 1/1] Fix build of lttng-libust Norbert Lange
2017-10-30 19:40 ` Thomas Petazzoni
2017-10-31 10:20   ` Norbert Lange
2017-11-05 16:13     ` Arnout Vandecappelle
2017-11-05 16:31       ` Yann E. MORIN
2017-11-05 19:55         ` Philippe Proulx
2017-11-05 21:10           ` Yann E. MORIN
2017-11-05 21:20             ` Yann E. MORIN
2017-11-05 20:36       ` Norbert Lange
2017-11-05 22:02         ` Arnout Vandecappelle
2017-11-06 21:06           ` Philippe Proulx
2017-11-06 21:12             ` Thomas Petazzoni
2017-11-06 21:41               ` Philippe Proulx

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.