Slicer:Debian

From Slicer Wiki
Jump to: navigation, search
Home < Slicer:Debian

Intro

Instructions how to build Slicer from scratch on Debian systems

Debian 8 "jessie"

Debian 8 "jessie" contains all tools to compile 3D Slicer.

It is easier to compile Slicer against the system Qt libraries. This saves about 30 minutes compile time.


3D Slicer 4.5 (Nov 2015)

sudo aptitude update

Install build dependencies:

sudo aptitude install git-svn gitk subversion git gcc g++ make cmake-curses-gui libglu1-mesa-dev zlib1g-dev libxt-dev libqt4-dev

Install runtime dependencies:

sudo aptitude install python-tk

Build 3D Slicer 4.5

git clone https://github.com/Slicer/Slicer.git
cd Slicer
git checkout 46a42f4fc # TODO git tag? # this is the Slicer release 4.5.0 from Nov 12 2015
mkdir ../Slicer4-SuperBuild-Debug
cd ../Slicer4-SuperBuild-Debug
cmake ../Slicer -DSlicer_REQUIRED_QT_VERSION:STRING=4.8.6 # if using system QT
cmake ../Slicer -DSlicer_USE_GIT_PROTOCOL:BOOL=0          # optional for firewall issues
make -j8 # takes 30-60 minutes and requires ~14G disk space

Start Slicer via

./Slicer-build/Slicer

You can also use Slicer's command line tools, e.g.

./Slicer-build/lib/Slicer-4.5/cli-modules/CastScalarVolume --help


alternative without system QT

sudo aptitude install libxext-dev libxrender-dev make g++
# download the 'supported' Qt version [[Documentation/4.5/Developers/Build_Instructions/Prerequisites/Qt]

|wget http://download.qt.io/archive/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz

tar xvfz qt-everywhere-opensource-src-4.8.6.tar.gz
mkdir qt-everywhere-opensource-build-4.8.6
cd qt-everywhere-opensource-src-4.8.6
./configure -prefix ../qt-everywhere-opensource-build-4.8.6 -debug-and-release -opensource -confirm-license -no-qt3support -webkit -nomake examples -nomake demos
make -j8
make install
cmake -DQT_QMAKE_EXECUTABLE:FILEPATH=~/qt-everywhere-opensource-build-4.8.6/bin/qmake ../Slicer

Old Dev Notes

sudo aptitude install git-svn gitk subversion git gcc g++ make cmake-curses-gui libglu1-mesa-dev zlib1g-dev libxt-dev #libqt4-dev

git clone https://github.com/Slicer/Slicer.git
cd Slicer
git svn init http://svn.slicer.org/Slicer4/trunk
git update-ref refs/remotes/git-svn refs/remotes/origin/master
git checkout master
git svn rebase
git checkout v4.4.0 # optional: this is a Slicer release 4.4.0 from Nov 02 2014


BUILD BUGS on Ubuntu 14.04=

-- Looking for Q_WS_MAC - not found
-- Found Qt4: /usr/bin/qmake (found version "4.8.6") 
-- Generated: /results/Slicer4-SuperBuild-Debug/CTK-build/DGraphInput-alldep.txt
-- Generated: /results/Slicer4-SuperBuild-Debug/CTK-build/DGraphInput-alldep-withext.txt
-- Enabling option [CTK_LIB_Visualization/VTK/Core]] required by [CTKVisualizationVTKWidgets]
-- Found PythonInterp: /results/Slicer4-SuperBuild-Debug/python-install/bin/SlicerPython (found version "2.7.10") 
-- Could NOT find PythonLibs (missing:  PYTHON_INCLUDE_DIRS) (found version "2.7.10")
CMake Error at CMakeLists.txt:893 (message):
  PYTHON_LIBRARIES and PYTHON_INCLUDE_DIRS should be set to build
  CTK_LIB_Scripting/Python
Can be fixed by reverting a patch in /usr/share/cmake-2.8/Modules/FindPythonLibs.cmake
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735248


Archive

http://slicer.org/slicerWiki/index.php/Slicer3:Debian