lua-users home
lua-l archive

Re: LuaJIT + glXGetProcAddress

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 2012年03月16日, Mike Pall <mikelu-1203@mike.de> wrote:
> Miles Bader wrote:
>> Henk Boom <henk@henk.ca> writes:
>> > Why would the luajit ffi be using a different library than the
>> > linker/loader?
>>
>> Presumably luajit searches for libraries in "normal" locations.
>
> It just maps
> ffi.load("GL")
> to:
> dlopen("libGL.so", RTLD_LAZY|RTLD_LOCAL)
>
> The FFI has no clue about the actual library paths on POSIX. It
> simply relies on whatever dlopen() does, when called with a path
> without a slash.
>
> I was always under the impression dlopen() behavior is the same as
> implicit dependency loading via ELF headers. Apparently I'm wrong.
> Maybe have a look at readelf -d and at the various environment
> variables related to the dynamic loader.
Might be relevant: https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/943162
I'm still not sure why dlopen and ld are choosing different libraries though.
 henk

AltStyle によって変換されたページ (->オリジナル) /