Build slicer stable release from the source on ArchLinux

Following the build instruction, I could now build 3dslicer 4.11.20200930 from the source in ArchLinux. The PKGBUILD file used to create an ArchLinux package is available here. Here are some tips if you would like to build it from the source.

  1. DO NOT strip, I mean add options=(!strip) to your PKGBUILD file.
  2. use clang as the compiler, I failed to build with gcc. Currently, the latest clang is 10.0.1, and latest gcc 10.2.0 in ArchLinux. Though gcc8 and gcc9 are available in ArchLinux’s official repo too, they will be removed once there are no pkgs depends on them.
  3. I try to system’s libs instead of superbuild, but I have to do dirty hack to help cmake find sqlite, see also this issue.
  4. If I set Slicer_USE_SYSTEM_VTK=ON, then Slicer_USE_SYSTEM_CTKAPPLAUNCHER=ON is set, which is not supported, and lead to cmake configuration error. I can’t figure out why this happen yet. If we could use system’s vtk, then I could save more time building the package.

I failed to build 3dslicer with gcc 10, because I failed to build itk with gcc 10. itk is required by simpleitk, simpleitk is required by 3dslicer. See also related post on itk discourse.

I found that the drop-down menu in Segment Editor (the red rectangle in the snapshot) is not working, but the drop-down menu to switch module (the green rectangle in the snapshot) works.

image

Do node selectors work in other modules (volumes, Models, Transforms, …)? Do all the other buttons and widgets work? Do you see any errors in the log?

No, the node selectors do not work in other modules either.

