Red Hat Bugzilla – Bug 744434
VTK should not be being built against both libGL and libOSMesa
Last modified: 2011-10-27 12:25:27 EDT
Description of problem:
The Fedora 14-16 VTK libraries is being compiled with VTK_OPENGL_HAS_OSMESA. This causes it to link against both libGL and libOSMesa and creates a symbol resolution issues where the GL context is only accessible in one of the libraries but functions may dispatch to the other as both export the gl* symbols.
Please see this thread I opened on the mesa users list for more details.
The long and short of it is that for VTK to use both libGL and OSMesa, OSMesa has to be compiled with name mangling and VTK has to be compiled use it that way by settings VTK_USE_MANGLED_MESA and not VTK_OPENGL_HAS_OSMESA. The latter is only for if one wants to use only OSMesa by itself.
Currently VTK_USE_MANGLED_MESA has bitrotted though, so there is no way to use OSMesa alongside libGL. Tom Fogal is working on reviving it as part of their work on VisIt, so this situation will likely be changing at some point again
Even once VTK supports mangled mesa again, it will not be able to be linked against the system libOSMesa as this libraries is not compiled with name mangling. A custom mangled OSMesa library will have to be compiled instead.
Doing this for every package that wants to use libGL alongside mangled OSMesa is a pain/maintenance issue, so Tom has kindly volunteered to write some patches and submit them upstream in order to support building a libMangledOSMesa.
Version-Release number of selected component (if applicable):
Fedora 14 and up (may be earlier as well, I haven't checked)
Steps to Reproduce:
1. Checkout our Orlando VTK visualization app from
git clone git://github.com/patrickdemond/OVis.git
2. Build it on a stock Fedora 14.
3. Run the application
It will segfault as the GL context will have not been created in the library the that the gl* functions are being dispatched to due to libOSMesa and libGL exporting several of the same symbols.
The applications should just run. You can get this behavior by forcing libGL to be loaded first so all non-OSMesa* symbols resolve to it.
Recompiling the vtk source package with --without-OSMesa resolves the issue.
Said patch has been posted:
should come out with 7.12, if accepted.
I'm in the process of building some updates. Thanks for the report.
vtk-5.6.1-11.fc16 has been submitted as an update for Fedora 16.
vtk-5.6.1-10.fc14 has been submitted as an update for Fedora 14.
vtk-5.6.1-10.fc15 has been submitted as an update for Fedora 15.
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing vtk-5.6.1-11.fc16'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
vtk-5.6.1-11.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
vtk-5.6.1-10.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
vtk-5.6.1-10.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.
Hope this doesn't re-open the ticket or anything, but I just wanted to let you know I've installed the new F14 VTK package and everything now works great.
Thanks very much! -Tyson