Compiling Fox on Linux

Compiling F.O.X. under Linux is normally easy (it was originally developed using Linux). The source code for Fox now auto-downloads the wxWidgets and freeglut libraries, so dependencies should be minimal. As always, send me an email at vincefn@users.sf.net if you have any trouble with the installation.

Steps:

Installing the required graphics libraries

Below are specific instructions to install the required graphics libaries for the following distributions :

Please add or correct the instructions for your distribution...

If your distribution is not listed, just follow the general building instructions.

General Instructions (if your distribution is not listed below)

To install F.O.X. under Linux:

Fedora

This is partially a guess since I do not have this distribution, so feel free to correct these

Fedora Core 3 & 4

Debian, Ubuntu or Linux Mint

(as of 2015)

Get Fox (sourceforge)

Get the Fox.tar.bz2 from SourceForge

  tar -xjf Fox-VERSION.tar.bz2

Get Latest Fox from git repository (RECOMMENDED)

  git clone https://github.com/vincefn/objcryst.git
  mv objcryst Fox
  cd Fox/ObjCryst
  ln -sf rules-gnu.mak rules.mak
  cd ../Fox
  ln -sf gnu.mak Makefile

Compile & install Fox

To compile and install Fox, go to the Fox/Fox subdirectory (or Fox-VERSION/Fox/), and then type:

  make shared=1  # See note below about shared libraries options
  sudo make install #(for this last step you must be root).

Note: there are several options for the make command:

Fox will be installed in /usr/local/bin/Fox. Otherwise the compiled file is in the src/Fox subdirectory.

Compiling a version of Fox without GUI (Fox-nogui)

It is possible to compile a version of Fox that does not use a GUI and can only be used from the command-line. This is useful if you want to use Fox on a cluster. To do that just you just need to compile the Fox-nogui target:

  tar -xjf Fox-VERSION.tar.bz2
  cd Fox-VERSION
  cd Fox
  make Fox-nogui shared=1

The resulting application is src/Fox-nogui.

Note that when switching from building Fox to building Fox-nogui (and vice-versa) you must do a  make tidy first.

Compiling an optimized version of Fox

Compile options

Profile driven optimizations

Fox can be further optimized by making "test runs" which are used to give hints to the compiler on how to best optimize the code. To do this you (i) compile Fox by enabling the "recording" of the optimization, then (ii) you run a few optimizations, then (iii) you recompile using the recorded profile. This requires gcc version 3.2 or above.To do that from the Fox subdirectory, do:

make clean
make Fox profile=2
src/Fox --nogui example/pbso4-joint.xml --randomize -n 50000 -o /dev/null
src/Fox --nogui example/Cimetidine-powder.xml --randomize -n 50000 -o /dev/null
src/Fox --speedtest
make clean
make Fox profile=3
make install

This yields about 10% faster code.

If you also launch the Fox GUI and do a profile-fitting (between the 'profile=2' and 'profile=3' compilations), this will also accelerate profile fitting and least squares operations.

None: Compile/Linux (last edited 2015-11-28 13:10:12 by VincentFavreNicolin)