[Vm-dev] FFI is not finding libraries on Ubuntu 11.04

Igor Stasenko siguctua at gmail.com
Thu May 26 11:24:09 UTC 2011


On 26 May 2011 04:49, David T. Lewis <lewis at mail.msen.com> wrote:
>
> On Wed, May 25, 2011 at 03:55:25PM -0400, Matthew Fulmer wrote:
>>
>> X11Display class >> XOpenDisplay: displayName
>>       "X11Display XOpenDisplay: nil"
>>       <cdecl: X11Display* 'XOpenDisplay' (char*) module:'X11'>
>>       ^self externalCallFailed
>>
>> It also results in a series of calls to bogus files:
>>
>> access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
>> open("/lib/i386-linux-gnu/X11", O_RDONLY) = -1 ENOENT (No such file or
>> directory)
>> open("/usr/lib/i386-linux-gnu/X11", O_RDONLY) = -1 ENOENT (No such
>> file or directory)
>> open("/lib/X11", O_RDONLY)              = -1 ENOENT (No such file or directory)
>> open("/usr/lib/sse2/X11", O_RDONLY)     = -1 ENOENT (No such file or directory)
>> open("/usr/lib/X11", O_RDONLY)          = 8
>>
>> The library is actually at /usr/lib/i386-linux-gnu/libX11.so.6 , which
>> is at least in whatever search path FFI seems to be using. It may have
>> found the library had it been looking for the correct filename
>
> And if you change the declaration to the following, it works?
>
>  <cdecl: X11Display* 'XOpenDisplay' (char*) module:'libX11.so.6'>
>

yes, but if you change it like that, where the guarantees that it will
work on another unix box?
Apparently a solution to that is to deal with library search at
language side and stop relying on
too clever FFI/VM library lookup mechanism, hardcoded in C, because it
will never satisfy all possible combinations
on all possible platforms.

> Dave
>


-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list