User Tools

Site Tools


Installation

Top: Frida handbook
Previous: Introduction
Next: Tutorial

This page describes the standard procedure to download, compile, and install Frida.

See also:

  • frida.ini: local set up
  • git: alternative download and build procedure, using the development tree

Requirements

Operating systems

Required packages

To compile the sources, one needs the compilation tools

  • pkg-config (for configuring the Fridalibs)
  • make (for building the Fridalibs)
  • cmake (for building Frida)
  • g++ (GNU C++ compiler. Starting with Frida2.1.6a, we require basic support for the new language standard C++11. At least g++-4.5 is required)
  • bison
  • flex

and the libraries (-dev packages)

  • readline (at least version 4.3)
  • history (usually packaged as part of libreadline-dev)
  • gsl
  • blas (required by gsl)
  • fftw3
  • boost (module filesystem, plus header-only modules format, algorithm)
  • yaml-cpp version 0.5 (Neither 0.3 nor 0.6 will work. Why are these people breaking their API over and again?)

At runtime, one external program is needed:

  • gnuplot (With X11 support. This comes typically as package “gnuplot” or “gnuplot-x11”. Package “gnuplot-nox” will not work; typical error messages are “unrecognized option -title” and “util.c: No such file or directory”)

In Debian/Ubuntu, the following command installs all required packages:

sudo aptitude install \
  make \
  g++ \
  bison \
  flex \
  libcerf-dev \
  libreadline-dev \
  libgsl0-dev \
  libfftw3-dev \
  libyaml-cpp-dev \
  libboost-regex-dev \
  libboost-date-time-dev \
  gnuplot

Other required packages are automatically installed through dependencies. In particular, each development package (-dev, containing the .h files) depends on a library package that contains the corresponding shared library.

The libboost regex and date-time development packages depend on libboost-dev which contains, among others, the shared pointer module (which is implemented through .h files only; no shared library).

There may be some incompatibility between g++ and libboost versions. With g++ version >= 4.4, we need at least libboost1.40.

If libcerf is not available as a package, then please report this problem. As a workaround, install from source, as described below.

Download Frida and dependences

Download most recent source packages from http://apps.jcns.fz-juelich.de/src.

In case that libcerf is not available as a package, then also install from source:

Build dependences

Unpack the libraries kww, lmfit, ransample:

tar xzvf <source>.tgz

To build kww and ransample:

cd <source directory>
./configure
make
make install

To build lmfit:

cd <source directory>
mkdir build
cd build
cmake ..
make
make install

On some systems, it may be necessary to register newly installed libraries:

sudo ldconfig                       # may be required in Ubuntu
sudo /sbin/ldconfig /usr/local/bin  # may be required in Suse

Build Frida

Unpack and build the main program:

tar xzvf frida2-<version>.tgz
cd frida2
mkdir build
cd build
cmake ..
make -j<n>

where <n> is the number of processors to be used in parallel.

Now run the test suite:

unset LD_LIBRARY_PATH
ctest -j<n>

Unsetting the environment variable LD_LIBRARY_PATH ensures that freshly compiled libraries are used, and not previously installed ones.

Only proceed if all tests pass. Otherwise run

ctest -V

to get more verbous output, and report to the maintainer.

If tests pass, proceed with

sudo make install

Finally, create a directory for the graphics output:

mkdir ~/gnew

That's it. The command frida should start a frida session.

A first interactive session

Try to run the following test session:

$ frida
? >  fm                                # enter command fm = file make to create a little data file
Number of points per spectrum [1] ? 11 # enter 11 to overwrite the default 1
Number of spectra [1] ?                # just press RETURN to accept the default value
Save as [grid3] ?                      # again, we just accept the default value
0 >  oy x^2                            # our data file becomes a parabola
1 >  p                                 # plot it
1 >  cc p0*t^p1                        # create a fit curve: some power law
2 >  cwc                               # equal weight to all data points (since no error bars are set)
2 >  cf                                # fit p0,p1 to the data; should say "success"
2 >  a                                 # add the fit to the plot
2 >  quit                              # terminate the frida session

Frequent errors

When libraries are not found

If libraries are not found, check LD_LIBRARY_PATH. Possibly, /usr/local/lib must be added. [related commands: ldd, ldconfig].

When libreadline is not found

If configure fails because libreadline is reportedly not found or corrupted, please check the config.log for further details. If it contains error messages like the following

/usr/users/iff_ns/brodeck/usr/local/lib/libreadline.so: undefined reference to `PC'
/usr/users/iff_ns/brodeck/usr/local/lib/libreadline.so: undefined reference to `tgetflag'
...
/usr/users/iff_ns/brodeck/usr/local/lib/libreadline.so: undefined reference to `tgetstr'

then this due to a bug in outdated Linux distributions like CentOS5. See https://bugzilla.redhat.com/show_bug.cgi?id=499837. The missing symbols are provided by the library ncurses.

export LDFLAGS="-lncurses"

and run configure again.

How to report bugs

If problems persist, please send a bug report. Attach the output of

uname -a

and run

make clean
./configure | tee configure.log
make | tee make.log

and attach configure.log and make.log.