ffi/ffi — Issue #168: ffi_lib not handling ncurses default installation on ubuntu
Author: robbiemu
Created: 2011-10-28 12:59:39+00:00
State: open

Ubuntu packages ncurses in a way that ruby is not loading:

$ ruby test.rb
...
/home/robbiemu/bin/lib/ruby/gems/1.9.1/gems/ffi-1.0.10/lib/ffi/library.rb:121:in `block in ffi_lib': Could not open library 'ncursesw': ncursesw: cannot open shared object file: No such file or directory. (LoadError)
...
Could not open library 'libncurses.so': /usr/lib/libncurses.so: file too short.
Could not open library 'libcurses': libcurses: cannot open shared object file: No such file or directory.
Could not open library 'libcurses.so': /usr/lib/libcurses.so: file too short
...
$ cat /usr/lib/libncurses.so
INPUT(libncurses.so.5 -ltinfo)

-- it never actually tries libncurses.so.5 so it is not silently inspecting the data in the "too short file"