Build error: configure: error: libtracefs is required but was not found
vrossum opened this issue · 7 comments
I get a build error on Ubuntu22.04
configure: error: libtracefs is required but was not found
apt install -y libtracefs1
returns already installed
You are right. But it is already installed as well.
apt install -y libtracefs-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libtracefs-dev is already the newest version (1.2.5-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
This fix for me
git clone https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/
cd libtraceevent; make; sudo make install; cd ..;
git clone https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/
cd libtracefs; make; sudo make install; cd ..;
Same problem
configure: error: libtracefs is required but was not found
I have installed libtracefs-dev
and libtracefs1
in my system
I had to install libtracefs1
, libtracefs-dev
, libtraceevent1
and libtraceevent-dev
. The former two were insufficient on their own.
However, this still resulted in a built error:
devices/i915-gpu.cpp: In function ‘void create_i915_gpu()’:
devices/i915-gpu.cpp:83:14: error: ‘tracefs_event_file_exists’ was not declared in this scope; did you mean ‘tracefs_file_exists’?
83 | if (!tracefs_event_file_exists(NULL, "i915", "i915_gem_ring_dispatch", "format")) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| tracefs_file_exists
make[3]: *** [Makefile:1404: devices/powertop-i915-gpu.o] Error 1
In order to build powertop - I had to build and install the above libraries as per comment by @yeongjoshua
FYI resolved with installing libtracefs-dev and libtraceevent-dev on Debian Unstable.
Same issue on ubuntu 24.04, fixed by installing libtraceevent-dev.