Difference between revisions of "Slicer:Debian"

From Slicer Wiki
Jump to: navigation, search
m (Text replacement - "\[http:\/\/www\.slicer\.org\/slicerWiki\/index\.php\/([^ ]+) ([^]]+)]" to "$2")
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
== Intro ==
+
==Intro==
  
 
Instructions how to build Slicer from scratch on Debian systems
 
Instructions how to build Slicer from scratch on Debian systems
  
= UNDER CONSTRUCTION =
+
==Debian 8 "jessie"==
 
 
== Debian 8 "jessie" ==
 
  
 
Debian 8 "jessie" contains all tools to compile 3D Slicer.
 
Debian 8 "jessie" contains all tools to compile 3D Slicer.
Line 12: Line 10:
  
  
=== 3D Slicer 4.5 (Nov 2015) ===
+
===3D Slicer 4.5 (Nov 2015)===
  
 
  sudo aptitude update
 
  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
 
  
 +
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
 
  git clone https://github.com/Slicer/Slicer.git
 
  cd Slicer
 
  cd Slicer
Line 25: Line 28:
 
  cmake ../Slicer -DSlicer_REQUIRED_QT_VERSION:STRING=4.8.6 # if using system QT
 
  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
 
  cmake ../Slicer -DSlicer_USE_GIT_PROTOCOL:BOOL=0          # optional for firewall issues
  make -j8
+
  make -j8 # takes 30-60 minutes and requires ~14G disk space
  
 +
Start Slicer via
 +
./Slicer-build/Slicer
  
==== BUILD BUG ====
+
You can also use Slicer's command line tools, e.g.
-- Looking for Q_WS_MAC - not found
+
  ./Slicer-build/lib/Slicer-4.5/cli-modules/CastScalarVolume --help
-- 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 ====
+
===alternative without system QT===
 
  sudo aptitude install libxext-dev libxrender-dev make g++
 
  sudo aptitude install libxext-dev libxrender-dev make g++
  # download the 'supported' Qt version [http://www.slicer.org/slicerWiki/index.php/Documentation/4.5/Developers/Build_Instructions/Prerequisites/Qt]
+
  # 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
+
|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
 
  tar xvfz qt-everywhere-opensource-src-4.8.6.tar.gz
 
  mkdir qt-everywhere-opensource-build-4.8.6
 
  mkdir qt-everywhere-opensource-build-4.8.6
Line 54: Line 50:
 
  cmake -DQT_QMAKE_EXECUTABLE:FILEPATH=~/qt-everywhere-opensource-build-4.8.6/bin/qmake ../Slicer
 
  cmake -DQT_QMAKE_EXECUTABLE:FILEPATH=~/qt-everywhere-opensource-build-4.8.6/bin/qmake ../Slicer
  
=== 3D Slicer 4.4 (Nov 2014) ===
+
===Old Dev Notes===
  
sudo aptitude install libxext-dev libxrender-dev make g++
 
# download the 'supported' Qt version [http://www.slicer.org/slicerWiki/index.php/Documentation/4.4/Developers/Build_Instructions/Prerequisites/Qt]
 
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
 
  sudo aptitude install git-svn gitk subversion git gcc g++ make cmake-curses-gui libglu1-mesa-dev zlib1g-dev libxt-dev #libqt4-dev
 
   
 
   
Line 77: Line 62:
 
  git checkout v4.4.0 # optional: this is a Slicer release 4.4.0 from Nov 02 2014
 
  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:
+
===BUILD BUGS on Ubuntu 14.04====
sudo aptitude install python-tk
 
  
==Usage==
+
-- 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
  
Use Slicer's command line tools
+
  Can be fixed by reverting a patch in /usr/share/cmake-2.8/Modules/FindPythonLibs.cmake
  /usr/lib/Slicer3/Plugins/AffineRegistration --help
+
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735248
  
or start Slicer's GUI
 
slicer3
 
  
 
==Archive==
 
==Archive==
  
 
http://slicer.org/slicerWiki/index.php/Slicer3:Debian
 
http://slicer.org/slicerWiki/index.php/Slicer3:Debian

Latest revision as of 02:29, 27 November 2019

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