fenrus75 / powertop

The Linux PowerTOP tool -- please post patches to the mailing list instead of using github pull requests
http://www.01.org/powertop
GNU General Public License v2.0
1.07k stars 131 forks source link

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

Open vrossum opened 1 year ago

vrossum commented 1 year ago

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

apt install -y libtracefs1 returns already installed

fenrus75 commented 1 year ago

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: @.***>

vrossum commented 1 year ago

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.

yeongjoshua commented 1 year ago

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 ..;
ivan-koryshkin commented 1 year ago

Same problem

configure: error: libtracefs is required but was not found

I have installed libtracefs-dev and libtracefs1 in my system

stephematician commented 1 year ago

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

xmixahlx commented 3 months ago

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