Building XPS
If you're familiar with building open source software, XPS won't be
unfamiliar. The usual formula:configure ; make ; make check ; make install works
with XPS too. However there are some nuances for configuration and building that
are important to note. See the following sections.
For The Impatient And Risk Prone
First, do this to set up your build environment
mkdir /proj
cd /proj
mkdir install xps llvm expat apr apr-util
cd llvm #obtain and build llvm with --prefix=/proj/install
cd ../expat #obtain and build expat with --prefix=/proj/install
cd ../apr #obtain and build apr with --prefix=/proj/install
cd ../apr-util #obtain and build apr-util with --prefix=/proj/install
cd ../xps
Now, obtain XPS in one of two ways:
wget http://x-p-s.org/releases/xps-x.y.tar.gz ; tar zxf xps-x.y.tar.gz
svn co svn://x-p-s.net/xps
And continue with:
mkdir build
cd build
../xps/mkbuild.sh
The build.sh script will ask you some questions that you need to answer
correctly. Once you do, it will begin building, testing, and installing XPS.
Please note that this does not relieve you from building and installing the
requisite software that XPS depends on (expat, apr, apr-util, llvm, etc.). You
should have already prepared this software if you
are reading these instructions in sequence.
The build.sh script will attempt to do the following things:
- Run "configure" to configure your build directory building the "stADio"
configuration (typical for debug).
- Create makefiles and other things in your build directory.
- Run "make all" to build XPS.
- Run "make install" to install XPS data files.
- Run "make check" to run the test suite.
The result should be an installed, tested version of XPS. The configuration
built is for debugging. That is, it is larger, slower, and debuggable with GDB.
If any step fails, build.sh will stop. Note that it is reqired that you install
the XPS data file ("make install") before you run the test programs
("make check") because the test programs require the data to be installed.
Configuration
Several options to the configure script need to be provided in
order to specify the type of build you want and where software that XPS needs is
located on your machine. The following configuration options are the most
commonly used ones:
- --prefix=/path/to/installation/root
- If you don't specify
--prefix, it defaults to /usr/local.
That might not be what you want.
- --enable-debug
- This causes the resulting build to be done with debug symbols enabled and
possibly additional debug code compiled in. You shouldn't enable this if you
aren't developing XPS.
- --enable-assert
- Built into XPS are numerous assertion checks that validate the program is
running correctly and that assumptions made at coding time are valid at run
time. These checks generally will provide an early warning detection of a
problem that might otherwise go un-noticed. However, the code added to XPS to
support these checks increase the size of XPS and slow it down. If size and
speed are important to you, disable this. Otherwise, leave it enabled for
safety's sake.
- --enable-optimize
- This defaults to
yes so that XPS will be compiled to optimize
it for execution speed. When this is set, additional options are provided to
the compiler to optimize the resulting binaries. If you're developing XPS,
don't use this option as it will get in the way of debugging.
- --enable-inline
- Many of XPS's classes use inline methods. However, the code is arranged in
such a way that the methods can be compiled as inline or not. This option
controls whether inline methods should be compiled as inline. You might want
to turn this off inlining of functions is getting in the way of debugging an
executable.
- --enable-profiling
- If you want to profile the execution of XPS, enable this option so that
gprof can be used to profile the execution of the XPS tool
chain.
- --with-workspace=/path/to/workspace/storage
- XPS manages software for its users. Consequently it needs to know where
the root directory for workspace storage should be located. This should be
a directory with sufficient disk space to accommodate both your project's
source code and compiled objects.
- --with-llvm-src=/path/to/llvm/src/dir
- This option is required. XPS will not build without it because the XPS
Makefiles are based on the system that LLVM uses.
- --with-llvm-obj=/path/to/llvm/obj/dir
- Similarly, XPS needs to know where the LLVM libraries and configured
files are located. This might be the same as the llvm-src-dir.
Next
|