Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.4] COMP: Fix extension packaging on macOS accounting for synthetic firmlink #7182

Conversation

jcfr
Copy link
Member

@jcfr jcfr commented Aug 21, 2023

(cherry picked from commit 858c195)

Since the output of "otool -L" reports paths with synthetic firmlinks
resolved (see GetPrerequisitesWithRPath), we are using the REAL_PATH
file command to also resolve Slicer_SUPERBUILD_DIR and ensure that
the test in "SlicerExtensionCPackBundleFixup.cmake.in" checking if
"${key}_ITEM" is a library built in Slicer itself work as expected.

To illustrate, copied below is the content of the ImageMaker extension
package before/after implementing the fix.

$ pwd
/D/P/S-0-E-b/ImageMaker-build/_CPack_Packages/Darwin/TGZ/32140-macosx-amd64-ImageMaker-git6293f99-2017-07-03/Slicer.app/Contents

Before:

$ find .
.
./Extensions-32140
./Extensions-32140/ImageMaker
./Extensions-32140/ImageMaker/lib
./Extensions-32140/ImageMaker/lib/Slicer-5.5
./Extensions-32140/ImageMaker/lib/Slicer-5.5/cli-modules
./Extensions-32140/ImageMaker/lib/Slicer-5.5/cli-modules/ImageMaker
./Extensions-32140/ImageMaker/lib/Slicer-5.5/cli-modules/libImageMakerLib.dylib
./Extensions-32140/ImageMaker/lib/Slicer-5.5/cli-modules/ImageMaker.xml
./Extensions-32140/ImageMaker/share
./Extensions-32140/ImageMaker/share/Slicer-5.5
./Extensions-32140/ImageMaker/share/Slicer-5.5/ImageMaker.s4ext
./lib
./lib/Slicer-5.5
./lib/Slicer-5.5/libitkopenjpeg-5.3.1.dylib
./lib/Slicer-5.5/libvtkfreetype-9.2.1.dylib
./lib/Slicer-5.5/libITKznz-5.3.1.dylib
./lib/Slicer-5.5/libITKIOJPEG-5.3.1.dylib
[...]
./lib/Slicer-5.5/libvtkglew-9.2.1.dylib
./lib/Slicer-5.5/libITKDeformableMesh-5.3.1.dylib
./lib/Slicer-5.5/libITKTransformFactory-5.3.1.dylib
./lib/Slicer-5.5/libvtkFiltersHybrid-9.2.1.dylib
./lib/Slicer-5.5/libitkhdf5_cpp-shared-5.3.1.dylib

After:

$ find .
.
./Extensions-32140
./Extensions-32140/ImageMaker
./Extensions-32140/ImageMaker/lib
./Extensions-32140/ImageMaker/lib/Slicer-5.5
./Extensions-32140/ImageMaker/lib/Slicer-5.5/cli-modules
./Extensions-32140/ImageMaker/lib/Slicer-5.5/cli-modules/ImageMaker
./Extensions-32140/ImageMaker/lib/Slicer-5.5/cli-modules/libImageMakerLib.dylib
./Extensions-32140/ImageMaker/lib/Slicer-5.5/cli-modules/ImageMaker.xml
./Extensions-32140/ImageMaker/share
./Extensions-32140/ImageMaker/share/Slicer-5.5
./Extensions-32140/ImageMaker/share/Slicer-5.5/ImageMaker.s4ext
@jcfr jcfr merged commit cf13120 into Slicer:5.4 Aug 21, 2023
4 of 5 checks passed
@jcfr jcfr deleted the backports/5.4/fix-packaging-of-extension-on-macos-accounting-for-synthetic-firmlinks branch August 21, 2023 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant