Compiling Source Distribution
If you have not taken a precompiled version, you will require:
- GNU make
- GNU install
- GCC C/C++ compiler (versions gcc-4.0, 4.1, 4.2 and 4.4 are known to work in general although 4.2 upwards is recommended).
We provide source code for TCL/TK 8.4.19, but you may wish to provide your own version (perhaps as shipped with your OS), in which case delete the words tcl and tk from the build script in the extras directory of the FSL sources to save build time. Then do the following (this if for the bash shell; if you are using tcsh amend appropriately):
Make a folder to build the source code in, for example ~/fslbuild
- Put the tar file into your build location, and unpack the sources :
cd ~/fslbuild tar zxf fsl-5.0.0-sources.tar.gz
- Set the main FSL environment variable:
- Then source the FSL environment setup script:
- Then check if your machine/compiler is supported by default:
If the above directory does not exist (the ls returns an error):
Select the closest match from the directories in $FSLDIR/config and do the following:
cp -r $FSLDIR/config/closestmatch $FSLDIR/config/$FSLMACHTYPE
Depending on how different your machine and compiler are from the closest match, you may need to edit the files inside the $FSLDIR/config/$FSLMACHTYPE directory which set the local paths and variables for things like install commands, compiler flags, etc.
If you wish to use your vendor supplied TCL/TK (or other third-party libraries, eg libpng) then edit the file $FSLDIR/config/$FSLMACHTYPE/externallibs.mk to point at the header files for these libraries.
Once this test is done then the sources can be built with:
cd $FSLDIR ./build
If you want to re-make a particular package in $FSLDIR/src (e.g. flirt) then first set the FSLDEVDIR environment variable to the same as FSLDIR and then just type:
inside the relevant directory.
Using the compiled binaries
Whilst you can use the binaries from the build location, you will most likely want to move them to a centralised location so all users on the machine can use them. FSLDIR is self contained, so you can move/copy the entire contents to another location, eg /usr/local and then configure your environment to point your shell and the FSL tools to this location. Do this as per these instructions.
For instructions on compiling FSLView, see here.