From: Chia-I Wu <ol...@gm...> - 2010-03-12 03:09:50
|
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. >>> When I add the following to the makefiles - it seems to work. >>> >>> --- a/src/gallium/winsys/drm/swrast/egl/Makefile >>> +++ b/src/gallium/winsys/drm/swrast/egl/Makefile >>> @@ -3,7 +3,7 @@ include $(TOP)/configs/current >>> >>> EGL_DRIVER_NAME = swrast >>> EGL_DRIVER_SOURCES = dummy.c >>> -EGL_DRIVER_LIBS = >>> +EGL_DRIVER_LIBS = -lEGL >>> >>> EGL_DRIVER_PIPES = \ >>> $(TOP)/src/gallium/winsys/drm/swrast/core/libswrastdrm.a \ >>> >>> Then the eglInitialize() command still fails because of something else. >>> >>> When I run the application with the following settings: >>> EGL_DRIVER=egl_x11_swrast >>> EGL_SOFTWARE=1 >>> EGL_DISPLAY=x11 >>> EGL_LOG_LEVEL=debug >>> >>> I get: >>> >>> libEGL debug: dlopen(/usr/local/lib/egl/egl_x11_swrast.so) >>> libEGL info: use software fallback >>> libEGL warning: No supported client API >>> libEGL debug: no state tracker supports config 0x21 >>> ... till ... >>> libEGL debug: no state tracker supports config 0x98 >>> libEGL debug: EGL user error 0x3001 (other) in eglInitialize(unable to >>> add configs) >>> The demos in mesa/progs/egl give me the same output. While the demos >>> in mesa/progs/{es2,es1}/xegl and work. Any ideas what I am doing >>> wrong? >> From which directory do you build your libGL? You need to use the one from >> src/gallium/winsys/xlib (or src/gallium/targets/libgl-xlib/ in today's git). >> Have a look at the OpenGL section in docs/egl.html. > I did not build libGL, I was only interested in EGL and GLES1/ES2 and > VG. Do I have to build GL? No. Only if you want to run the demos under progs/egl/. -- ol...@Lu... |