[vtkusers] VTK, MacOS and X11

Johnny C. Norris II jnorris at mcs.anl.gov
Thu Jan 27 14:14:54 EST 2005


Jon,

Yes, non-OpenGL X stuff works.

The good news is that I've finally fixed the problem.  It appears to be 
  as much of a MacOS oddity than a VTK/CMake issue.  Here are the 
relevant CMakeCache.txt settings:

VTK_USE_CARBON:BOOL=OFF
VTK_USE_COCOA:BOOL=OFF
OPENGL_INCLUDE_DIR:PATH=/usr/X11R6/include
OPENGL_gl_LIBRARY:STRING=/usr/X11R6/lib/libGL.dylib;-framework OpenGL
OPENGL_glu_LIBRARY:STRING=/usr/X11R6/lib/libGLU.dylib;-framework AGL
OPENGL_xmesa_INCLUDE_DIR:PATH=OPENGL_xmesa_INCLUDE_DIR-NOTFOUND
OSMESA_INCLUDE_DIR:PATH=/usr/X11R6/include
OSMESA_LIBRARY:FILEPATH=/usr/X11R6/lib/libOSMesa.dylib
VTK_USE_X:BOOL=ON

I could not get it to work without specifying both libGL.dylib and 
-framework OpenGL.

Finally, the DYLD_LIBRARY_PATH environment variable must NOT have 
/usr/X11R6/lib in it.  It apparently shouldn't have any system library 
directory in it at all.  dyld is finicky about the order in which it 
loads things, and putting a system lib dir in this variable may cause it 
to load a system lib too soon.

Thanks for all the help!
John


Jon Harald Kaspersen wrote:
> Hi again John,
> 
> Are you able to for example pop up xlogo or xclock ?
>
> Have you tried a complete rebuild of VTK with X11 ?
> Make sure that :
>             OPENGL_gl_LIBRARY:FILEPATH=/usr/X11R6/lib/libGL.dylib
>             OPENGL_glu_LIBRARY:FILEPATH=/usr/X11R6/lib/libGLU.dylib
> 
> Regards
> Jon
> On Jan 27, 2005, at 5:13 PM, Johnny C. Norris II wrote:
> 
>> Thanks, I looked at the configuration, but the only difference from  
>> what  I tried before was that OSMesa was turned on.  I tried again  
>> anyway, and I still get the undefined references.  :-(
>>
>> X forwarding is on.  I can pop up xterms, etc.
>>
>> I've read that you can't run an OpenGL program on a Mac and have it  
>> display on another computer unless you're logged into the Mac's  
>> console.  Someone please tell me this isn't true.
>>
>> Thanks,
>> John
>>
>> Jon H Kaspersen wrote:
>>
>>> Hi Johnny,
>>> I have a nightly build of VTK+X11 on Mac OS X set up. You can find  
>>> yesterdays results here  
>>> http://www.vtk.org/Testing/Dashboard/20050126-0300-Nightly/ 
>>> Dashboard.html
>>> The site name is G4_Cube_X11_SINTEF
>>> As you can see around 20 tests fails.
>>> You'll find the build details by looking at the
>>> CMakeCache.txt file
>>> Are you trying to forward a X display from this
>>> Mac ?
>>> You might have to check that Xforwarding is ON.
>>> Look at http://developer.apple.com/qa/qa2001/qa1232.html
>>> Regards
>>> Jon
>>> On Jan 27, 2005, at 12:19 AM, Johnny C. Norris II wrote:
>>>     Martin Costabel wrote:
>>>         Johnny C. Norris II wrote:
>>>             Thanks for the suggestion. I changed the OpenGL settings  
>>> to:
>>>             OPENGL_gl_LIBRARY:FILEPATH=/usr/X11R6/lib/libGL.dylib
>>>             OPENGL_glu_LIBRARY:FILEPATH=/usr/X11R6/lib/libGLU.dylib
>>>             It didn't help, however. I still get exactly the same  
>>> errors.
>>>         What is working for me (and for the Fink vtk-py23 package):
>>>         OPENGL_gl_LIBRARY:STRING="-lGL"
>>>         OPENGL_glu_LIBRARY:STRING="-lGLU"
>>>         OPENGL_xmesa_INCLUDE_DIR:PATH=/usr/X11R6/include
>>>         This is for the released version 4.4.0, though, not for the
>>>         latest from CVS.
>>>     Thanks, but apparently this doesn't work anymore.
>>>     Building shared library
>>>      
>>> /Volumes/UberRaid/homes/jnorris/DEBUG/obj/VTK/bin/libvtkftgl.dylib...
>>>     /usr/bin/libtool: can't locate file for: -l-lGL
>>>     /usr/bin/libtool: file: -l-lGL is not an object file (not 
>>> allowed  in
>>>     a library)
>>>     make[5]: ***
>>>      
>>> [/Volumes/UberRaid/homes/jnorris/DEBUG/obj/VTK/bin/libvtkftgl.dylib]
>>>     Error 1
>>>     I also tried this:
>>>     OPENGL_gl_LIBRARY:STRING="GL"
>>>     OPENGL_glu_LIBRARY:STRING="GLU"
>>>     but got basically the same error as above.
>>>     I also tried:
>>>     OPENGL_gl_LIBRARY:STRING=/usr/X11R6/lib/libGL.dylib
>>>     OPENGL_glu_LIBRARY:STRING=/usr/X11R6/lib/libGLU.dylib
>>>     (notice the STRING instead of FILEPATH) but I still get the
>>>     unresolved symbols.
>>>     John


-- 
John Norris
Research Programmer
Center for Simulation of Advanced Rockets
http://www.uiuc.edu/ph/www/jnorris



More information about the vtkusers mailing list