2019-04-04 09:27:23 +01:00
|
|
|
Installation
|
|
|
|
============
|
|
|
|
|
|
|
|
.. highlight:: console
|
|
|
|
|
|
|
|
drgn depends on `Python <https://www.python.org/>`_ 3.6 or newer as well as
|
|
|
|
`elfutils <https://sourceware.org/elfutils/>`_. The build requires `GCC
|
2019-05-03 17:56:36 +01:00
|
|
|
<https://gcc.gnu.org/>`_ or `Clang <https://clang.llvm.org/>`_, `GNU Make
|
|
|
|
<https://www.gnu.org/software/make/>`_, `pkgconf <http://pkgconf.org/>`_, and
|
|
|
|
`setuptools <https://pypi.org/project/setuptools/>`_. A build from a Git
|
|
|
|
checkout also requires the GNU Autotools (`autoconf
|
2019-04-04 09:27:23 +01:00
|
|
|
<https://www.gnu.org/software/autoconf/>`_, `automake
|
|
|
|
<https://www.gnu.org/software/automake/automake.html>`_, and `libtool
|
|
|
|
<https://www.gnu.org/software/libtool/libtool.html>`_). Install those
|
|
|
|
dependencies:
|
|
|
|
|
|
|
|
Arch Linux::
|
|
|
|
|
2019-05-03 17:56:36 +01:00
|
|
|
$ sudo pacman -S --needed autoconf automake libtool make gcc pkgconf libelf python python-setuptools
|
2019-04-04 09:27:23 +01:00
|
|
|
|
|
|
|
Debian/Ubuntu::
|
|
|
|
|
2019-05-03 18:21:13 +01:00
|
|
|
$ sudo apt-get install autoconf automake libtool make gcc pkgconf libelf-dev libdw-dev python3 python3-dev python3-setuptools
|
2019-04-04 09:27:23 +01:00
|
|
|
|
|
|
|
Note that Debian, Ubuntu Trusty, and Ubuntu Xenial ship Python versions which
|
|
|
|
are too old, so a newer version must be installed manually.
|
|
|
|
|
|
|
|
Due to a packaging `bug
|
|
|
|
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=885071>`_, the following may
|
|
|
|
also be required::
|
|
|
|
|
|
|
|
$ sudo apt-get install liblzma-dev zlib1g-dev
|
|
|
|
|
|
|
|
Fedora::
|
|
|
|
|
2019-05-03 18:21:13 +01:00
|
|
|
$ sudo dnf install autoconf automake libtool make gcc pkgconf elfutils-devel python3 python3-devel python3-setuptools
|
2019-04-04 09:27:23 +01:00
|
|
|
|
|
|
|
Then, drgn can be built and installed::
|
|
|
|
|
|
|
|
$ python3 setup.py build
|
|
|
|
$ sudo python3 setup.py install
|
|
|
|
$ drgn --help
|
|
|
|
|
|
|
|
Or, it can be be built and run locally::
|
|
|
|
|
|
|
|
$ python3 setup.py build_ext -i
|
|
|
|
$ python3 -m drgn --help
|