XuvTools is developed in a cooperative effort from:
  • Chair of Pattern Recognition and Image Processing [www]
  • Friedrich Miescher Institute for Biomedical Research [www]
  • Center for Biological Systems Analysis [www]
 

Development

The instructions given on this page are outdated, and remain here merely for documentation. Please use the up-to-date version that is linked from the navigation menu!

To compile XuvTools on Linux, you have to fulfill several build-dependencies. It is recommended that you use a change-root environment, because the compile-process might be disturbed by other/older/newer libraries that you have installed on your Linux. We provide pages that help you setup the compile environment:

Unix Build instructions for XuvTools:

Set up the build environment:

export LMBSOFTSRC="/Data/${USER}/src/XuvTools"
export LMBSOFTDEST="/Data/${USER}/lmbsoft"
export LMBSOFTTEMP="${LMBSOFTDEST}"

To use a local installation of Qt, you also need to set QTDIR (see below for instructions to compile it). None of these variables should contain spaces, or qmake will fail. It is recommended to add these environment variables to your shell configuration (.bashrc or .profile), so they are set on every login.

Next, run qmake to set up the makefiles and finally run make to start the compilation:

cd ${LMBSOFTSRC}/project/qt && \
qmake -r XuvTools.pro && \
make -j4 all

NOTE: if you want to compile with older versions of gcc (e.g. GCC-4.1 on RHEL5), you need a sufficiently recent version (at least r2751) and you have to advise qmake not to use pedantic errors: qmake CONFIG+=“nopedanticerrors” -r XuvTools.pro

If you want to build the command line tools as well, you can add “tools” to the qmake CONFIG variable. To build and execute the tests, you can add “test” to the qmake CONFIG variable. Here are some examples on how to invoke qmake in above command sequence:

qmake CONFIG+="tools" -r XuvTools.pro
qmake CONFIG+="test" -r XuvTools.pro
qmake CONFIG+="tools test" -r XuvTools.pro

MacOS Build instructions for XuvTools:

Building for Mac is identical to the Unix build instructions above. In addition, Mac OS X supports the concept of “fat binaries”, which are compiled for multiple architectures in a single file. With the help of qmake, XuvTools can be compiled as a fat binary on Mac OS X, by adding one or more of the supported architectures “x86”, “ppc”, “x86_64” or “ppc64” to the CONFIG variable:

qmake CONFIG+="x86" -r XuvTools.pro
qmake CONFIG+="x86 ppc" -r XuvTools.pro
qmake CONFIG+="x86 ppc x86_64 ppc64" -r XuvTools.pro

Unix Build instructions for Qt Software's QT:

Compiling Qt on Linux is only required if you want a more recent version than your distribution can supply, if you want a static version of Qt (to simplify distribution of XuvTools) or if you are plain curious.

Then set the QTDIR variable, and add it to the path:

VERSION="4.5.2"
export QTDIR="${LMBSOFTDEST}/thirdparty_lin_${HOSTTYPE}_gcc$(gcc -dumpversion)/Qt-${VERSION}"
export PATH="${QTDIR}/bin:$PATH"

The recommended configure flags for Qt are the following. Most notably these include -static to create a static link library which makes XuvTools more portable, and -no-qt3support -nomake examples -nomake docs -nomake demos to leave out unrequired parts of the source code and compile faster. Optionally (if you plan to use this Qt only for XuvTools), you can disable more modules and compile even faster by specifying the Qt flags in $QTMORECONFIGUREFLAGS.

QTCONFIGUREFLAGS="-debug-and-release -opensource -optimized-qmake -static \
                  -no-qt3support -nomake examples -nomake demos -nomake docs"
QTMORECONFIGUREFLAGS="-no-svg -no-webkit -no-scripttools -no-gif -no-libtiff \
                      -no-libmng -no-cups -no-dbus -no-nas-sound"

After setting QTCONFIGUREFLAGS, Qt can be downloaded, compiled and installed:

cd ${LMBSOFTSRC}/thirdparty/ && \
wget -c -t0 "ftp://ftp.trolltech.com/qt/source/qt-all-opensource-src-${VERSION}.tar.gz" && \
tar -xzf qt-all-opensource-src-${VERSION}.tar.gz && \
cd qt-all-opensource-src-${VERSION}/ && \
echo "yes"|./configure -prefix ${QTDIR} ${QTCONFIGUREFLAGS} ${QTMORECONFIGUREFLAGS} && \
make -j4 && \
make install

MacOS Build instructions for Qt Software's QT:

Compiling on MacOS is essentially identical to Unix, with two notable exceptions: first, MacOS supports multiple architectures in a single “fat” binary, so QT can be compiled for all architectures at once (add -arch x86 -arch ppc -arch x86_64 -arch ppc64). Second, due to the concept of frameworks, deploying applications with shared libraries is simple on MacOS, so building QT static is not required (remove -static). The Qt MacOS configure flags are therefore:

QTCONFIGUREFLAGS="-debug-and-release -opensource -optimized-qmake \
                  -no-qt3support -nomake examples -nomake doc -nomake demos \
                  -arch x86 -arch ppc -arch x86_64 -arch ppc64"
devel/compile-unix.txt · Last modified: 2010/06/18 22:01 by mario
Contact: admin(a)xuvtools.org