Closed jcfr closed 1 year ago
Inspecting the dependencies associated with the packaged libtiff
, the zstd
dependencies should be explicitly disabled.
$ otool -L _CPack_Packages/Darwin/TGZ/31807-macosx-amd64-SlicerAutoscoperM-git0172c84-2023-06-23/Slicer.app/Contents/Extensions-31807/SlicerAutoscoperM/lib/Slicer-5.3/libtiff.5.8.0.dylib
_CPack_Packages/Darwin/TGZ/31807-macosx-amd64-SlicerAutoscoperM-git0172c84-2023-06-23/Slicer.app/Contents/Extensions-31807/SlicerAutoscoperM/lib/Slicer-5.3/libtiff.5.8.0.dylib:
@rpath/Extensions-31807/SlicerAutoscoperM/lib/Slicer-5.3/libtiff.5.8.0.dylib (compatibility version 5.0.0, current version 5.8.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
/usr/local/opt/zstd/lib/libzstd.1.dylib (compatibility version 1.0.0, current version 1.5.2)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)
Local testing confirmed the extension can be built and packages on Linux, macOS and Windows :heavy_check_mark:
Summary
On macOS, build Autoscoper with:
Build Autoscoper as a regular executable on macOS so that it is build and packaged in a "standard" location without the
autoscoper.app
folder.On macOS, set
Autoscoper_INSTALL_DEPENDENCIES
set to OFF. Associated dependencies are copied into the package leveraging the fix-up process.Add Autoscoper external project step to change back
@rpath
references into the corresponding build-tree absolute paths. This ensures that the fix-up process can lookup each library and executable dependencies.Ensure the autoscoper executable can resolve its dependency setting
Autoscoper_EXECUTABLE_LINK_FLAGS
to${Slicer_INSTALL_THIRDPARTY_EXECUTABLE_LINK_FLAGS}
.Slicer_INSTALL_THIRDPARTY_EXECUTABLE_LINK_FLAGS
is itself set to a value similar to-Wl,-rpath,@loader_path/relative/path/"
.. and also increases the wait time before attempting to connect to the
autoscoper
process.List of Autoscoper changes