<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7232.77">
<TITLE>Re: [vtk-developers] extension wrangler</TITLE>
</HEAD>
<BODY>
<DIV id=idOWAReplyText55442 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Whether or not VTK is
compiled static or dynamic is immaterial. A static build can still link
against a shared OpenGL library (and call dlopen on it) and a dynamic link might
still be using a static OpenGL library.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>The problem is, it is hard to accurately
pick exactly which library file a linker is going to link against. We were
running into problems where we identified a shared OpenGL library that probably
should have been used, but the linker was using a different library. And
if the binaries are moved to a different machine, the whole thing can break
down.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>If there was a way to query at runtime what
shared objects were loaded, identify which one was OpenGL, and then call dlopen
on that, that would probably work. However, I don't know of any way to do
that query.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>-Ken</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Jeff Lee
[mailto:jeff@cdnorthamerica.com]<BR><B>Sent:</B> Tue 11/15/2005 2:17
PM<BR><B>To:</B> Moreland, Kenneth<BR><B>Cc:</B>
vtk-developers<BR><B>Subject:</B> Re: [vtk-developers] extension
wrangler<BR></FONT><BR></DIV>
<DIV><BR><BR>
<P><FONT size=2>Moreland, Kenneth wrote:<BR><BR>> The dlopen technique was
dissabled because it was proving to be<BR>> unreliable. Some of VTK's
dashboard tests were continually failing<BR>> because VTK was being compiled
against one OpenGL library (which<BR>> happened to be static) and the dlopen
was openening a shared object<BR>> library elsewhere. Thus, it would
look like the extension was loaded<BR>> correctly, but the application would
crash if you tried to use any of<BR>> the functions.<BR>><BR>What if the
dlopen method were only enabled when vtk is built shared? I<BR>saw that
vtkOpenGLExtensionManagerConfigure.h that does<BR>#define
OPENGL_LIBRARIES<BR>"/usr/lib/libGL.so;-lSM;-lICE;-lSM;-lICE;/usr/X11R6/lib/libX11.so;/usr/X11R6/lib/libXext.so;/usr/X11R6/lib/libX11.so;/usr/X11R6/lib/libXext.so"<BR><BR>If
you do dlopen with a null in the first argument, the loader will<BR>search the
libpath (you don't really need to specify). Is this the kind<BR>of
behavior we should support? Are there cases when this approach<BR>yields
undesirable results? This appears to be what glew
does.<BR>Regards,<BR>-J<BR><BR>><BR>> Ultimately we could not figure out a
way to ensure that the dlopen<BR>> tried to open the same library that was
already being used. (The<BR>> problem gets more compilicated when you compile
on one machine and run<BR>> on another.) If someone could solve this problem,
then the dlopen<BR>> method would work just fine.<BR>><BR>>
-Ken<BR>><BR>><BR>> -----Original Message-----<BR>> From:
vtk-developers-bounces+kmorel=sandia.gov@vtk.org on behalf of<BR>> Jeff
Lee<BR>> Sent: Tue 11/15/2005 12:31 PM<BR>> To: vtk-developers<BR>>
Subject: [vtk-developers] extension wrangler<BR>><BR>> Hi,<BR>> Does
anyone know why the extension wrangler in vtk has the fallback<BR>> dlopen
technique disabled? Is there some way this could be fixed for<BR>>
systems without glxProcAddressARB functionality? Is the wrangler
meant<BR>> to be a runtime wrangler, or just compile-time?<BR>>
Regards,<BR>> Jeff<BR>>
_______________________________________________<BR>> vtk-developers mailing
list<BR>> vtk-developers@vtk.org<BR>> <A
href="http://www.vtk.org/mailman/listinfo/vtk-developers">http://www.vtk.org/mailman/listinfo/vtk-developers</A><BR>><BR>><BR><BR>--<BR>Jeff
Lee<BR>Senior Software Engineer<BR>Computational Dynamics North America
Ltd<BR>21 Lafayette Street, Suite 230<BR>Lebanon NH 03766
USA<BR>fax: 603 643 9994<BR>phone: 603 643 9993 x109<BR><A
href="http://www.cd-adapco.com">http://www.cd-adapco.com</A><BR><BR><BR></FONT></P></DIV>
</BODY>
</HTML>