Yaml.h is missing / Failed to configure psych

I’m doing a fresh sandboxed install of Ruby 'n Rails 'n such. The
install is evidently having trouble finding yaml.h (or libyaml) and
building psych. I’m running OSX 10.6.8 (“Snow Leopard”)

Synopsis:

$ # SETTING UP THE ENVIRONMENT
$ SANDBOX=/Users/me/Developer/Sandbox
$ PATH=${SANDBOX}/usr/bin:${PATH}

$ # INSTALL A MODERN READLINE
$ cd …/readline-6.2
$ ./configure --prefix=$SANDBOX/usr
<snip…>
$ make install
<snip…>
$ make clean

$ # INSTALL YAML 0.1.4
$ cd …/yaml-0.1.4
$ ./configure --prefix=$SANDBOX/usr
<snip…>
$ make install
<snip…>
$ make clean

$ # INSTALL RUBY
$ cd …/ruby-1.9.3-p0
$ ./configure --prefix=$SANDBOX/usr
<snip…>
$ make install
<snip…>
configuring psych
yaml.h is missing. Please install libyaml.
Failed to configure psych. It will not be installed.
<snip…>
$ make clean

$ # TRY TO USE GEM
$ gem update --system
$SANDBOX/usr/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>’:
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your
ruby.

===============
Note that YAML did create and install libraries in the sandboxed
directory:

$ ls $SANDBOX/usr/lib
libhistory.6.2.dylib libreadline.6.2.dylib libruby-static.a
libyaml.la ruby
libhistory.6.dylib libreadline.6.dylib libyaml-0.2.dylib perl5
libhistory.a libreadline.a libyaml.a pkgconfig
libhistory.dylib libreadline.dylib libyaml.dylib python2.6

… but it appears that they weren’t found. I did note the following
message during the the YAML make process:

Libraries have been installed in:
/Users/r/Developer/Topaz/usr/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR’
flag during linking and do at least one of the following:

  • add LIBDIR to the `DYLD_LIBRARY_PATH’ environment variable
    during execution

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.

… but IIRC you don’t want to mess with DYLD_LIBRARY_PATH on the Mac.

Any ideas?

  • ff

Fearless F. wrote in post #1034648:

I’m doing a fresh sandboxed install of Ruby 'n Rails 'n such. The
install is evidently having trouble finding yaml.h (or libyaml) and
building psych. I’m running OSX 10.6.8 (“Snow Leopard”)

Synopsis:

$ # INSTALL RUBY
$ cd …/ruby-1.9.3-p0
$ ./configure --prefix=$SANDBOX/usr
<snip…>
$ make install
<snip…>
configuring psych
yaml.h is missing. Please install libyaml.
Failed to configure psych. It will not be installed.
<snip…>

You missed to tell Ruby’s configure to use the $SANDBOX/usr location.

./configure --prefix=$SANDBOX/usr --with-opt-dir=$SANDBOX/usr

Try again and let us know.


Luis L.

On Dec 1, 2011 7:58 PM, “Fearless F.” [email protected] wrote:

$ PATH=${SANDBOX}/usr/bin:${PATH}
$ cd …/yaml-0.1.4
$ make install
It seems your ruby installation is missing psych (for YAML output).
libhistory.6.dylib libreadline.6.dylib libyaml-0.2.dylib perl5
in a given directory, LIBDIR, you must either use libtool, and
Any ideas?
In Unix or Linux the case may be needing to update ldconfig to tell the
system where the new place to search for libs is at. I am not familiar
with
Macs but that may be your issue. Check into how to run ldconfig on osX.

Luis L. wrote in post #1034729:

You missed to tell Ruby’s configure to use the $SANDBOX/usr location.
./configure --prefix=$SANDBOX/usr --with-opt-dir=$SANDBOX/usr
Try again and let us know.

Luis L.

@luislavena: That was exactly the problem – thank you. I did the build
from scratch (without installing readline) and everything seems to work
okay.

SO TO RECAP: To build ruby-1.9.3-p0 under OS X 10.6.8, you need to load
and install yaml-0.1.4 and configure the ruby build to use the yaml
directory:

% SANDBOX=/Users/me/Developer/Sandbox
% PATH=${SANDBOX}/usr/bin:${PATH}

% # INSTALL YAML 0.1.4
% cd …/yaml-0.1.4
% ./configure --prefix=$SANDBOX/usr
% make install ; make clean

% # INSTALL RUBY
% cd …/ruby-1.9.3-p0
% ./configure --prefix=$SANDBOX/usr --with-opt-dir=$SANDBOX/usr
% make install ; make clean

% # UPDATE GEM
% gem update --system

-----Messaggio originale-----
Da: Fearless F. [mailto:[email protected]]
Inviato: venerd 2 dicembre 2011 01:59
A: ruby-talk ML
Oggetto: yaml.h is missing / Failed to configure psych.

I’m doing a fresh sandboxed install of Ruby 'n Rails 'n such. The
install
is evidently having trouble finding yaml.h (or libyaml) and building
psych.
I’m running OSX 10.6.8 (“Snow Leopard”)

Synopsis:

$ # SETTING UP THE ENVIRONMENT
$ SANDBOX=/Users/me/Developer/Sandbox
$ PATH=${SANDBOX}/usr/bin:${PATH}

$ # INSTALL A MODERN READLINE
$ cd …/readline-6.2
$ ./configure --prefix=$SANDBOX/usr
<snip…>
$ make install
<snip…>
$ make clean

$ # INSTALL YAML 0.1.4
$ cd …/yaml-0.1.4
$ ./configure --prefix=$SANDBOX/usr
<snip…>
$ make install
<snip…>
$ make clean

$ # INSTALL RUBY
$ cd …/ruby-1.9.3-p0
$ ./configure --prefix=$SANDBOX/usr
<snip…>
$ make install
<snip…>
configuring psych
yaml.h is missing. Please install libyaml.
Failed to configure psych. It will not be installed.
<snip…>
$ make clean

$ # TRY TO USE GEM
$ gem update --system
$SANDBOX/usr/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your
ruby.

===============
Note that YAML did create and install libraries in the sandboxed
directory:

$ ls $SANDBOX/usr/lib
libhistory.6.2.dylib libreadline.6.2.dylib libruby-static.a
libyaml.la ruby
libhistory.6.dylib libreadline.6.dylib libyaml-0.2.dylib perl5
libhistory.a libreadline.a libyaml.a pkgconfig
libhistory.dylib libreadline.dylib libyaml.dylib python2.6

… but it appears that they weren’t found. I did note the following
message during the the YAML make process:

Libraries have been installed in:
/Users/r/Developer/Topaz/usr/lib

If you ever happen to want to link against installed libraries in a
given
directory, LIBDIR, you must either use libtool, and specify the full
pathname of the library, or use the `-LLIBDIR’
flag during linking and do at least one of the following:

  • add LIBDIR to the `DYLD_LIBRARY_PATH’ environment variable
    during execution

See any operating system documentation about shared libraries for more
information, such as the ld(1) and ld.so(8) manual pages.

… but IIRC you don’t want to mess with DYLD_LIBRARY_PATH on the Mac.

Any ideas?

  • ff


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


Caselle da 1GB, trasmetti allegati fino a 3GB e in piu’ IMAP, POP3 e
SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f

Sponsor:
Riccione Hotel 3 stelle in centro: Pacchetto Capodanno mezza pensione,
animazione bimbi, zona relax, parcheggio. Scopri l’offerta solo per
oggi…
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid983&d)-12