1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in
Version 14 (modified by jkoshy, 2 years ago)

Bring the wiki page upto-date; tweak the presentation of its content.

Building From Source

This wiki page describes how to build the project from source code.

Retrieving the Source Code

The source code for the project may be checked out using Subversion. The following command line should work on most "unix"-like operating systems:

% svn checkout http://elftoolchain.svn.sourceforge.net/svnroot/elftoolchain/trunk

Active Branches

Version Branch Comments
HEAD trunk/ New development.
0.5.* branches/release-branch-0.5 Bug fixes only.

Build Tools

  • The project's Makefiles are written in a portable subset of the BSD make language.
  • A C compilation tool chain is needed.
  • The test suites use the TET test toolkit.
  • The build of the libelf test suite requires Python and Py-YAML.
  • The libdwarf test suite requires the Expat toolkit.

Build Instructions for Supported Operating Systems

current development Please see the file trunk/INSTALL for build instructions.
Release 0.5.1 Please see the file INSTALL in the released sources.

Building on Unsupported Operating Systems

The following community-contributed instructions describe the process of building the source tree on operating systems that are not directly supported by the build rules in the source tree.

Building on Fedora

On Fedora 15, the following packages are required:

Package Description
bmake The NetBSD make(1) tool
byacc Berkeley Yacc, a parser generator
bzip2-devel A file compression utility
expat-devel An XML parser library
flex A tool for creating scanners (text pattern recognizers)
gcc C compiler.
libarchive-devel A library for handling streaming archive formats
mk-files Support files for bmake, the NetBSD make(1) tool
PyYAML YAML parser and emitter for Python
subversion For accessing the repository.
sharutils The GNU shar utilities for packaging and unpackaging shell archives
zlib-devel The zlib compression and decompression library
  • You need to fix mk/elftoolchain.inc.mk, .if {OS_HOST} == "FreeBSD" to .if {OS_HOST} == "FreeBSD" || ${OS_HOST} == "Linux"
  • You need to fix /usr/share/mk/bsd.lib.mk, apply this patch
    --- bsd.lib.mk.org    2011-08-30 02:00:50.017818359 +0900
    +++ bsd.lib.mk    2011-08-30 02:05:03.275059683 +0900
    @@ -195,6 +195,8 @@
     # but we can use lorder from NetBSD :-)
     LD_shared=-shared -h lib${LIB}.so.${SHLIB_MAJOR}
     LD_solib= --whole-archive lib${LIB}_pic.a
    +LORDER=echo
    +TSORT=cat
     .endif
     LORDER?=lorder
     TSORT?=tsort
    
  • You need to install TET for test.

See also: Ticket #336.

Related Tickets

See Also