No subject
Wed Oct 7 22:37:18 EDT 2009
lding Mesa,, both Xlib and DRI make use of the X11 libraries, but it is my =
understanding that if you build mesa with the
--with-driver=3Dosmesa
Then the offending glx* linkage will not be necessary. You will get a libOS=
Mesa instead of libGL - but you simply tell VTK to use that one instead of =
libGL. (Pat's tweaks may also be required to stop vtkXRenderwindow stuff be=
ing pulled in).
I haven't actually tried this, but I'd like to be proved right or wrong so =
that I know for future reference.
JB
* Xlib - This is the default mode for building Mesa. It uses Xlib as a s=
oftware renderer to do all rendering. It corresponds to the option --with-d=
river=3Dxlib. The libX11 and libXext libraries, as well as the X11 developm=
ent headers, will be need to support the Xlib driver.
* DRI - This mode uses the DRI hardware drivers for accelerated OpenGL r=
endering. Enable the DRI drivers with the option --with-driver=3Ddri. See t=
he basic installation instructions <http://www.mesa3d.org/install.html> fo=
r details on prerequisites for the DRI drivers.
* OSMesa - No libGL is built in this mode. Instead, the driver code is b=
uilt into the Off-Screen Mesa (OSMesa) library. See the Off-Screen Renderin=
g <http://www.mesa3d.org/osmesa.html> page for more details.
From: paraview-bounces at paraview.org [mailto:paraview-bounces at paraview.org] =
On Behalf Of pat marion
Sent: 24 February 2010 21:33
To: Moreland, Kenneth
Cc: ParaView
Subject: Re: [Paraview] Compiling without X11 libraries
Sorry I misread your email, you don't want to create X11 windows at all. Y=
ou want to do pure osmesa. So then you'll be all set if you follow the hac=
ks I describe. By the way, when I compile osmesa, for pure offscreen, I ju=
st run 'make linux-osmesa' and the result is libOSMesa.so and libGLU.so.
Pat
On Wed, Feb 24, 2010 at 3:29 PM, pat marion <pat.marion at kitware.com> wrote:
Hi Ken,
Below is copy and paste from a previous email where I answered a similar qu=
estion off-list (your question is a little different because you want to us=
e Mesa3D to create windows). Unfortunately you can't do this without some =
small hacks to the cmakelists. I think the important part for you is in th=
e last paragraph.
----------
Using true offscreen means using vtkOSOpenGLRenderWindow and not vtkXOpenGL=
RenderWindow. Which one is used depends on whether or not VTK_USE_OSMESA i=
s defined in $build_dir/VTK/vtkToolkits.h.
VTK_USE_OSMESA is defined when:
* OPENGL_gl_LIBRARY is set to the empty string
* VTK_USE_X is OFF
* VTK_OPENGL_HAS_OSMESA is true
If the platform is Linux, and cmake is able to locate X11 libraries & heade=
rs, then cmake will force VTK_USE_X to ON. You must hack VTK/CMake/vtkUseX=
.cmake to set it to OFF.
Look at the bottom of $build_dir/VTK/vtkToolkits.h to make sure that you ha=
ve successfully defined VTK_USE_OSMESA.
If you are doing a shared build, and OPENGL_gl_LIBRARY is the empty string,=
then you will get link errors because of some changes that were introduced=
after the transitive linking patch last June. To avoid that, you need to =
change all instances of ${OPENGL_gl_LIBRARY} to ${OSMESA_LIBRARY} in all CM=
akeLists.txt except for VTK/Rendering/CMakeLists.txt or VTK/CMakeLists.txt.
Pat
On Wed, Feb 24, 2010 at 3:10 PM, Moreland, Kenneth <kmorel at sandia.gov> wrot=
e:
I do have PARAVIEW_BUILD_GT_GUI off, but I still need rendering. I still n=
eed to create OpenGL windows, but I will only ever do it through OSMesa, ne=
ver through X11.
-Ken
On 2/24/10 1:02 PM, "Dave Partyka" <dave.partyka at kitware.com <http://dave.p=
artyka at kitware.com> > wrote:
I am not sure about ParaView but in VTK if you turn rendering off you shoul=
d be able to do this. Have you tried turning PARAVIEW_BUILD_QT_GUI off? I d=
o that when I generate the command line tools package on Mac OSX.
On Wed, Feb 24, 2010 at 2:40 PM, Moreland, Kenneth <kmorel at sandia.gov <http=
://kmorel at sandia.gov> > wrote:
Is there any way to compile ParaView without any X11 libraries at all? I c=
ompiled OSMesa support for Mesa 3D and tried to link that, but when I link =
I am missing a bunch of glX* symbols. I think that in order to build these=
functions for Mesa, I need an X11 library, which gets me back to the dilem=
ma of what if you have no libraries?
-Ken
**** Kenneth Moreland
*** Sandia National Laboratories
***********
*** *** *** email: kmorel at sandia.gov <http://kmorel@sandia.gov> <http://km=
orel at sandia.gov>
** *** ** phone: (505) 844-8919
*** web: http://www.cs.unm.edu/~kmorel <http://www.cs.unm.edu/%7=
Ekmorel>
_______________________________________________
Powered by www.kitware.com <http://www.kitware.com> <http://www.kitware.com=
>
Visit other Kitware open-source projects at http://www.kitware.com/opensour=
ce/opensource.html
Please keep messages on-topic and check the ParaView Wiki at: http://paravi=
ew.org/Wiki/ParaView
Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview
**** Kenneth Moreland
*** Sandia National Laboratories
***********
*** *** *** email: kmorel at sandia.gov <http://kmorel@sandia.gov>
** *** ** phone: (505) 844-8919
*** web: http://www.cs.unm.edu/~kmorel <http://www.cs.unm.edu/%7=
Ekmorel>
_______________________________________________
Powered by www.kitware.com <http://www.kitware.com>
Visit other Kitware open-source projects at http://www.kitware.com/opensour=
ce/opensource.html
Please keep messages on-topic and check the ParaView Wiki at: http://paravi=
ew.org/Wiki/ParaView
Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview
_______________________________________________
Powered by www.kitware.com <http://www.kitware.com>
Visit other Kitware open-source projects at http://www.kitware.com/opensour=
ce/opensource.html
Please keep messages on-topic and check the ParaView Wiki at: http://paravi=
ew.org/Wiki/ParaView
Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview
**** Kenneth Moreland
*** Sandia National Laboratories
***********
*** *** *** email: kmorel at sandia.gov
** *** ** phone: (505) 844-8919
*** web: http://www.cs.unm.edu/~kmorel
--_000_C7ABF0631836Akmorelsandiagov_
Content-Type: text/html;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
<HTML>
<HEAD>
<TITLE>Re: [Paraview] Compiling without X11 libraries</TITLE>
</HEAD>
<BODY>
<FONT FACE=3D"Calibri, Verdana, Helvetica, Arial"><SPAN STYLE=3D'font-size:=
11pt'>Thanks everyone for your help. I’m pretty sure I got past=
this issue.<BR>
<BR>
I did have to “hack” VTK/CMake/vtkUseX.cmake as you mentioned. =
That said, is there a reason not to check in a change that allows you=
to set VTK_USE_X (that is, set VTK_USE_X_OPTIONAL) in the case that VTK_OP=
ENGL_HAS_OSMESA is ON? The system would by default behave the same bu=
t would allow you to turn of X in this case when you have OSMesa but no X.<=
BR>
<BR>
-Ken<BR>
<BR>
<BR>
On 2/25/10 8:08 AM, "pat marion" <<a href=3D"pat.marion at kitwar=
e.com">pat.marion at kitware.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE=3D"Calibri, Verdana, Helvetica, Arial"=
><SPAN STYLE=3D'font-size:11pt'>I think the latest release of MesaLib using=
a configure script, but older versions just provided makefiles.=A0 I still=
use the older releases and run 'make linux-osmesa' to get libOSMesa.so and=
libGLU.so without any dependencies on Xlib.<BR>
<BR>
Unfortunately you can't just set libOSMesa.so in place of libGL.so (setting=
OPENGL_gl_LIBRARY in cmake) because cmake uses the OPENGL_gl_LIBRARY varia=
ble to check for the existance of real opengl versus osmesa.=A0 So that's w=
hy I said to set OPENGL_gl_LIBRARY to the empty string.<BR>
<BR>
I ran a new build and didn't get any of the link errors I described previou=
sly, so you probably don't have to worry about the other hacks I mentioned.=
=A0 The steps should just be:<BR>
<BR>
Edit VTK/CMake/vtkUseX.cmake and set VTK_USE_X_OPTIONAL to 1 instead of 0 (=
then VTK_USE_X will automatically default to OFF).=A0 Create a new build fo=
lder and configure with -DOPENGL_gl_LIBRARY=3D"".=A0 Set OSMESA_L=
IBRARY and OSMESA_INCLUDE_DIR.=A0 Now you should be able to build a pvserve=
r that has no dependencies on X11 or libGL.<BR>
<BR>
Pat<BR>
<BR>
On Thu, Feb 25, 2010 at 8:39 AM, Biddiscombe, John A. <<a href=3D"biddis=
co at cscs.ch">biddisco at cscs.ch</a>> wrote:<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE=3D"Calibri, Verdana, Helvetica, Arial"=
><SPAN STYLE=3D'font-size:11pt'>Ken<BR>
=A0<BR>
More information about the ParaView
mailing list