Skip to content

Commit

Permalink
Update dev docs with new filename bootstrap.sh. Eraesd unnecesary par…
Browse files Browse the repository at this point in the history
…agraph with instruction for now old gcc version
  • Loading branch information
Ricardo Rios-Carrillo authored and spinicist committed May 24, 2024
1 parent d6526cf commit 5ee8b78
Showing 1 changed file with 4 additions and 23 deletions.
27 changes: 4 additions & 23 deletions Docs/Developer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,10 @@ Basic Requirements

WARNING - You will require a recent compiler for QUIT as it uses C++17 features. On Mac simply having the most recent software updates is enough, on Linux you will need GCC 7.0.0. No one has been brave enough to compile QUIT on Windows to date.

Installing GCC 7
----------------

Most Linux systems currently ship with GCC 4.8 or lower as their system compiler. As of QUIT 2.1 you will require GCC 7 as QUIT uses C++17 features. Joost Kuijer has kindly provided the following recipe for installing newer GCC versions in a user directory and using it to compile QUIT.

1. Follow the GCC guide here: https://gcc.gnu.org/wiki/InstallingGCC
2. Before running the ``build.sh`` script let cmake know about the new compiler
.. code-block:: bash
export PATH=$HOME/GCC-7.0.0/bin:$PATH
export LD_LIBRARY_PATH=$HOME/GCC-7.0.0/lib:$HOME/GCC-7.0.0/lib64:$LD_LIBRARY_PATH
export CC=$HOME/GCC-7.0.0/bin/gcc
export CXX=$HOME/GCC-7.0.0/bin/g++
3. Before executing the compiled code also do (you can add this line to your `.bashrc` file:
.. code-block:: bash
export LD_LIBRARY_PATH=$HOME/GCC-7.0.0/lib:$HOME/GCC-7.0.0/lib64:$LD_LIBRARY_PATH
External Libraries
------------------

QUIT is built using several C++ libraries. These are currently included in the project as git submodules. The easiest way to initialise these is with the ``build.sh`` script. However, if you are already have some of them available you may wish to not run the script and instead configure them yourself. This is discussed further below. The libraries are:
QUIT is built using several C++ libraries. These are currently included in the project as git submodules. The easiest way to initialise these is with the ``bootstrap.sh`` script. However, if you are already have some of them available you may wish to not run the script and instead configure them yourself. This is discussed further below. The libraries are:

- `Eigen <http://eigen.tuxfamily.org>`_

Expand All @@ -50,12 +31,12 @@ QUIT is built using several C++ libraries. These are currently included in the p
Compilation
-----------

If you are unfamiliar with C++/CMake/git etc. a script is provided that should be able to build the tools provided the right software is available on your system. To use it, in a terminal window, change directory to where you unpacked QUIT. Then type ``./build.sh``. This should correctly checkout the git repositories for each external library, build Ceres and ITK, and then configure and build QUIT.
If you are unfamiliar with C++/CMake/git etc. a script is provided that should be able to build the tools provided the right software is available on your system. To use it, in a terminal window, change directory to where you unpacked QUIT. Then type ``./bootstrap.sh``. This should correctly checkout the git repositories for each external library, build Ceres and ITK, and then configure and build QUIT.

CMake projects separate the ``build`` and ``install`` phases. The binaries are only moved to a single folder during ``install``. By default, the install directory is ``/usr/local/bin``. If you run ``./build.sh -i``it will run the install step to this directory. You can also ``cd`` into the ``build/`` directory and then type ``make install`` (or ``ninja install``) to avoid re-running the entire ``build.sh`` script.
CMake projects separate the ``build`` and ``install`` phases. The binaries are only moved to a single folder during ``install``. By default, the install directory is ``/usr/local/bin``. If you run ``./bootstrap.sh -i``it will run the install step to this directory. You can also ``cd`` into the ``build/`` directory and then type ``make install`` (or ``ninja install``) to avoid re-running the entire ``bootstrap.sh`` script.

If you want to change where the binaries are installed, you can either:
- Run ``./build.sh -i -p /path/to/install``
- Run ``./bootstrap.sh -i -p /path/to/install``
- ``cd /build; ccmake ./``, change the ``INSTALL_PREFIX_DIR``, configure (press c), generate (press g), exit, then ``make install``

Note that the binaries will end up in ``/bin`` inside the install prefix.
Expand Down

0 comments on commit 5ee8b78

Please sign in to comment.