All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] trace, lttng: require .pc files
@ 2021-07-12 15:57 Paolo Bonzini
  2021-07-12 16:49 ` Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2021-07-12 15:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: stefanha

The next version of lttng-libs will not require liburcu at run time anymore.
Therefore, it is expected that distros will not include the urcubp libraries
anymore when installing lttng-ust-devel.

To avoid future problems, just require pkg-config to detect lttng-ust.
The .pc files for lttng-ust correctly include liburcubp.a for static
builds, and have always done since pkg-config files were added in 2011.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure         | 18 ++----------------
 meson.build       |  4 ----
 trace/meson.build |  2 +-
 3 files changed, 3 insertions(+), 21 deletions(-)

diff --git a/configure b/configure
index 85db248ac1..4d0a2bfdd8 100755
--- a/configure
+++ b/configure
@@ -3606,21 +3606,8 @@ fi
 ##########################################
 # For 'ust' backend, test if ust headers are present
 if have_backend "ust"; then
-  cat > $TMPC << EOF
-#include <lttng/tracepoint.h>
-int main(void) { return 0; }
-EOF
-  if compile_prog "" "-Wl,--no-as-needed -ldl" ; then
-    if $pkg_config lttng-ust --exists; then
-      lttng_ust_libs=$($pkg_config --libs lttng-ust)
-    else
-      lttng_ust_libs="-llttng-ust -ldl"
-    fi
-    if $pkg_config liburcu-bp --exists; then
-      urcu_bp_libs=$($pkg_config --libs liburcu-bp)
-    else
-      urcu_bp_libs="-lurcu-bp"
-    fi
+  if $pkg_config lttng-ust --exists; then
+    lttng_ust_libs=$($pkg_config --libs lttng-ust)
   else
     error_exit "Trace backend 'ust' missing lttng-ust header files"
   fi
@@ -4773,7 +4760,6 @@ fi
 if have_backend "ust"; then
   echo "CONFIG_TRACE_UST=y" >> $config_host_mak
   echo "LTTNG_UST_LIBS=$lttng_ust_libs" >> $config_host_mak
-  echo "URCU_BP_LIBS=$urcu_bp_libs" >> $config_host_mak
 fi
 if have_backend "dtrace"; then
   echo "CONFIG_TRACE_DTRACE=y" >> $config_host_mak
diff --git a/meson.build b/meson.build
index 6b4b7bfb48..def209a287 100644
--- a/meson.build
+++ b/meson.build
@@ -323,10 +323,6 @@ lttng = not_found
 if 'CONFIG_TRACE_UST' in config_host
   lttng = declare_dependency(link_args: config_host['LTTNG_UST_LIBS'].split())
 endif
-urcubp = not_found
-if 'CONFIG_TRACE_UST' in config_host
-  urcubp = declare_dependency(link_args: config_host['URCU_BP_LIBS'].split())
-endif
 pixman = not_found
 if have_system or have_tools
   pixman = dependency('pixman-1', required: have_system, version:'>=0.21.8',
diff --git a/trace/meson.build b/trace/meson.build
index 08f83a15c3..ef18f11d64 100644
--- a/trace/meson.build
+++ b/trace/meson.build
@@ -26,7 +26,7 @@ foreach dir : [ '.' ] + trace_events_subdirs
                                 input: trace_events_file,
                                 command: [ tracetool, group, '--format=ust-events-h', '@INPUT@', '@OUTPUT@' ],
                                 depend_files: tracetool_depends)
-    trace_ss.add(trace_ust_h, lttng, urcubp)
+    trace_ss.add(trace_ust_h, lttng)
     genh += trace_ust_h
   endif
   trace_ss.add(trace_h, trace_c)
-- 
2.31.1



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

* Re: [PATCH] trace, lttng: require .pc files
  2021-07-12 15:57 [PATCH] trace, lttng: require .pc files Paolo Bonzini
@ 2021-07-12 16:49 ` Stefan Hajnoczi
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2021-07-12 16:49 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 819 bytes --]

On Mon, Jul 12, 2021 at 05:57:10PM +0200, Paolo Bonzini wrote:
> The next version of lttng-libs will not require liburcu at run time anymore.
> Therefore, it is expected that distros will not include the urcubp libraries
> anymore when installing lttng-ust-devel.
> 
> To avoid future problems, just require pkg-config to detect lttng-ust.
> The .pc files for lttng-ust correctly include liburcubp.a for static
> builds, and have always done since pkg-config files were added in 2011.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  configure         | 18 ++----------------
>  meson.build       |  4 ----
>  trace/meson.build |  2 +-
>  3 files changed, 3 insertions(+), 21 deletions(-)

Thanks, applied to my tracing tree:
https://gitlab.com/stefanha/qemu/commits/tracing

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2021-07-12 16:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-12 15:57 [PATCH] trace, lttng: require .pc files Paolo Bonzini
2021-07-12 16:49 ` Stefan Hajnoczi

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.