View Issue Details

IDProjectCategoryView StatusLast Update
0003574Slicer4Core: Building (CMake, Superbuild)public2018-03-02 11:02
ReporterrorAssigned Tojcfr 
Status closedResolutionfixed 
Product VersionSlicer 4.3.1-2 
Target VersionFixed in VersionSlicer 4.7.0 
Summary0003574: Building against system QT without specifying Slicer_USE_SYSTEM_QT

When building against system qt libraries the variable Slicer_USE_SYSTEM_QT should be set to 1. Otherwise, the Slicer path and library_path variables will include the system path corresponding to the system QT and this causes Slicer to link against the wrong libraries.

TagsNo tags attached.


has duplicate 0003634 closedjcfr Slicer crashes on startup. undefined symbol: PyUnicodeUCS2_DecodeUTF8 




2014-01-31 11:39

administrator   ~0010549

As a workaround, few options:
(1) configure passing -DSlicer_USE_SYSTEM_QT:BOOL=1

(2) in Slicer-build/SlicerLauncherSettings.ini, you could remove the entry in [Paths] and [LibraryPaths] that points to system paths (/usr/lib64, /bin)

The problem is that the find_package(Qt ..) is finding Qt on the system and that the variable Slicer_USE_SYSTEM_QT is not set based on where Qt was found. As a consequence, the launcher setting include system locations .. and when Slicer is started .. it resolves its symbols against the wrong python library. See [1]


The error was

// --------------------------
Traceback (most recent call last):
File "<string>", line 7, in <module>
File "/tmp/Slicer-test/Slicer-build/bin/Python/slicer/",
line 1, in <module>
import vtk, qt, ctk
File "/tmp/Slicer-test/VTK-build/Wrapping/Python/vtk/",
line 70, in <module>
'vtkVolumeRenderingPython', exc)
File "/tmp/Slicer-test/VTK-build/Wrapping/Python/vtk/",
line 32, in refine_import_err
raise LinkError, str(exc)
/tmp/Slicer-test/VTK-build/bin/./ undefined
symbol: PyUnicodeUCS2_DecodeUTF8
Traceback (most recent call last):
File "<string>", line 7, in <module>
line 41, in <module>
slicer.sliceWidgets = {}
NameError: name 'slicer' is not defined
/tmp/Slicer-test/VTK-build/bin/./ undefined
symbol: PyUnicodeUCS2_DecodeUTF8
/tmp/Slicer-test/VTK-build/bin/./ undefined
symbol: PyUnicodeUCS2_DecodeUTF8
/tmp/Slicer-test/VTK-build/bin/./ undefined
symbol: PyUnicodeUCS2_DecodeUTF8
// ------------------------------



2017-05-02 14:57

developer   ~0014472

configure passing -DSlicer_USE_SYSTEM_QT:BOOL=1

Solved the following problem:

dyld: Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /usr/local/lib/libJPEG.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
error: [/Users/shusildangi/Slicer/Slicer-Build/Slicer-build/bin/] exit abnormally - Report the problem.



2017-08-03 14:31

administrator   ~0015006

Fixed in r26193
See and

Issue History

Date Modified Username Field Change
2014-01-31 11:28 ror New Issue
2014-01-31 11:28 ror Status new => assigned
2014-01-31 11:28 ror Assigned To => jcfr
2014-01-31 11:31 jcfr Target Version => Slicer 4.4.0
2014-01-31 11:39 jcfr Note Added: 0010549
2014-03-06 10:58 jcfr Status assigned => acknowledged
2014-03-06 10:59 jcfr Target Version Slicer 4.4.0 => Slicer 4.5.0-1
2014-03-06 11:00 jcfr Target Version Slicer 4.5.0-1 =>
2014-03-28 09:59 jcfr Relationship added has duplicate 0003634
2017-05-02 14:57 Shusil Note Added: 0014472
2017-08-03 14:31 jcfr Status acknowledged => resolved
2017-08-03 14:31 jcfr Resolution open => fixed
2017-08-03 14:31 jcfr Fixed in Version => Slicer 4.7.0
2017-08-03 14:31 jcfr Note Added: 0015006
2018-03-02 11:02 jcfr Status resolved => closed