The following steps give you an introduction how to configure, build and work with the Apache Etch sources. At the the moment we support Windows and Linux builds.
After your build of Apache Etch was successful, you will be able to run the examples in the example directory.
The tools and libraries mentioned in the following listing must be available on your development machine in order to be able to work with Etch. It is a good practice to set up a folder containing the external dependencies of all the bindings you would like to build. This folder will be called ETCH_EXTERNAL_DEPENDS later on.
You can use the workspace contents of our continous integration server as a reference for your machine:
- Win32: https://builds.apache.org/job/etch-trunk-windows-x86/ws/externals/
- Linux: https://builds.apache.org/job/etch-trunk-linux-x86/ws/externals/
|Component||Prerequisites and dependencies|
|Etch compiler/code generator
[mandatory for each binding]
|Binding Java||no additional dependencies|
After the download of all the dependencies mentioned above you should now have the following structure (if you want to compile and build for all language bindings):
ETCH_EXTERNAL_DEPENDS/ javacc/ 5.0/ javacc.jar junit / 4.3.1/ junit-4.3.1.jar nunit/ 18.104.22.16892/ [contents of nunit 22.214.171.12492 release tgz/zip] velocity/ 1.7/ velocity-dep-1.7.jar apache-ant/ 1.8.2/ [contents of apache ant 1.8.2 release tgz/zip] apache-ant-cmake/ 1.0/ cmakeant.jar apache-ant-dotnet/ 1.1/ [contents of apache ant dotnet 1.1 release tgz/zip] apr/ 1.4.5/ [apr binary installation, see above] cmake/ 2.8.6/ [contents of cmake standalone 2.8.6 release tgz/zip] cunit/ 2.1/ [built cunit version, on linux: you can skip this and use system libraries on your machine, e.g. apt-get install libcunit1 libcunit1-dev on win32: see binding-c/runtime/c/README.txt for instructions on building cunit on Win32] nsis/ (WINDOWS ONLY) 2.46/ [skip if you want no installer built, else: contents of nsis 2.46 standalone zip/tgz]
Get the source code¶
You can checkout the source tree by using the following SVN command:
svn co http://svn.apache.org/repos/asf/etch/trunk/
If you prefer to use Git you can use git-svn:
git svn clone http://svn.apache.org/repos/asf/etch/trunk/
As soon as all the required dependencies and the source is available on your machine, you are able to build Etch.
Note for Linux 64-bit users:
In order to perform the 32-bit build of the C and C++ bindings make sure that you have installed the 32-bit support libraries. On Ubuntu you need the following packages:
ia32-libs libc6.dev.i386 g++-multilib gcc-multilib
scripts/antSetup.sh(Linux) with your favourite text editor
Check if every environment variable set by the script points to the right location
Run the antSetup script to prepare your build environment
Check the correctness of the paths to the jar archives Etch depends on in the
build.dependenciesfile inside the root folder.
Start build by executeing
ant debugat the shell prompt