Compile with libtracefs < 1.2.0(1.0.2 in Fedora33) will get errors:

/usr/bin/ld: cxl/cxl.p/event_trace.c.o: in function `cxl_event_tracing_enable':
/path/to/ndctl/build/../cxl/event_trace.c:238: undefined reference to 
`tracefs_event_enable'
/usr/bin/ld: /path/to/ndctl/build/../cxl/event_trace.c:242: undefined reference 
to `tracefs_trace_is_on'
/usr/bin/ld: /path/to/ndctl/build/../cxl/event_trace.c:245: undefined reference 
to `tracefs_trace_on'
/usr/bin/ld: cxl/cxl.p/event_trace.c.o: in function `cxl_event_tracing_disable':
/path/to/ndctl/build/../cxl/event_trace.c:251: undefined reference to 
`tracefs_trace_off'
/usr/bin/ld: cxl/cxl.p/monitor.c.o: in function `monitor_event':
/path/to/ndctl/build/../cxl/monitor.c:74: undefined reference to 
`tracefs_instance_file_open'

Signed-off-by: Li Zhijian <[email protected]>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 50e83cf770a2..50cb4800ab9b 100644
--- a/meson.build
+++ b/meson.build
@@ -145,7 +145,7 @@ uuid = dependency('uuid')
 json = dependency('json-c')
 if get_option('libtracefs').enabled()
   traceevent = dependency('libtraceevent')
-  tracefs = dependency('libtracefs')
+  tracefs = dependency('libtracefs', version : '>=1.2.0')
 endif
 
 if get_option('docs').enabled()
-- 
2.29.2


Reply via email to