TubeTK/Build Instructions: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
Line 1: Line 1:
= Stand-Alone =
= Slicer-dependent build =
 
This is the recommended build process.
 
It uses a compiled version of Slicer to provide its dependencies. 


In this build format, TubeTK produces a set of libraries and command-line programs that can be used to process images from the command line and to build other applications.
In this build format,  
# TubeTK produces a set of libraries and command-line programs that can be used to process images from the command line and to build other applications.
# TubeTK methods are available from within the Slicer application against which it is built.


This build format is tested nightly on Windows, OS X, and Linux machines.
This build format is tested nightly on Windows, OS X, and Linux machines.
Line 13: Line 19:
== Install Requirements and Options ==
== Install Requirements and Options ==


=== CMake (Requirement) ===
=== Slicer ===


Install the latest stable release.
* If you are building the Stand-Alone version of TubeTK, you do not need to build Slicer.
* http://www.cmake.org


=== GIT (Requirement) ===
* If you are building the Slicer-Dependent version of TubeTK, you must build Slicer from source:
** Source: http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/Build_Instructions


Install the latest stable release.
Oddities
* Windows
* There is a bug in Slicer v4.4.0 that prevents it from compiling on OSX 10.9.  The simple fix is pending integration into Master.  You can apply it manually.  See https://github.com/Slicer/Slicer/pull/189/files
** http://msysgit.github.io/
* Linux
** <code> sudo apt-get install git </code>


=== Qt ===
=== Boost ===
 
Install version 4.8.6
* Windows
** You will want the 64-bit version of Qt, which must be compiled from source.
** http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/Build_Instructions/Prerequisites/Qt#Windows_3
* Linux
** Qt is included with most versions of Linux
* Mac
** Download the installer from
*** http://download.qt.io/archive/qt/4.8/
 
=== Boost (optional) ===


Download and build Boost:
Download and build Boost:
Line 48: Line 39:
** <code> ./bjam -j14 </code>
** <code> ./bjam -j14 </code>
** <code> ./bjam cxxflags=-fPIC cflags=-fPIC -a link=static -j14 </code>
** <code> ./bjam cxxflags=-fPIC cflags=-fPIC -a link=static -j14 </code>
=== Python (optional) ===
Versions 2.7.x is supported at this time.
Download and install per system instructions at:
* https://www.python.org/downloads/
** Note that python is already installed in most Linux and Mac variants.


== Download Source ==
== Download Source ==


Download the source via git
Download the source via git
git clone https://github.com/KitwareMedical/TubeTK TubeTK
* <code> git clone https://github.com/KitwareMedical/TubeTK TubeTK </code>


== Configure ==
== Configure ==


Create a directory, outside of the source directory, to hold the compilation
Create a directory, outside of the source directory, to hold the compilation
mkdir TubeTK-Release
* <code> mkdir TubeTK-Release </code>
cd TubeTK-Release
* <code> cd TubeTK-Release </code>


Within that compilation directory, run cmake and point it to where the source is located
Within that compilation directory, run cmake and point it to where the source is located
cmake ../TubeTK
* <code> cmake ../TubeTK </code>
 
Set the following CMake variables
* Build_TYPE = <same build type as Slicer installation: Debug or Release>
* TubeTK_USE_SLICER = On
* Slicer_DIR = <Path to your Slicer build directory>


== Build ==
== Build ==
Line 75: Line 63:
=== Windows ===
=== Windows ===
Load the TubeTK solution file in Visual Studio
Load the TubeTK solution file in Visual Studio
* Select File -> Open -> Project/Solution -> open TubeTK-Release/TubeTK.sln
* <code> Select File -> Open -> Project/Solution -> open TubeTK-Release/TubeTK.sln </code>
Perform the initial build using your compiler at the top-level of TubeTK-Release.  This will update and build the libraries that TubeTK depends on (ex. VTK, ITK), and then build TubeTK.
** Perform the initial build using your compiler at the top-level of TubeTK-Release.  This will update and build the libraries that TubeTK depends on (ex. VTK, ITK), and then build TubeTK.
* Right click on the "ALL_BUILD" project and select "Build".
* <code> Right click on the "ALL_BUILD" project and select "Build". </code>
Subsequent builds should be initiated in the subdir TubeTK-Release/TubeTK-build to save time.  This will build TubeTK only.  You may have to periodically build from the top-level of TubeTK-Release to get updates to the libraries that TubeTK depends on.
** Subsequent builds should be initiated in the subdir TubeTK-Release/TubeTK-build to save time.  This will build TubeTK only.  You may have to periodically build from the top-level of TubeTK-Release to get updates to the libraries that TubeTK depends on.
* Right click on the "TubeTK" project and select "Build".
*** <code> Right click on the "TubeTK" project and select "Build". </code>


