View Issue Details

IDProjectCategoryView StatusLast Update
0003189Slicer4Core: Building (CMake, Superbuild)public2017-06-07 23:27
Reporterpieper Assigned Tojcfr  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformMACOSOS Version
Product Version 
Target VersionSlicer 4.4.0Fixed in VersionSlicer 4.3.1 
Summary0003189: libarchive installed as symlink breaks Slicer.app in build tree
Description

On a standard slicer build on mac, both the launcher (Slicer-build/Slicer) and the app (Slicer-build/bin/Slicer.app) are available, but only the launcher works. Usually this is okay, but to use Xcode for debugging the .app version is required.

When you try to run the .app version, you get this error:

Dyld Error Message:
Library not loaded: libarchive.12.dylib
Referenced from: /Users/USER/*/Slicer.app/Contents/MacOS/Slicer
Reason: image not found

otool reveals that there is no path provided for libarchive.12.dylib:

0000041 Slicer-superbuild $ otool -L ./Slicer-build/bin/Slicer.app/Contents/MacOS/Slicer | grep archive
libarchive.12.dylib (compatibility version 12.0.0, current version 0.0.0)

This probably happens because even though the full path to libarchive.dylib is provided on the link line, the path points to a relative libarchive.12.dylib :

0000037 Slicer-superbuild $ ls -l /Users/pieper/slicer4/latest/Slicer-superbuild/LibArchive-install/lib/libarchive.dylib
lrwxr-xr-x 1 pieper staff 19 Jun 23 19:17 /Users/pieper/slicer4/latest/Slicer-superbuild/LibArchive-install/lib/libarchive.dylib@ -> libarchive.12.dylib

A solution is to remove the SOVERSION property from the archive build step.
See:

http://cmake.org/cmake/help/v2.8.11/cmake.html#prop_tgt:SOVERSION

TagsNo tags attached.

Relationships

has duplicate 0003212 closedmillerjv Model Maker CLI Crashes 

Activities

jcfr

jcfr

2013-07-10 09:34

administrator   ~0008986

Hint for developer: This is explained by the fact Slicer is linked against an install tree of LibArchive. The library living in the installed tree of LibArchive has rpath information stripped. Ones should investigate if Slicer could be linked against a library and headers living in a build tree.

jcfr

jcfr

2013-09-16 20:24

administrator   ~0009958

Fix pushed on my fork. See https://github.com/jcfr/Slicer/tree/3189-associate-libarchive-with-rpath

Please test if this fix the problem. Thanks

jcfr

jcfr

2013-09-18 08:20

administrator   ~0010007

Fixed in r22455
See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=22455

pieper

pieper

2013-10-07 08:20

administrator   ~0010149

Works!

jcfr

jcfr

2017-06-07 23:27

administrator   ~0014585

Fix committed to 2145-support-for-installing-extension-from-file branch.

Related Changesets

Slicer: 2145-support-for-installing-extension-from-file a655167b

2013-09-18 12:19:17

jcfr

Details Diff
COMP: Fix launch of Slicer-real on MacOSX adding rpath to libarchive

Fixes 0003189

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22455 3bd1e089-480b-0410-8dfb-8563597acbee
mod - SuperBuild/External_LibArchive.cmake Diff File

Issue History

Date Modified Username Field Change
2013-06-24 06:16 pieper New Issue
2013-06-24 06:16 pieper Status new => assigned
2013-06-24 06:16 pieper Assigned To => jcfr
2013-07-10 09:30 jcfr Target Version => Slicer 4.3.0
2013-07-10 09:34 jcfr Note Added: 0008986
2013-07-10 09:34 jcfr Target Version Slicer 4.3.0 => Slicer 4.4.0
2013-08-27 11:48 pieper Relationship added has duplicate 0003212
2013-09-16 20:24 jcfr Note Added: 0009958
2013-09-16 20:24 jcfr Status assigned => feedback
2013-09-18 08:20 jcfr Note Added: 0010007
2013-09-18 08:20 jcfr Status feedback => resolved
2013-09-18 08:20 jcfr Fixed in Version => Slicer 4.3.1
2013-09-18 08:20 jcfr Resolution open => fixed
2013-10-07 08:20 pieper Note Added: 0010149
2013-10-07 08:20 pieper Status resolved => closed
2017-06-07 23:27 jcfr Changeset attached => Slicer 2145-support-for-installing-extension-from-file a655167b
2017-06-07 23:27 jcfr Note Added: 0014585