From: <re...@us...> - 2006-07-28 03:22:56
|
Revision: 24965 Author: res2002 Date: 2006-07-25 14:46:22 -0700 (Tue, 25 Jul 2006) ViewCVS: http://svn.sourceforge.net/crystal/?rev=24965&view=rev Log Message: ----------- res unmerged the changes from r24885:24886 ("res disabled RTLD_GLOBAL for unix plugin loading again...") since the original issue was solved in a different way. RTLD_GLOBAL is at least needed for python as well. Modified Paths: -------------- CS/trunk/configure CS/trunk/docs/history.txt CS/trunk/libs/csutil/unix/loadlib.cpp CS/trunk/mk/autoconf/checkopengl.m4 CS/trunk/plugins/video/canvas/openglx/Jamfile CS/trunk/plugins/video/canvas/openglx/glx2d.cpp CS/trunk/plugins/video/canvas/openglx/glx2d.h Modified: CS/trunk/configure =================================================================== --- CS/trunk/configure 2006-07-25 21:35:54 UTC (rev 24964) +++ CS/trunk/configure 2006-07-25 21:46:22 UTC (rev 24965) @@ -24527,19 +24527,6 @@ fi - # Extract the GL library name - if test "x$cs_cv_libgl" = "xyes"; then - gl_plat_libs_trimmed=`echo x$cs_gl_plat_libs | sed 's/^x//;s/ */ /g;s/^ //;s/ $//'` - libgl_name=`echo $cs_cv_libgl_libs | sed "s/$gl_plat_libs_trimmed//" | sed 's/-l//'` - cs_build_prop_val="$libgl_name" - cs_build_prop_val=`echo x$cs_build_prop_val | sed 's/^x//;s/ */ /g;s/^ //;s/ $//'` - if test -n "$cs_build_prop_val"; then - cs_jamconfig_text="${cs_jamconfig_text}GL.LIBNAME ?= \"$cs_build_prop_val\" ; -" -fi - -fi - if test $cs_cv_libgl = yes; then # Check for GLhandleARB. if test "" != yes; then Modified: CS/trunk/docs/history.txt =================================================================== --- CS/trunk/docs/history.txt 2006-07-25 21:35:54 UTC (rev 24964) +++ CS/trunk/docs/history.txt 2006-07-25 21:46:22 UTC (rev 24965) @@ -14,6 +14,10 @@ - plugins/engine/renderloop/ - plugins/sequence/ - res reworked the "Mesa DRI DXT upload only" support. + - res unmerged the changes from r24885:24886 ("res disabled + RTLD_GLOBAL for unix plugin loading again...") since the original + issue was solved in a different way. RTLD_GLOBAL is at least needed + for python as well. 24-Jul-2006 - Jorrit documented the new -cfgfile and -cfgset commandline options and also added documentation for a few other commonly Modified: CS/trunk/libs/csutil/unix/loadlib.cpp =================================================================== --- CS/trunk/libs/csutil/unix/loadlib.cpp 2006-07-25 21:35:54 UTC (rev 24964) +++ CS/trunk/libs/csutil/unix/loadlib.cpp 2006-07-25 21:46:22 UTC (rev 24965) @@ -28,12 +28,12 @@ #ifdef CS_DEBUG # ifdef CS_HAVE_RTLD_NOW -# define DLOPEN_MODE RTLD_NOW //| RTLD_GLOBAL // handy for debugging +# define DLOPEN_MODE RTLD_NOW | RTLD_GLOBAL // handy for debugging # else -# define DLOPEN_MODE RTLD_LAZY //| RTLD_GLOBAL +# define DLOPEN_MODE RTLD_LAZY | RTLD_GLOBAL # endif #else -# define DLOPEN_MODE RTLD_LAZY //| RTLD_GLOBAL +# define DLOPEN_MODE RTLD_LAZY | RTLD_GLOBAL #endif csLibraryHandle csLoadLibrary (const char* iName) Modified: CS/trunk/mk/autoconf/checkopengl.m4 =================================================================== --- CS/trunk/mk/autoconf/checkopengl.m4 2006-07-25 21:35:54 UTC (rev 24964) +++ CS/trunk/mk/autoconf/checkopengl.m4 2006-07-25 21:46:22 UTC (rev 24965) @@ -126,12 +126,7 @@ CS_CREATE_TUPLE([],[],[-lgl]) \ $cs_mesa_gl], [], [CS_EMIT_BUILD_RESULT([cs_cv_libgl], [GL])], [], [], - [$cs_gl_plat_cflags], [$cs_gl_plat_lflags], [$cs_gl_plat_libs]) - # Extract the GL library name - AS_IF([test "x$cs_cv_libgl" = "xyes"], - [gl_plat_libs_trimmed=CS_TRIM([$cs_gl_plat_libs]) - libgl_name=`echo $cs_cv_libgl_libs | sed "s/$gl_plat_libs_trimmed//" | sed 's/-l//'` - CS_EMIT_BUILD_PROPERTY([GL.LIBNAME], [$libgl_name])])]) + [$cs_gl_plat_cflags], [$cs_gl_plat_lflags], [$cs_gl_plat_libs])]) #------------------------------------------------------------------------------ Modified: CS/trunk/plugins/video/canvas/openglx/Jamfile =================================================================== --- CS/trunk/plugins/video/canvas/openglx/Jamfile 2006-07-25 21:35:54 UTC (rev 24964) +++ CS/trunk/plugins/video/canvas/openglx/Jamfile 2006-07-25 21:46:22 UTC (rev 24965) @@ -2,13 +2,9 @@ if $(GLX.AVAILABLE) = "yes" { - Description glx2d : "GL/X 2D driver" ; - Plugin glx2d : [ Wildcard *.cpp *.h ] ; - LinkWith glx2d : crystalspace_opengl crystalspace ; - ExternalLibs glx2d : GLX ; - if $(GL.LIBNAME) - { - CFlags glx2d : [ FDefines "LIBGL_NAME=\"\\\"$(GL.LIBNAME)\\\"\"" ] ; - } - CompileGroups glx2d : canvases openglcanvas ; +Description glx2d : "GL/X 2D driver" ; +Plugin glx2d : [ Wildcard *.cpp *.h ] ; +LinkWith glx2d : crystalspace_opengl crystalspace ; +ExternalLibs glx2d : GLX ; +CompileGroups glx2d : canvases openglcanvas ; } Modified: CS/trunk/plugins/video/canvas/openglx/glx2d.cpp =================================================================== --- CS/trunk/plugins/video/canvas/openglx/glx2d.cpp 2006-07-25 21:35:54 UTC (rev 24964) +++ CS/trunk/plugins/video/canvas/openglx/glx2d.cpp 2006-07-25 21:46:22 UTC (rev 24965) @@ -33,8 +33,6 @@ #include "iutil/objreg.h" #include "ivaria/reporter.h" -#include <dlfcn.h> - CS_IMPLEMENT_PLUGIN SCF_IMPLEMENT_FACTORY (csGraphics2DGLX) @@ -44,7 +42,7 @@ // csGraphics2DGLX function csGraphics2DGLX::csGraphics2DGLX (iBase *iParent) : - scfImplementationType (this, iParent), cmap (0), hardwareaccelerated(false), libGL (0) + scfImplementationType (this, iParent), cmap (0), hardwareaccelerated(false) { } @@ -69,21 +67,6 @@ dispdriver = 0; xvis = 0; hardwareaccelerated = false; - -#ifdef LIBGL_NAME - /* HACK: Work around issue where DRI drivers fail to load. - * If RTLD_GLOBAL is not defined, DRI drivers may not find some symbols - * exported from libGL, and hence not load. Previously, RTLD_GLOBAL was - * set on plugin loading; however, this has a couple of wacky, undesired - * side effects - like symbols, supposed to be from static libraries, - * being imported from other modules, causing side effects like memory - * allocation not being from the same module any more. - * To avoid using RTLD_GLOBAL for plugins, but nevertheless allow DRI - * drivers to work, we hack around this by manually loading libGL with - * RTLD_GLOBAL. This is enough to satisfy the DRI drivers. - */ - libGL = dlopen ("lib" LIBGL_NAME ".so", RTLD_LAZY | RTLD_GLOBAL); -#endif if (!csGraphics2DGLCommon::Initialize (object_reg)) return false; @@ -149,7 +132,6 @@ // Destroy your graphic interface XFree ((void*)xvis); Close (); - if (libGL) dlclose (libGL); } bool csGraphics2DGLX::Open() Modified: CS/trunk/plugins/video/canvas/openglx/glx2d.h =================================================================== --- CS/trunk/plugins/video/canvas/openglx/glx2d.h 2006-07-25 21:35:54 UTC (rev 24964) +++ CS/trunk/plugins/video/canvas/openglx/glx2d.h 2006-07-25 21:46:22 UTC (rev 24965) @@ -29,9 +29,7 @@ #include "iogldisp.h" -#ifndef XK_MISCELLANY #define XK_MISCELLANY 1 -#endif #include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/Xatom.h> @@ -50,9 +48,6 @@ Colormap cmap; GLXContext active_GLContext; bool hardwareaccelerated; - - // Handle to loaded libGL.so (see remark in Initialize()) - void* libGL; // we are using a specific displaydriver csRef<iOpenGLDisp> dispdriver; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |