Hi all,
I am trying to build the most recent Slicer from github on a freshly installed Ubuntu 18.04 and I am getting the following error:
error: [/home/satya/wrk/Slicer/build/Slicer-build/bin/./SlicerApp-real] exit abnormally - Report the problem.
To debug with gdb, I used an exec-wrapper but I got the following error:
(gdb) set exec-wrapper ./WrapSlicer4
(gdb) exec-file ./bin/SlicerApp-real
(gdb) run
Starting program: /home/satya/wrk/Slicer/build/Slicer-build/bin/SlicerApp-real
[Thread debugging using libthread_db enabled]
Using host libthread_db library “/lib/x86_64-linux-gnu/libthread_db.so.1”.
[New Thread 0x7fffad95e700 (LWP 3618)]
[New Thread 0x7fffa4fc4700 (LWP 3619)]
[New Thread 0x7fff9ffff700 (LWP 3620)]
[New Thread 0x7fff9c87a700 (LWP 3621)]
[New Thread 0x7fff97d5c700 (LWP 3622)]
Thread 1 “SlicerApp-real” received signal SIGSEGV, Segmentation fault.
__strcmp_ssse3 () at …/sysdeps/x86_64/multiarch/…/strcmp.S:173
173 …/sysdeps/x86_64/multiarch/…/strcmp.S: No such file or directory.
(gdb)
[3]+ Stopped gdb
Here are the steps I followed to build Slicer:
sudo apt install qtcreator qtdeclarative5-dev qtmultimedia5-dev qtbase5-private-dev libqt5xmlpatterns5-dev libqt5svg5-dev libqt5webenginewidgets5 qtwebengine5-dev qtscript5-dev qttools5-dev libxt-dev libqt5x11extras5-dev
sudo apt install git cmake
git clone --recursive https://github.com/Slicer/Slicer.git
cd Slicer
mkdir build
cd build
cmake -DQt5_DIR=/usr/lib/qt5 -DCMAKE_BUILD_TYPE:STRING=Debug -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF -DSlicer_USE_SimpleITK:BOOL=OFF -DSlicer_USE_QtTesting:BOOL=OFF -DSlicer_BUILD_DataStore:BOOL=OFF -DSlicer_USE_SYSTEM_QT:BOOL=1 …/
make
During make, I got some errors in LibArchive and fixed them with the instructions provided here: https://github.com/libarchive/libarchive/commit/4925fd0ba817764f30b3d6837820351c3bd556d4
The contents of WrapSlicer4:
#!/bin/bash
BASE_DIR=/home/satya/wrk/Slicer/build
APPLAUNCHER_DIR=$BASE_DIR/Slicer-build
LD_PATHS="
$BASE_DIR/VTK-build/bin/
$BASE_DIR/CTK-build/CTK-build/bin/
/usr/lib
$BASE_DIR/ITK-build/bin/
$BASE_DIR/SlicerExecutionModel-build/ModuleDescriptionParser/bin/
$BASE_DIR/teem-build/bin/
$BASE_DIR/LibArchive-install/lib
$APPLAUNCHER_DIR/bin/
$APPLAUNCHER_DIR/lib/Slicer-4.11/qt-loadable-modules
$APPLAUNCHER_DIR/lib/Slicer-4.11/cli-modules/
$APPLAUNCHER_DIR/lib/Slicer-4.11/qt-loadable-modules/
$BASE_DIR/tcl-build/lib
$BASE_DIR/OpenIGTLink-build
$BASE_DIR/OpenIGTLink-build/bin/
$BASE_DIR/CTK-build/PythonQt-build/
$BASE_DIR/python-build/lib
$BASE_DIR/python-build/lib/python2.7/site-packages/numpy/core
$BASE_DIR/python-build/lib/python2.7/site-packages/numpy/lib
"
for STR in LD_PATHS; do LD_LIBRARY_PATH="{STR}:${LD_LIBRARY_PATH}"; done
echo $LD_LIBRARY_PATH
QT_PLUGIN_PATH=$APPLAUNCHER_DIR/bin:$BASE_DIR/CTK-build/CTK-build/bin:/usr/lib/qt4/plugins
SLICER_HOME=$BASE_DIR/Slicer-build
PYTHONHOME=$BASE_DIR/python-build
PYTHONPATH=$APPLAUNCHER_DIR:/bin:$APPLAUNCHER_DIR:/bin/Python:$BASE_DIR/python-build/lib/python2.7/site-packages:$APPLAUNCHER_DIR/lib/Slicer-4.0/qt-loadable-modules/.:$APPLAUNCHER_DIR/lib/Slicer-4.0/qt-loadable-modules/Python
TCL_LIBRARY=$BASE_DIR/tcl-build/lib/tcl8.4
TK_LIBRARY=$BASE_DIR/tcl-build/lib/tk8.4
TCLLIBPATH=$BASE_DIR/tcl-build/lib/itcl3.2:$BASE_DIR/tcl-build/lib/itk3.2
export QTPLUGIN_PATH=$QT_PLUGIN_PATH
export SLICER_HOME=$SLICER_HOME
export PYTHONHOME=$PYTHONHOME
export PYTHONPATH=$PYTHONPATH
export TCL_LIBRARY=$TCL_LIBRARY
export TK_LIBRARY=$TK_LIBRARY
export TCLLIBPATH=$TCLLIBPATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
exec “$@”
What should I do next? Thank you!
Satya