If you are running a Debian based operating system (i.e. using apt-get) you may want to follow the instructions on the Download page for using our Debian package repository. Otherwise, follow the directions below for building the software from source.
These are the quick and dirty instructions. If you have problems read the detailed instructions in the following sections.
apt-get install libc6-dev g++ make bash libltdl3-dev libgc-dev libcurl3-dev libxml2-dev
tar xzvf xmlpl-builder-x.x.x.tar.gz
cd xmlpl-builder-x.x.x
./configure --prefix=/usr
make
. `pwd`/env
XmlPL is known to work on Debian, Ubuntu and Fedora Linux systems, but should also work on other POSIX compliant systems and if there is enough demand will one day be ported to Windows. In the mean time, if you know what you are doing you can probably build it with Cygwin.
Before building the XmlPL compiler some packages need to be installed. Some may already be on your system. They are listed in the table below:
| Package | Description | Version | Debian |
|---|---|---|---|
| glibc | GNU C library | >= 2.3.5 | libc6-dev |
| g++ | The GNU C++ compiler | >= 3.3.6 | g++ |
| make | GNU Make | >= 3.80 | make |
| bash | The GNU Bourne Again SHell | >= 3.1 | bash |
| libltdl | Platform independent dynamic library loader | >= 1.5.22 | libltdl3-dev |
| gc | Garbage Collector | >= 6.4 | libgc-dev |
| libcURL | Tool for downloading files from URLs | >= 7.15.3 | libcurl3-dev |
| libXML2 | XML parser | >= 2.6.23 | libxml2-dev |
All of these packages can be installed with the following command on Debian systems, either as root or using sudo:
apt-get install libc6-dev g++ make bash libltdl3-dev libgc-dev libcurl3-dev libxml2-dev
As of XmlPL 0.1.3 XercesC is no longer needed.
The latest version of the XmlPL compiler can be found on the SourceForge download page.
The XmlPL compiler is actually made up of several packages. xmlpl-builder is a sort of super package. It contains several other packages and takes care of building and installing the sub-packages in the correct order.
Unpack the distribution in the directory of your choice with the following command:
tar xzvf xmlpl-builder-x.x.x.tar.gz
The xmlpl-builder package greatly simplifies the build process, but it builds and installs everything in one go. For this reason you must first choose an install path.
By default xmlpl-builder builds and installs the software in the same directory it was unpacked into. This is convenient if you don't want to install xmlpl in system directories, but makes it more difficult to use the compiler because you must first setup a number of environment variables so that the executables and libraries are found by the compiler.
If you want to install in a different directory run the following command in the xmlpl-builder directory:
./configure --prefix=/path/to/your/directory
For example to install in to the system directories use the following command:
./configure --prefix=/usr
To build and install XmlPL simply run the following command in the xmlpl-builder directory:
make
If the configuration looks good answer yes.
Go get a cup of coffee. . .
If the build fails for some reason run the following command:
make status
The results of this command will show you how far the build got. Here is an example output:
./build.sh status ***************************** XmlPL Build Status ****************************** libbasicutils: done libantlr: done libxmlpl_cpp_runtime: done xmlplcc: configured libxmlpl_cpp_standard: not started xmlpl: not started ********************************************************************************
In the example above you can see that build finished configuring xmlplcc but got no further. This means it started to make xmlplcc but did not finish for some reason.
Read the error messages printed by the build process and try to correct the problem. Then rerun make in the xmlpl-builder directory and it will try to continue where it left off.
If you are still having problems please email bugs@xmlpl.org, explain your problem and attach the xmlpl-builder.log file from the xmlpl-builder directory.
Once you have successfully built XmlPL you will probably want to use the compiler to build some programs. If you installed XmlPL in a system directory such as /usr then no further configuration is necessary. If you built and installed XmlPL in a non-system directory then you need to source the env script. From the xmlpl-builder directory. Run the following command to setup some environment variables:
. `pwd`/env
Congratulations, you have successfully installed XmlPL and are now ready to slice and dice XML. You may want to check out the Examples.