| Compiling mauveAligner from source |
| Mauve Aligner - Mauve Developer Guide | |
|
Although Mauve is provided as a pre-compiled binary for Windows, Linux, and Mac OS X, we also make the source code available so that users can modify Mauve and compile it on other platforms. This chapter describes the procedure for compiling the command-line mauveAligner tool from source code on a unix system. Project files for Microsoft Visual studio are included to compile Mauve in a Windows environment. CodeWarrior project files have been obsoleted. 0. PrerequisitesmauveAligner depends on several additional software packages. The latest code in our subversion repository gets packaged automatically every night and is available from http://gel.ahabs.wisc.edu/mauve/source/snapshots The developers make no guarantee that source snapshots will compile or otherwise work.
Each of these packages must be downloaded and installed in order to compile mauveAligner successfully. Alternatively, it may be preferable to check the source code out directly from the sourceforge subversion repository, especially if the code will be modified and changes will be committed back to the repository. To do so, execute the following series of commands inside a development directory: svn co https://mauve.svn.sourceforge.net/svnroot/mauve/libGenome/trunk libGenome 1. Installing BoostBoost may be installed as a pre-compiled RPM on Linux systems, or from source on Windows and Mac OS X. We recommend building boost from source on all platforms. A default build of the boost source may be done using the commands: export NO_COMPRESSION="true" 2. Installing libGenomeOnce downloaded and untarred, libGenome can be compiled and installed using the following commands from within the libGenome directory: ./configure --prefix=$HOME libGenome is installed by default in the /usr/local directory. The --prefix argument to ./configure is optional and specifies the location where libGenome gets installed. 3. Installing muscleThe installation procedure for the muscle library is similar to that for libGenome. From the software package's directory, execute the following commands: ./configure --prefix=$HOME An error usually occurs after running the 'make' command. It is safe to ignore and simply continue with 'make install'. Again, the --prefix is an optional argument to ./configure which specifies the location where the library gets installed. 4. Installing libMemsSince libMems depends on the functionality provided by libGenome, muscle, and boost these packages must be installed before libMems. Also, libMems requires the pkg-config software to determine the location of libGenome and libClustalW during the installation process. From the libMems directory, execute the following commands: ./configure --prefix=$HOME Also, if muscle or libGenome were installed to a non-standard directory, the directory may need to be added to the PKG_CONFIG_PATH environment variable. For example, if libGenome were installed in the prefix $HOME, the PKG_CONFIG_PATH variable could be set with this command: export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$HOME/lib/pkgconfig" It's a good idea to add PKG_CONFIG_PATH to the .profile or .bashrc or another login script so it doesn't need to be set manually every time the user logs in. As with the other packages, the installation prefix can be specified using the --prefix argument. 5. Compiling mauveAlignerOnce libGenome, muscle, and libMems are installed, the aligner software can be compiled. From the mauveAligner directory, issue the following commands: ./configure In addition to mauveAligner and progressiveMauve, several supporting applications will be compileld. We do not have explicit documentation for them. Many of them are self-explanatory and give their usage instructions when run without arguments. The statically linked version of mauveAligner is called mauveStatic. It includes the necessary part of the support libraries directly in the program and can be used on other systems without first installing the support libraries. Note that Mac OS X doesn't support static linking and any applications built on OS X will be dynamically linked. Compiling from a source snapshotThe latest development snapshots do not have a complete build system. In order to compile snapshots the build system must be regenerated using a recent version of the autotools software. To prepare a source snapshot for a build, execute the following command: ./autogen.sh You will need GNU autotools installed, including autoconf and automake. The source directory will now be ready for a build with the usual configure, make, make install procedure. Other notesSince Apple's migration to Intel CPUs, Mac software should be compiled for both Intel and PowerPC CPUs, at least for the time being. Apple refers to programs with both PPC and x86 code as "universal". Building a universal library with GNU autotools is nearly impossible, so it's necessary to build x86 and PPC libraries and binaries separately and then join the result with the lipo tool. To build for a PowerPC CPU on an Intel machine, set the following environment variables: export CFLAGS="-O3 -g -isysroot /Developer/SDKs/MacOSX10.3.9.sdk -arch ppc" And compile boost with bjam "-sTOOLS=darwin" "-sGXX=g++ -O3 -g -isysroot /Developer/SDKs/MacOSX10.3.9.sdk -arch ppc" "-sGCC=gcc -O3 -g -isysroot /Developer/SDKs/MacOSX10.3.9.sdk -arch ppc" "-sBUILD=release <linkflags>-Wl,-syslibroot,/Developer/SDKs/MacOSX10.3.9.sdk <runtime-link>static <threading>single/multi" --prefix=$HOME install The rest of the build procedure remains the same. The resulting libraries and applications will run on any PowerPC mac with an OS as old as 10.3.9. To create a single universal binary for mauveAligner, run something akin to the following command lipo -create mauveAligner-intel mauveAligner-ppc -output mauveAligner where mauveAligner-intel and mauveAligner-ppc are the paths to the intel and ppc mauveAligner binaries, respectively. A complete exampleThe following series of commands will build all libraries and source code from the latest source snapshots on an x86 Linux system, installing software to the user's home directory: # create essential directories if they don't exist cd sgEvolver If you will be building the source more than once, or especially if you will be editing and recompiling the source, it will be desirable to have PATH, LD_LIBRARY_PATH, and PKG_CONFIG_PATH set automatically on login. Edit one of $HOME/.profile or $HOME/.bashrc or $HOME/.profile.local to set the environment variables. To build the GUI, execute the following additional commands: wget http://gel.ahabs.wisc.edu/mauve/source/snapshots/mauve-snapshot.tar.gz cd mauve The Mauve GUI build will reside in mauve/dist/ |
|
| Last Updated ( Friday, 27 March 2009 ) | |