Daniel H. [email protected] wrote:
libxml-ruby installed from DP will depend and install: * libxml2 * zlib *
libiconv
To verify this, use the otool command.
$ otool -L /opt/local/lib/ruby/vendor_ruby/1.8/powerpc-darwin8.3.0/
xml/libxml.bundle
ok, fine :
otool -L
/opt/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.5.0/xml/libxml.bundle
/opt/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.5.0/xml/libxml.bundle:
/usr/lib/libxslt.1.dylib (compatibility version 3.0.0, current version
3.11.0) /usr/lib/libxml2.2.dylib (compatibility version 9.0.0, current
version 9.16.0) /opt/local/lib/libz.1.dylib (compatibility version
1.0.0, current version 1.2.3) /usr/lib/libSystem.B.dylib (compatibility
version 1.0.0, current version 88.1.5) /opt/local/lib/libiconv.2.dylib
(compatibility version 6.0.0, current version 6.0.0)
/opt/local/lib/libruby.dylib (compatibility version 1.8.0, current
version 1.8.4) /usr/lib/libobjc.A.dylib (compatibility version 1.0.0,
current version 227.0.0)
then some are depending on /usr/lib others /opt/local/lib
with my app i had : > otool -L
/Users/yvon/work/RubyCocoa/BookmarksMerge/dist/BookmarksMerge.app/Conten
ts/lib/xml/libxml.bundle
/Users/yvon/work/RubyCocoa/BookmarksMerge/dist/BookmarksMerge.app/Conten
ts/lib/xml/libxml.bundle: /usr/lib/libxslt.1.dylib (compatibility
version 3.0.0, current version 3.11.0) /usr/lib/libxml2.2.dylib
(compatibility version 9.0.0, current version 9.16.0)
@executable_path/…/lib/libz.1.dylib (compatibility version 1.0.0,
current version 1.2.3) /usr/lib/libSystem.B.dylib (compatibility version
1.0.0, current version 88.1.5) @executable_path/…/lib/libiconv.2.dylib
(compatibility version 6.0.0, current version 6.0.0)
@executable_path/…/lib/libruby.dylib (compatibility version 1.8.0,
current version 1.8.4) /usr/lib/libobjc.A.dylib (compatibility version
1.0.0, current version 227.0.0)
here i see the “@executable_path/…/lib/libz.1.dylib” and libz.1.dylib
is effectively in …/lib, the same applies for libiconv.2.dylib,
libruby.dylib …
You can change these using the install_name_tool. So when you package your
app, you would do:
$ install_name_tool -change /opt/local/lib/libxml2.2.dylib /usr/lib/
libxml2.2.dylib MyRubyApp.app/Contents/Frameworks/libxml.bundle
And now the packaged ruby-libxml depends on the Apple supplied libxml2
(change the other ones, too).
ok, after doing that, for all the dylib being @executable_path, i get :
otool -L
/Users/yvon/work/RubyCocoa/BookmarksMerge/dist/BookmarksMerge.app/Conten
ts/lib/xml/libxml.bundle
/Users/yvon/work/RubyCocoa/BookmarksMerge/dist/BookmarksMerge.app/Conten
ts/lib/xml/libxml.bundle: /usr/lib/libxslt.1.dylib (compatibility
version 3.0.0, current version 3.11.0) /usr/lib/libxml2.2.dylib
(compatibility version 9.0.0, current version 9.16.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version
1.2.3) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 88.1.5) /usr/lib/libiconv.2.dylib (compatibility version 6.0.0,
current version 6.0.0) /usr/lib/libruby.dylib (compatibility version
1.8.0, current version 1.8.4) /usr/lib/libobjc.A.dylib (compatibility
version 1.0.0, current version 227.0.0)
everything being in /usr/lib
to be sure you aren’t depending on anything in /opt/local, because base
Mac OS X install will not have those.
i’ll do that in order to find which bundle is depending of :
@executable_path/…/Frameworks/ libxml.framework/Versions/2.6.22/libxml
ok i’ve seen which one is depending from libxml framework, that’s my
executable itself ))
otool -L
/Users/yvon/work/RubyCocoa/BookmarksMerge/dist/BookmarksMerge.app/Conten
ts/MacOS/BookmarksMerge
/Users/yvon/work/RubyCocoa/BookmarksMerge/dist/BookmarksMerge.app/Conten
ts/MacOS/BookmarksMerge:
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
(compatibility version 1.0.0, current version 11.0.0)
@executable_path/…/Frameworks/RubyCocoa.framework/Versions/A/RubyCocoa
(compatibility version 1.0.0, current version 1.0.0)
@executable_path/…/Frameworks/libxml.framework/Versions/2.6.22/libxml
(compatibility version 1.0.0, current version 1.0.0)
@executable_path/…/Frameworks/libxslt.framework/Versions/1.1.15/libxslt
(compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
88.1.5)
certainly because i’ve let those frameworks (libxml.framework and
libxslt.framework) in my XCode setup.
changing that in xcode, repacking the app gaves :
otool -L
/Users/yvon/work/RubyCocoa/BookmarksMerge/dist/BookmarksMerge.app/Conten
ts/MacOS/BookmarksMerge
/Users/yvon/work/RubyCocoa/BookmarksMerge/dist/BookmarksMerge.app/Conten
ts/MacOS/BookmarksMerge:
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
(compatibility version 1.0.0, current version 11.0.0)
@executable_path/…/Frameworks/RubyCocoa.framework/Versions/A/RubyCocoa
(compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
88.1.5)
which is correct afaik.
thanks a lot for your help. – une bévue