Menu

BuildingFromSource

Joseph Koshy

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 svn://svn.code.sf.net/p/elftoolchain/code/trunk

git-svn users can use:

% git svn clone https://svn.code.sf.net/p/elftoolchain/code elftoolchain

Active Branches

Version Branch Comments
HEAD trunk New development.
0.7.* branches/release-branch-0.7 "Stable" branch.

Build Notes

Generic notes about the build process:

  • 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.
  • Documentation builds require LaTeX and the PGF graphics package.

Building On Supported Operating Systems

current development Please see the file trunk/INSTALL for build instructions.
Release 0.7.1 Please see the file INSTALL in the released sources.
Release 0.6.1 Please see the file INSTALL in the released sources.
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.

See Also


Related

Wiki: BuildAutomation
Wiki: Home
Wiki: PortingNotes
Wiki: libdwarf
Wiki: libelf

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.