==== Linux and OS X ====
==== Linux and OS X ====
Perform the initial build using your compiler at the top-level of TubeTK-Release.  This will update and build the libraries that TubeTK depends on (ex. VTK, ITK), and then build TubeTK.
Perform the initial build using your compiler at the top-level of TubeTK-Release.  This will update and build the libraries that TubeTK depends on (ex. VTK, ITK), and then build TubeTK.
cd $HOME/TubeTK-Release
* <code> cd $HOME/TubeTK-Release </code>
make
* <code> make </code>
Subsequent builds should be initiated in the subdir TubeTK-Release/TubeTK-build to save time.  This will build TubeTK only.  You may have to periodically build from the top-level of TubeTK-Release to get updates to the libraries that TubeTK depends on.
Subsequent builds should be initiated in the subdir TubeTK-Release/TubeTK-build to save time.  This will build TubeTK only.  You may have to periodically build from the top-level of TubeTK-Release to get updates to the libraries that TubeTK depends on.
cd $HOME/TubeTK-Release/TubeTK-build
* <code> cd $HOME/TubeTK-Release/TubeTK-build </code>
make
* <code> make </code>


= Slicer-dependent build =
= Stand-Alone =


This is the recommended build process.
In this build format, TubeTK produces a set of libraries and command-line programs that can be used to process images from the command line and to build other applications.
 
It uses a compiled version of Slicer to provide its dependencies. 
 
In this build format,  
# TubeTK produces a set of libraries and command-line programs that can be used to process images from the command line and to build other applications.
# TubeTK methods are available from within the Slicer application against which it is built.


This build format is tested nightly on Windows, OS X, and Linux machines.
This build format is tested nightly on Windows, OS X, and Linux machines.
Line 109: Line 91:
== Install Requirements and Options ==
== Install Requirements and Options ==


=== Slicer (Required for Slicer-Dependent Build) ===
=== CMake (Requirement) ===
 
Install the latest stable release.
* http://www.cmake.org
 
=== GIT (Requirement) ===


* If you are building the Stand-Alone version of TubeTK, you do not need to build Slicer.
Install the latest stable release.
* Windows
** http://msysgit.github.io/
* Linux
** <code> sudo apt-get install git </code>


* If you are building the Slicer-Dependent version of TubeTK, you must build Slicer from source:
=== Qt ===
** Source: http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/Build_Instructions


Oddities
Install version 4.8.6
* There is a bug in Slicer v4.4.0 that prevents it from compiling on OSX 10.9. The simple fix is pending integration into Master.  You can apply it manually.  See https://github.com/Slicer/Slicer/pull/189/files
* Windows
** You will want the 64-bit version of Qt, which must be compiled from source.
** http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/Build_Instructions/Prerequisites/Qt#Windows_3
* Linux
** Qt is included with most versions of Linux
* Mac
** Download the installer from
*** http://download.qt.io/archive/qt/4.8/


=== Boost ===
=== Boost (optional) ===


Download and build Boost:
Download and build Boost:
Line 129: Line 126:
** <code> ./bjam -j14 </code>
** <code> ./bjam -j14 </code>
** <code> ./bjam cxxflags=-fPIC cflags=-fPIC -a link=static -j14 </code>
** <code> ./bjam cxxflags=-fPIC cflags=-fPIC -a link=static -j14 </code>
=== Python (optional) ===
Versions 2.7.x is supported at this time.
Download and install per system instructions at:
* https://www.python.org/downloads/
** Note that python is already installed in most Linux and Mac variants.


== Download Source ==
== Download Source ==
Line 138: Line 143:


Create a directory, outside of the source directory, to hold the compilation
Create a directory, outside of the source directory, to hold the compilation
* <code> mkdir TubeTK-Release </code>
* <code> mkdir TubeTK-Release</code>
* <code> cd TubeTK-Release </code>
* <code> cd TubeTK-Release</code>


Within that compilation directory, run cmake and point it to where the source is located
Within that compilation directory, run cmake and point it to where the source is located
* <code> cmake ../TubeTK </code>
* <code> cmake ../TubeTK</code>
 
Set the following CMake variables
* Build_TYPE = <same build type as Slicer installation: Debug or Release>
* TubeTK_USE_SLICER = On
* Slicer_DIR = <Path to your Slicer build directory>


== Build ==
== Build ==
Line 166: Line 166:
* <code> cd $HOME/TubeTK-Release/TubeTK-build </code>
* <code> cd $HOME/TubeTK-Release/TubeTK-build </code>
* <code> make </code>
* <code> make </code>
= Build Using Slicer =




[[Category:TubeTK|Build Instructions]]
[[Category:TubeTK|Build Instructions]]

Revision as of 15:24, 13 March 2015

Slicer-dependent build

This is the recommended build process.

It uses a compiled version of Slicer to provide its dependencies.

In this build format,

  1. TubeTK produces a set of libraries and command-line programs that can be used to process images from the command line and to build other applications.
  2. TubeTK methods are available from within the Slicer application against which it is built.

