[vtkusers] new user attempting install on mac OSX

Adrian Umpleby a.umpleby at imperial.ac.uk
Thu Apr 17 06:19:02 EDT 2003

>> Building shared library 
>> /usr/local/VTK-4.2.2/bin/libvtkRendering.dylib...
>> ld: Undefined symbols:
>> _glXChooseVisual
>> _glXCreateContext
>> _glXDestroyContext
>> _glXGetClientString
>> _glXGetConfig
>> _glXGetCurrentContext
>> _glXIsDirect
>> _glXMakeCurrent
>> _glXQueryExtension
>> _glXQueryExtensionsString
>> _glXQueryServerString
>> _glXSwapBuffers
>> /usr/bin/libtool: internal link edit command failed
>> make[3]: *** [/usr/local/VTK-4.2.2/bin/libvtkRendering.dylib] Error 1
>> make[2]: *** [default_target] Error 2
>> make[1]: *** [default_target_Rendering] Error 2
>> make: *** [default_target] Error 2

I assume you are trying to compile it for use with X11 rather than Aqua?

> Hi Byron
> Do you have compilation on for X11? i think that this is an issue 
> regarding the X11 gl Libs. I think it once happened to me when wrapping 
> for NONaquaTCL/TK. and maybe i set the camke flag for X11 compilation 
> on. i remember someone posting to the list that  cmake tries to link 
> agains the X11 gl libs instead of the openGL framework libs.. and 
> freaks out somehow.

Yes, you need to check the CMakeCache.txt file to ensure it links 
against X11's GL instead of trying to use the OpenGL framework. I can't 
remember exactly which ones I set, but here's several relevant looking 
entries from mine:

//X11 extra flags.

//Libraries and options used in X11 programs.

//What is the path where the file GL/gl.h can be found

//OpenGL lib for OSX

//AGL lib for OSX

//What is the path where the file X11/X.h can be found

//Where can the X11 library be found

//Where can the Xext library be found

//What is the path where the file X11/Xlib.h can be found

//What is the path where the file X11/Xutil.h can be found

BTW, going back to a previous recent post in this thread, it's probably 
worth me pointing out that I did not need to set PYTHON_LIBRARY:FILEPATH 
to get it to compile. I have it blank:


My compilation of python (and tcltk) was not via fink - it was directly 
from the downloaded source packages, and I fiddled the Makefiles to get 
them to compile for X11 rather than creating Python/Tcl/Tk frameworks. 
-I also found it created a static python lib, rather than dylib.

Anyway, it seemed to compile fine with it blank (dunno if it's meant 

> my setup is OSX 10.2.5, AquaTCL/TK and python2.2.2 framework intstall 
> from source. compilation for X11 was set off in cmake.
> BUT: mayavi is so far not working for me. Maybe i should carfully 
> follow Adrains mail.

At what stage is it going wrong? Did you compile VTK for Carbon or 
Cocoa? (I've yet to try it for Cocoa - that's one of my next 
projects...) Did you eradicate all mention of X11 lib and include paths 
from your CMakeCache.txt? Are you using gcc3 or gcc2? OSX10.1 or 10.2? 
Have you got Aqua Tkinter in your Python framework? (Try starting 
python, then type "import Tkinter".) Have you got the Python interpreter 
application, so the tk windows have a genuine OSX app to work within?



More information about the vtkusers mailing list