Build elfutils-libelf from source code

Since there is no elfutils-libelf-devel package for Suse, so I need to build it from source code. The steps are as follow:

(1) Download elfutils from here;

(2) Uncompress source package:

tar xvf elfutils-0.163.tar.bz2

(3) Do the configuration:

cd ./elfutils-0.163
elfutils-0.163 # ./configire

(4) Compile and install libelf:

elfutils-0.163 # cd libelf
elfutils-0.163/libelf # make
elfutils-0.163/libelf # make install

Build other modules, such as libcpu is same.

 

4 thoughts on “Build elfutils-libelf from source code”

  1. Thanks much for this post!

    Trying to build libelf I get: “No rule to make target ‘../lib/libeu.a'”. This is with elfutils elfutils-0.173 as well as elfutils-0.187, on SLES12SP5.

    1. Following should solve the error “No rule to make target ‘../lib/libeu.a’”:

      elfutils-0.163 # cd lib
      elfutils-0.163/lib # make
      elfutils-0.163/lib # cd ../libelf
      elfutils-0.163/libelf # make
      elfutils-0.163/libelf # make install

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.