powertop icon indicating copy to clipboard operation
powertop copied to clipboard

Build error: configure: error: libtracefs is required but was not found

Open vrossum opened this issue 1 year ago • 6 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

vrossum avatar Apr 24 '23 10:04 vrossum

you're going to need to install the -dev version of that package, not just the library

On Mon, Apr 24, 2023 at 3:16 AM vrossum @.***> wrote:

I get a build error on Ubuntu22.04 configure: error: libtracefs is required but was not found

apt install -y libtracefs1 returns already installed

— Reply to this email directly, view it on GitHub https://github.com/fenrus75/powertop/issues/124, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ54FN5RQICWIBVVM3JHVDXCZHHLANCNFSM6AAAAAAXJLNX5A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

fenrus75 avatar Apr 24 '23 12:04 fenrus75

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.

vrossum avatar Apr 24 '23 12:04 vrossum

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 ..;

yeongjoshua avatar May 02 '23 06:05 yeongjoshua

Same problem

configure: error: libtracefs is required but was not found

I have installed libtracefs-dev and libtracefs1 in my system

ivan-koryshkin avatar May 04 '23 08:05 ivan-koryshkin

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

stephematician avatar Jul 28 '23 05:07 stephematician

FYI resolved with installing libtracefs-dev and libtraceevent-dev on Debian Unstable.

xmixahlx avatar Jul 31 '24 01:07 xmixahlx