View Issue Details

IDProjectCategoryView StatusLast Update
0004554Slicer4Core: Packagingpublic2018-05-23 11:10
ReportercquammenAssigned Tojcfr 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product VersionSlicer 4.9.0 
Target VersionSlicer 4.9.0Fixed in VersionSlicer 4.9.0 
Summary0004554: rpath not set for macOS binaries in 4.9.0
Description

Running a Python script with SlicerPython on macOS, I run into this error:

Traceback (most recent call last):
  File "HelloWorld.py", line 1, in <module>
    import vtk
  File "/Applications/Slicer.app/Contents/bin/Python/vtk.py", line 12, in <module>
    all_m = importlib.import_module('vtkmodules.all')
  File "/Applications/Slicer.app/Contents/lib/Python/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/Applications/Slicer.app/Contents/bin/Python/vtkmodules/all.py", line 34, in <module>
    from .vtkRenderingQt import *
  File "/Applications/Slicer.app/Contents/bin/Python/vtkmodules/vtkRenderingQt.py", line 9, in <module>
    from vtkRenderingQtPython import *
ImportError: dlopen(/Applications/Slicer.app/Contents/lib/Slicer-4.9/vtkRenderingQtPython.so, 2): Library not loaded: @rpath/Frameworks/QtWidgets.framework/Versions/5/QtWidgets
  Referenced from: /Applications/Slicer.app/Contents/lib/Slicer-4.9/libvtkRenderingQt-9.0.1.dylib
  Reason: image not found

This can be fixed by first applying the fix in https://issues.slicer.org/view.php?id=4553 and then running the following:

install_name_tool -add_rpath "@executable_path/.." /Applications/Slicer.app/Contents/bin/python-real

Perhaps this step should be added to the packaging process on macOS.

TagsNo tags attached.

Relationships

related to 0003831 closedjcfr Add rpath to all executable bundled in Slicer.app/Contents/bin 
related to 0003827 closedjcfr library paths incorrect on mac install package - can't run dicom executables 
related to 0004556 closedjcfr PYTHONPATH in SlicerPythonLauncherSettings.ini needs additional paths to import vtk in SlicerPython 
related to 0004553 closedjcfr SlicerPython does not launch with packaged SlicerPythonLauncherSettings.ini configuration 

Activities

jcfr

jcfr

2018-05-23 05:27

administrator   ~0015728

Corresponding fix integrated in r27199
See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=27199

cquammen

cquammen

2018-05-23 11:04

developer   ~0015730

I have confirmed that this is now fixed on macOS.

Issue History

Date Modified Username Field Change
2018-05-15 10:19 cquammen New Issue
2018-05-15 10:19 cquammen Status new => assigned
2018-05-15 10:19 cquammen Assigned To => jcfr
2018-05-23 04:13 jcfr Relationship added related to 0004553
2018-05-23 04:15 jcfr Description Updated View Revisions
2018-05-23 04:30 jcfr Relationship added related to 0003831
2018-05-23 04:30 jcfr Relationship added related to 0003827
2018-05-23 05:24 jcfr Relationship added related to 0004556
2018-05-23 05:27 jcfr Status assigned => resolved
2018-05-23 05:27 jcfr Resolution open => fixed
2018-05-23 05:27 jcfr Fixed in Version => Slicer 4.9.0
2018-05-23 05:27 jcfr Note Added: 0015728
2018-05-23 11:04 cquammen Note Added: 0015730
2018-05-23 11:10 jcfr Status resolved => closed