[DEBUG][Qt] 30.10.2020 15:26:04 [] (unknown:0) - Session start time .......: 2020-10-30 15:26:04
[DEBUG][Qt] 30.10.2020 15:26:04 [] (unknown:0) - Slicer version ...........: 4.11.20200930-2020-09-30 (revision 29402 / 002be18) linux-amd64 - installed release
[DEBUG][Qt] 30.10.2020 15:26:04 [] (unknown:0) - Operating system .........: Linux / 5.4.72-1-lts / #1 SMP Sat, 17 Oct 2020 13:30:57 +0000 - 64-bit
[DEBUG][Qt] 30.10.2020 15:26:04 [] (unknown:0) - Memory ...................: 15791 MB physical, 0 MB virtual
[DEBUG][Qt] 30.10.2020 15:26:04 [] (unknown:0) - CPU ......................: GenuineIntel Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz, 8 cores, 8 logical processors
[DEBUG][Qt] 30.10.2020 15:26:04 [] (unknown:0) - VTK configuration ........: OpenGL2 rendering, Sequential threading
[DEBUG][Qt] 30.10.2020 15:26:04 [] (unknown:0) - Qt configuration .........: version 5.15.1, with SSL, requested OpenGL 3.2 (core profile)
[DEBUG][Qt] 30.10.2020 15:26:04 [] (unknown:0) - Developer mode enabled ...: no
[DEBUG][Qt] 30.10.2020 15:26:04 [] (unknown:0) - Prefer executable CLI ....: yes
[DEBUG][Qt] 30.10.2020 15:26:04 [] (unknown:0) - Application path .........: /opt/3dslicer/bin
[DEBUG][Qt] 30.10.2020 15:26:04 [] (unknown:0) - Additional module paths ..: (none)
[DEBUG][Python] 30.10.2020 15:26:05 [Python] (/opt/3dslicer/lib/Python/lib/python3.6/site-packages/pydicom/datadict.py:432) - Reversing DICOM dictionary so can look up tag from a keyword...
[WARNING][Qt] 30.10.2020 15:26:05 [] (unknown:0) - QXcbConnection: XCB error: 5 (BadAtom), sequence: 594, resource id: 0, major code: 20 (GetProperty), minor code: 0
[DEBUG][Python] 30.10.2020 15:26:06 [Python] (/opt/3dslicer/lib/Slicer-4.11/qt-scripted-modules/SubjectHierarchyPlugins/AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: Annotations
[DEBUG][Python] 30.10.2020 15:26:07 [Python] (/opt/3dslicer/lib/Slicer-4.11/qt-scripted-modules/SubjectHierarchyPlugins/AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentEditor
[DEBUG][Python] 30.10.2020 15:26:07 [Python] (/opt/3dslicer/lib/Slicer-4.11/qt-scripted-modules/SubjectHierarchyPlugins/AbstractScriptedSubjectHierarchyPlugin.py:36) - Scripted subject hierarchy plugin registered: SegmentStatistics
[DEBUG][Qt] 30.10.2020 15:26:07 [] (unknown:0) - Switch to module:  "Welcome"
[DEBUG][Qt] 30.10.2020 15:26:08 [] (unknown:0) - QVTKWidgetPlugin instantiated
[DEBUG][Qt] 30.10.2020 15:26:08 [] (unknown:0) - QVTKWidgetPlugin::name
[DEBUG][Qt] 30.10.2020 15:26:13 [] (unknown:0) - Switch to module:  "DICOM"
[DEBUG][Qt] 30.10.2020 15:26:13 [] (unknown:0) - QVTKWidgetPlugin::name
[INFO][Python] 30.10.2020 15:26:15 [Python] (/opt/3dslicer/bin/../lib/Slicer-4.11/qt-scripted-modules/DICOMScalarVolumePlugin.py:383) - Loading with imageIOName: GDCM
[INFO][Python] 30.10.2020 15:26:16 [Python] (/opt/3dslicer/bin/../lib/Slicer-4.11/qt-scripted-modules/DICOMScalarVolumePlugin.py:457) - Window/level found in DICOM tags (center=1009.0, width=2018.0) has been applied to volume 7: 3D Ax T1 BRAVO+C
[WARNING][Python] 30.10.2020 15:26:16 [Python] (/opt/3dslicer/bin/../lib/Slicer-4.11/qt-scripted-modules/DICOMScalarVolumePlugin.py:787) - Irregular volume geometry detected (maximum error of 0.00204849 mm is above tolerance threshold of 0.001 mm).  Regularization transform is not added, as the option is disabled.
[INFO][Stream] 30.10.2020 15:26:15 [] (unknown:0) - Loading with imageIOName: GDCM
[WARNING][ITK] 30.10.2020 15:26:16 [ImageSeriesReader (0x55b02c8efc40)] (/build/3dslicer/src/build/ITK/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx:480) - Non uniform sampling or missing slices detected,  maximum nonuniformity:7.87061e-05
[INFO][Stream] 30.10.2020 15:26:16 [] (unknown:0) - Window/level found in DICOM tags (center=1009.0, width=2018.0) has been applied to volume 7: 3D Ax T1 BRAVO+C
[CRITICAL][Stream] 30.10.2020 15:26:16 [] (unknown:0) - Irregular volume geometry detected (maximum error of 0.00204849 mm is above tolerance threshold of 0.001 mm).  Regularization transform is not added, as the option is disabled.
[DEBUG][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Switch to module:  "Volumes"
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Assertion `this->Table->columnWidth(j) == newWidth` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  242
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Assertion `this->Table->columnWidth(j) == newWidth` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  242
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Assertion `this->Table->columnWidth(j) == newWidth` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  242
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Assertion `this->Table->columnWidth(j) == newWidth` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  242
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Assertion `this->Table->rowHeight(i) == newHeight` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  253
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Assertion `this->Table->rowHeight(i) == newHeight` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  253
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Assertion `this->Table->rowHeight(i) == newHeight` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  253
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Assertion `this->Table->rowHeight(i) == newHeight` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  253
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Assertion `this->Table->columnWidth(j) == newWidth` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  242
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Assertion `this->Table->columnWidth(j) == newWidth` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  242
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Assertion `this->Table->columnWidth(j) == newWidth` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  242
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Assertion `this->Table->rowHeight(i) == newHeight` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  253
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Assertion `this->Table->rowHeight(i) == newHeight` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  253
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Assertion `this->Table->rowHeight(i) == newHeight` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  253
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Assertion `this->Table->rowHeight(i) == newHeight` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  253
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Assertion `this->Table->columnWidth(j) == newWidth` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  242
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Assertion `this->Table->columnWidth(j) == newWidth` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  242
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Assertion `this->Table->columnWidth(j) == newWidth` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  242
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Assertion `this->Table->rowHeight(i) == newHeight` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  253
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Assertion `this->Table->rowHeight(i) == newHeight` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  253
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - Assertion `this->Table->rowHeight(i) == newHeight` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  253
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - ctkDoubleRangeSlider::setSingleStep( 100 ) is outside of valid bounds.
[WARNING][Qt] 30.10.2020 15:26:33 [] (unknown:0) - ctkRangeWidget::setSingleStep( 100 ) is outside valid bounds
[WARNING][Qt] 30.10.2020 15:26:38 [] (unknown:0) - Assertion `this->Table->rowHeight(i) == newHeight` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  253
[WARNING][Qt] 30.10.2020 15:26:38 [] (unknown:0) - Assertion `this->Table->rowHeight(i) == newHeight` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  253
[WARNING][Qt] 30.10.2020 15:26:38 [] (unknown:0) - Assertion `this->Table->rowHeight(i) == newHeight` failed in  /build/3dslicer/src/build/CTK/Libs/Widgets/ctkMatrixWidget.cpp  line  253
[DEBUG][Qt] 30.10.2020 15:26:59 [] (unknown:0) - Switch to module:  "DICOM"
[DEBUG][Qt] 30.10.2020 15:27:03 [] (unknown:0) - Switch to module:  "Models"

Do all the other buttons and widgets work?

what buttons and widgets do you mean? I only notice the node selectors in Segment Editor do not work at first. And those in volumes, models, transforms module do not work either.