This build format is tested nightly on Windows, OS X, and Linux machines.

This build format has the following steps:

  • Install requirements and options
  • Download source
  • Configure using CMake
  • Build

Install Requirements and Options

Slicer

  • If you are building the Stand-Alone version of TubeTK, you do not need to build Slicer.

Oddities

Boost

Download and build Boost:

Oddities

  • Linux: TubeTK creates dynamic libraries that have static links to Boost libraries. Since Boost static libraries on Linux are not compiled with fPIC, you must compile Boost from source to use it with TubeTK.
    • ./bootstrap.sh
    • ./bjam -j14
    • ./bjam cxxflags=-fPIC cflags=-fPIC -a link=static -j14

Download Source

Download the source via git

Configure

Create a directory, outside of the source directory, to hold the compilation

  • mkdir TubeTK-Release
  • cd TubeTK-Release

Within that compilation directory, run cmake and point it to where the source is located

  • cmake ../TubeTK

Set the following CMake variables

  • Build_TYPE = <same build type as Slicer installation: Debug or Release>
  • TubeTK_USE_SLICER = On
  • Slicer_DIR = <Path to your Slicer build directory>

Build

Windows

Load the TubeTK solution file in Visual Studio

  • Select File -> Open -> Project/Solution -> open TubeTK-Release/TubeTK.sln
    • Perform the initial build using your compiler at the top-level of TubeTK-Release. This will update and build the libraries that TubeTK depends on (ex. VTK, ITK), and then build TubeTK.
  • Right click on the "ALL_BUILD" project and select "Build".
    • Subsequent builds should be initiated in the subdir TubeTK-Release/TubeTK-build to save time. This will build TubeTK only. You may have to periodically build from the top-level of TubeTK-Release to get updates to the libraries that TubeTK depends on.
      • Right click on the "TubeTK" project and select "Build".

Linux and OS X

Perform the initial build using your compiler at the top-level of TubeTK-Release. This will update and build the libraries that TubeTK depends on (ex. VTK, ITK), and then build TubeTK.

  • cd $HOME/TubeTK-Release
  • make

Subsequent builds should be initiated in the subdir TubeTK-Release/TubeTK-build to save time. This will build TubeTK only. You may have to periodically build from the top-level of TubeTK-Release to get updates to the libraries that TubeTK depends on.

  • cd $HOME/TubeTK-Release/TubeTK-build
  • make

Stand-Alone

In this build format, TubeTK produces a set of libraries and command-line programs that can be used to process images from the command line and to build other applications.

This build format is tested nightly on Windows, OS X, and Linux machines.

This build format has the following steps:

  • Install requirements and options
  • Download source
  • Configure using CMake
  • Build

Install Requirements and Options

CMake (Requirement)

Install the latest stable release.

GIT (Requirement)

Install the latest stable release.

Qt

Install version 4.8.6

Boost (optional)

Download and build Boost:

Oddities

  • Linux: TubeTK creates dynamic libraries that have static links to Boost libraries. Since Boost static libraries on Linux are not compiled with fPIC, you must compile Boost from source to use it with TubeTK.
    • ./bootstrap.sh
    • ./bjam -j14
    • ./bjam cxxflags=-fPIC cflags=-fPIC -a link=static -j14

Python (optional)

Versions 2.7.x is supported at this time.

Download and install per system instructions at:

Download Source

Download the source via git

Configure

Create a directory, outside of the source directory, to hold the compilation

  • mkdir TubeTK-Release
  • cd TubeTK-Release

Within that compilation directory, run cmake and point it to where the source is located

  • cmake ../TubeTK

Build

Windows

Load the TubeTK solution file in Visual Studio

  • Select File -> Open -> Project/Solution -> open TubeTK-Release/TubeTK.sln
    • Perform the initial build using your compiler at the top-level of TubeTK-Release. This will update and build the libraries that TubeTK depends on (ex. VTK, ITK), and then build TubeTK.
  • Right click on the "ALL_BUILD" project and select "Build".
    • Subsequent builds should be initiated in the subdir TubeTK-Release/TubeTK-build to save time. This will build TubeTK only. You may have to periodically build from the top-level of TubeTK-Release to get updates to the libraries that TubeTK depends on.
      • Right click on the "TubeTK" project and select "Build".

Linux and OS X

Perform the initial build using your compiler at the top-level of TubeTK-Release. This will update and build the libraries that TubeTK depends on (ex. VTK, ITK), and then build TubeTK.

  • cd $HOME/TubeTK-Release
  • make

Subsequent builds should be initiated in the subdir TubeTK-Release/TubeTK-build to save time. This will build TubeTK only. You may have to periodically build from the top-level of TubeTK-Release to get updates to the libraries that TubeTK depends on.

  • cd $HOME/TubeTK-Release/TubeTK-build
  • make