[vtk-developers] Possible correct to OSMESA builds for static

Fabian, Nathan ndfabia at sandia.gov
Mon Aug 23 15:08:23 EDT 2010


I'm building Mesa myself, so it's very likely I've done it incorrectly.  I can't equally compare with shared builds, since I have used existing OSMesa builds on those platforms.  I will attempt a shared build on my mesa build when I have the chance.


On 8/23/10 12:15 PM, "Moreland, Kenneth" <kmorel at sandia.gov> wrote:

I'm way not the expert on this, but I did this recently and I recall that when I built OSMesa static, all the GL functions were included in libOSMesa.a.  Thus, you should not need a GL library at all.  Has the Mesa build changed recently (like in the last few months)?  Are things different when you compile with shared libraries?

-Ken


On 8/23/10 12:04 PM, "Fabian, Nathan" <ndfabia at sandia.gov> wrote:

Hi,

If I build with OSMESA but VTK_USE_X=false and build static, I get failures
to link.  I believe the problem is in the locations where we link
OSMESA_LIBRARY, we need to also explicitly link with OPENGL_gl_LIBRARY (to
be explicit: Utilities/IceT/CMakeLists.txt, VTK/Rendering/CMakeLists.txt,
and VTK/VolumeRendering/CMakeLists.txt).

Example diff:
-SET(KIT_LIBS ${KIT_LIBS} ${OSMESA_LIBRARY})
+SET(KIT_LIBS ${KIT_LIBS} ${OSMESA_LIBRARY} ${OPENGL_gl_LIBRARY})

And similarly for MANGLED_OSMESA_LIBRARY although I haven't tested that.

This is based on my assumption that we'd specify both mesa's GL as the
gl_LIBRARY as well as the OSMESA library itself in the CMakeCache.  If this
is an incorrect assumption then please ignore me :)

This works for me, but is it a correct change?

Thanks,
Nathan.


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtk-developers





   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********
*** *** ***  email: kmorel at sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      web:   http://www.cs.unm.edu/~kmorel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20100823/67e34e3e/attachment.html>


More information about the vtk-developers mailing list