Hello,

Compiling Ruby with "--enable-load-relative" sets the binary to link to
relative lib paths. Note the `@executable_path` below:

$ otool -L /Applications/Vagrant/embedded/bin/ruby
/Applications/Vagrant/embedded/bin/ruby:
  @executable_path/../lib/libruby.1.9.1.dylib (compatibility version
1.9.1, current version 1.9.1)
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 159.1.0)
  /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version
228.0.0)

This allows me to move around the entire installation folder without
links breaking. Unfortunately, it appears this doesn't happen with
libyaml on the Psych bundle. Notice below that libruby is linked to with
@executable_path but libyaml is still linked with an absolute path.

$ otool -L
/Applications/Vagrant/embedded/lib/ruby/1.9.1/universal-darwin11.2.0/psych.bundle
/Applications/Vagrant/embedded/lib/ruby/1.9.1/universal-darwin11.2.0/psych.bundle:
  @executable_path/../lib/libruby.1.9.1.dylib (compatibility version
1.9.1, current version 1.9.1)
  /tmp/vagrant-temp/embedded/lib/libyaml-0.2.dylib (compatibility
version 3.0.0, current version 3.2.0)
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 159.1.0)
  /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version
228.0.0)

While compiling Ruby, is there a way to specify to Psych to use a
relative @executable_path as well?

Mitchell

-- 
Posted via http://www.ruby-forum.com/.