Slicer:Debian

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

Intro

Instructions how to build Slicer from scratch on Debian systems

UNDER CONSTRUCTION

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
sudo aptitude install git-svn gitk subversion git gcc g++ make cmake-curses-gui libglu1-mesa-dev zlib1g-dev libxt-dev 
sudo aptitude install libqt4-dev
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


BUILD BUG

-- 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


alternative with system QT

sudo aptitude install libxext-dev libxrender-dev make g++
# download the 'supported' Qt version [1]
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

3D Slicer 4.4 (Nov 2014)

sudo aptitude install libxext-dev libxrender-dev make g++
# download the 'supported' Qt version [2]
wget https://download.qt.io/archive/qt/4.7/qt-everywhere-opensource-src-4.7.4.tar.gz
mkdir qt-everywhere-opensource-build-4.7.4
tar xvfz qt-everywhere-opensource-src-4.7.4.tar.gz
cd qt-everywhere-opensource-src-4.7.4
./configure -prefix ../qt-everywhere-opensource-build-4.7.4 -debug-and-release -opensource -confirm-license -no-qt3support -webkit -nomake examples -nomake demos
make -j8
make install
#cmake 2.8.6 required because of libarchive
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
mkdir ../Slicer4-SuperBuild-Debug
cd ../Slicer4-SuperBuild-Debug
#cmake ../Slicer -DSlicer_REQUIRED_QT_VERSION:STRING=4.8.6 # if using system QT
#cmake -DQT_QMAKE_EXECUTABLE:FILEPATH=~/qt-everywhere-opensource-build-4.7.4/bin/qmake -DITK_VERSION_MAJOR:STRING=4 -DSlicer_USE_GIT_PROTOCOL:BOOL=OFF ../Slicer
cmake -DQT_QMAKE_EXECUTABLE:FILEPATH=~/qt-everywhere-opensource-build-4.7.4/bin/qmake ../Slicer
make -j8
# runtime dependency:
sudo aptitude install python-tk

Usage

Use Slicer's command line tools

/usr/lib/Slicer3/Plugins/AffineRegistration --help

or start Slicer's GUI

slicer3

Archive

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