RubyCocoa and libxml-ruby-0.3.6

J

John N. Alegre

Daniel said:
They accepted the port. You may now install ruby-libxml with "port
install rb-libxml2" (don't forget to sync, or selfupdate).
Did you tell them to include this in the dependencies for RubyCocoa?

john
 
U

Une bévue

Daniel Harple said:
They accepted the port. You may now install ruby-libxml with "port
install rb-libxml2" (don't forget to sync, or selfupdate).

ok thanks very much.

no prob if i've allready installed ruby-libxml "by hand" ?
 
D

Daniel Harple

ok thanks very much.

no prob if i've allready installed ruby-libxml "by hand" ?

Maybe, did you install using DP ruby? If DP complains remove /opt/=20
local/lib/ruby/vendor_ruby/1.8/powerpc-darwin*/xml/.

I would also suggest getting rid of your /usr/local ruby. Less =20
versions, less complexity. Make sure /opt/local/bin is in your PATH =20
before /usr/bin so you never use the Apple supplied ruby again.

Did you tell them to include this in the dependencies for RubyCocoa?

RubyCocoa does not depend on libxml, so it should not be a dependency.


-- Daniel=
 
U

Une bévue

Daniel Harple said:
Maybe, did you install using DP ruby?

yes, it appears first in my PATH.
which ruby gives the SAME ruby now under :

RubyCocoa/XCode
Terminal
TextMate

i'm really happy about that.
If DP complains remove /opt/
local/lib/ruby/vendor_ruby/1.8/powerpc-darwin*/xml/.

I would also suggest getting rid of your /usr/local ruby. Less
versions, less complexity.

right i'll rm -rf this stuff...
Make sure /opt/local/bin is in your PATH
before /usr/bin so you never use the Apple supplied ruby again.

no prob, verfied yet

Apart from that, i can't install ruby-libxml at this time because i
can't sunc or selfupdate any more (i think my network connection is slow
right now).

here is my trial :
sudo port sync
Error: /opt/local/bin/port: port sync failed: sync failed doing rsync
sudo port selfupdate
Error: /opt/local/bin/port: selfupdate failed: Couldnt sync dports tree:
sync failed doing rsync
 
D

Daniel Harple

Apart from that, i can't install ruby-libxml at this time because i
can't sunc or selfupdate any more (i think my network connection is =20=
slow
right now).

The latest Apple security update broke rsync. Do a port install rsync =20=

or:
remove /opt/local/var/db/dports/sources/=20
rsync.rsync.darwinports.org_dpupdate_dports/ and sync.
right i'll rm -rf this stuff...

You can also pass the -f (force) flag to DP when you install:
port -f install ...

-- Daniel=
 
U

Une bévue

Daniel Harple said:
The latest Apple security update broke rsync. Do a port install rsync
or:
remove /opt/local/var/db/dports/sources/
rsync.rsync.darwinports.org_dpupdate_dports/ and sync.

ok done that works right now
You can also pass the -f (force) flag to DP when you install:
port -f install ...

i'm doing :
sudo port install rb-libxml2

i've seen that dp install first another libxml2

ok job finished i did a small test, seems to be ok.

i have to say something about my previous libxml2 install (i've
installed it because i didn't know it's standard on Tiger).

i had used the combo bersion (1 or 2 monthes ago) :
GnomeLibXmlCombo-2005-11-06

giving :
libexslt.framework
libxml.framework
libxslt.framework
xmllint
xsltproc

the frameworks are installed in /Library/Frameworks

i've repackaged this afternoon a RubyCocoa app making use of
ruby-libxml.

that works on my computer however a tester had a crash with this message
:

dyld: Library not loaded: @executable_path/../Frameworks/
libxml.framework/Versions/2.6.22/libxml


this that means, the version of libxml2 i had, before reinstalling
everything using dp, was linked to this libxml2-combo version ?

and now, with the newest libxml2 installed by dp, would one of my
testers have the same kind of prob ?
 
D

Daniel Harple

i have to say something about my previous libxml2 install (i've
installed it because i didn't know it's standard on Tiger).

i had used the combo bersion (1 or 2 monthes ago) :
GnomeLibXmlCombo-2005-11-06

giving :
libexslt.framework
libxml.framework
libxslt.framework
xmllint
xsltproc

the frameworks are installed in /Library/Frameworks

i've repackaged this afternoon a RubyCocoa app making use of
ruby-libxml.

that works on my computer however a tester had a crash with this =20
message
:

dyld: Library not loaded: @executable_path/../Frameworks/
libxml.framework/Versions/2.6.22/libxml


this that means, the version of libxml2 i had, before reinstalling
everything using dp, was linked to this libxml2-combo version ?

and now, with the newest libxml2 installed by dp, would one of my
testers have the same kind of prob ?

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/=20
xml/libxml.bundle
/opt/local/lib/ruby/vendor_ruby/1.8/powerpc-darwin8.3.0/xml/=20
libxml.bundle:
/opt/local/lib/libruby.dylib (compatibility version 1.8.0, =20
current version 1.8.4)
/opt/local/lib/libxml2.2.dylib (compatibility version 9.0.0, =20=

current version 9.22.0)
/opt/local/lib/libiconv.2.dylib (compatibility version =20
6.0.0, current version 6.0.0)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, =20
current version 1.2.3)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, =20
current version 88.1.5)
/opt/local/lib/libdl.1.dylib (compatibility version 1.0.0, =20
current version 1.0.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, =20
current version 227.0.0)
/usr/lib/libmx.A.dylib (compatibility version 1.0.0, current =20=

version 92.0.0)

You can change these using the install_name_tool. So when you package =20=

your app, you would do:

$ install_name_tool -change /opt/local/lib/libxml2.2.dylib /usr/lib/=20
libxml2.2.dylib MyRubyApp.app/Contents/Frameworks/libxml.bundle

And now the packaged ruby-libxml depends on the Apple supplied =20
libxml2 (change the other ones, too). If for some reason you wanted =20
to package DP libxml2 (I don't recommend it):

$ install_name_tool -change /opt/local/lib/libxml2.2.dylib =20
@executable_path/../Frameworks/libxml2.2.dylib MyRubyApp.app/Contents/=20=

Frameworks/libxml.bundle
where you copy the DP libxml2 to your application bundle.

I haven't really used ruby cocoa much, you may want to check what =20
RubyApp.app/Contents/MacOS/whatever depends on (using otool -L again) =20=

just to be sure you aren't depending on anything in /opt/local, =20
because base Mac OS X install will not have those.

-- Daniel=
 
U

Une bévue

Daniel Harple said:
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 :
/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
If for some reason you wanted to package DP libxml2 (I don't recommend
it):

$ install_name_tool -change /opt/local/lib/libxml2.2.dylib
@executable_path/../Frameworks/libxml2.2.dylib MyRubyApp.app/Contents/
Frameworks/libxml.bundle where you copy the DP libxml2 to your application
bundle.

I haven't really used ruby cocoa much, you may want to check what
RubyApp.app/Contents/MacOS/whatever depends on (using otool -L again) just
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 ))
/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 :
/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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top