From: Andreas P. <and...@gm...> - 2010-03-31 15:59:23
|
Hi, Its me again, 2010/3/12 Chia-I Wu <ol...@gm...>: > On Fri, Mar 12, 2010 at 6:02 AM, Andreas Pokorny > <and...@gm...> wrote: >> 2010/3/11 Chia-I Wu <ol...@gm...>: >>> On Thu, Mar 11, 2010 at 10:06 PM, Andreas Pokorny >>> <and...@gm...> wrote: >>>> I work on: b8656c4825b9e054f05258773ba012e41d4fcdee >>>> I have two rather strange problems using egl. I have implemented a >>>> egl/es2/libX11 based renderer shared object file. The shared object >>>> file gets loaded and initialized using dlopen/dlsym. Then when the >>>> renderer is supposed to initialize EGL, and to create a window I run >>>> into runtime symbol lookup errors. >>>> ./Startup: symbol lookup error: /usr/local/lib/egl/egl_x11_swrast.so: >>>> undefined symbol: _eglInitDriverFallbacks >>> It seems _eglInitDriverFallbacks in libEGL.so is not resolved when >>> egl_x11_swrast.so is loaded. I am not quite sure about your setup (who dlopen >>> who?). Do you have a sample code that reproduces your setup or the issue? >> My applicatin dlopens a shared object files that links against EGL and >> ES2. I was just writing a sample code that turns progs/es2/xegl/tri.c >> into a shared library. Then I dlopen the lib with >> dlopen(RTLD_LAZY|RTLD_LOCAL); - and then i try to execute an exported >> function of tri.c (turned main into a function with visibility >> default) as it seems RTLD_LOCAL causes the issue. I have to use >> RTLD_GLOBAL instead. So now it works. >> I have no idea why i used RTLD_LOCAL in the first place. > > Glad you solved your problem. dlopen()ing is one of the part in EGL that I > haven't looked at. I don't have enough experiences on various setups or Unixes > to say that EGL is doing the right thing. According to git bisect the fix of chaning RTLD_LOCAL to RTLD_GLOBAL causes a crash in a different es2/egl implementation. What is bad about explicitly linking to libEGL.so in the egl driver? >From my limited point of view it work without breaking anything. kind regards Andreas |