Ed, this is from the Ubuntu install instructions for a project where I
am using elftoolchain.  Per our discussion, if you want people using
Linux to use elftoolchain, you might want to reduce the number of
workarounds in this list.

Daniel

== Installing ELF Tool Chain

We depend on the http://sourceforge.net/projects/elftoolchain/[ELF
Tool Chain] project.

The latest public release of elftoolchain, elftoolchain-0.6.1, has a
bug in that it does not process DWARF4 correctly; get it as follows:

    $ svn checkout -r 3164
      svn://svn.code.sf.net/p/elftoolchain/code/trunk
      elftoolchain-code

Gcc switched to DWARF4 at some point before gcc 4.9.2 and so you need
at least that version of elftoolchain to parse its DWARF output; it is
likely that any revision past that one of 2015-02-18 17:20:12 -0800
will work.

The elftoolchain-0.6.1/INSTALL will tell you what dependencies to
install:

    $ sudo apt-get install bison flex gcc libarchive-dev m4 pmake \
      libexpat1-dev python-yaml sharutils

However you will also need this, which is not documented:

    $ sudo apt-get install zlib1g-dev

The build process will stop and tell you to do this if you do not do
it initially:

    Please download the distribution from:
    http://tetworks.opengroup.org/downloads/38/software/Sources/3.8/tet3.8-src.\
tar.gz
    and unpack it into directory "../../test/tet/tet3.8".

The tet3.8-src.tar.gz file unpacks into a dir named tet3.8 and the
message above means to put it into elftoolchain-0.6.1/test/tet/.

There does not seem to be a configure step.  Note that when building
on Linux, the instructions are wrong: just using pmake will not work,
you must invoke it as follows:

    $ NOGCCERROR=1 pmake

You must install elftoolchain in order to build against it; it is not
enough to just use +-I+ and +-L+ flags as the internal headers within
elftoolchain will not find each other.

    $ sudo pmake install

The INSTALL file provides a way to install elftoolchain in a place
other than the default, but I have not tried it.

elftoolchain-0.6.1 has a bug where the install target does not install
the header files into /usr/include, so I had to do it myself; I don't
know if this is required for the version above, but doing it did not
seem to hurt, so you might as well.

    $ cd elftoolchain-0.6.1/
    $ sudo cp ./libelf/libelf.h ./libelf/gelf.h
      ./common/elfdefinitions.h ./libelftc/libelftc.h
      ./libdwarf/libdwarf.h ./libdwarf/dwarf.h /usr/include/

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Elftoolchain-developers mailing list
Elftoolchain-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/elftoolchain-developers

Reply via email to