[Paraview] ParaView builds using Mesa

Andy Bauer andy.bauer at kitware.com
Tue Apr 12 13:19:57 EDT 2011


Hi Alan,

I'm not sure if this will help but could you give the output of:
readelf -d
/projects/viz/paraview/support/Linux-cee-sw-rhel5-x86_64/install/Mesa-7.4.2-static/lib/libMESAGL.a|grep
TEXT

If there's a line like 0x00000016 (TEXTREL) then the -fPIC flag may not have
been passed to the compiler.  If it's empty then it should have gotten the
-fPIC flag.

For reference, I built mesa 7.6.1 on my machine with the following options:
./configure --prefix=/home/acbauer/UTIL/MESA/install
--exec-prefix=/home/acbauer/UTIL/MESA/install --without-x --
with-driver=osmesa
I did get all shared libraries though.

Andy



On Tue, Apr 12, 2011 at 12:59 PM, Scott, W Alan <wascott at sandia.gov> wrote:

>  Pat/All,
>
>
>
> So, I tried compiling the static mesa libraries with fpic.  Basically, I
> added the following to a special configs file:
>
> CFLAGS = -O -fPIC
>
> CXXFLAGS = -O -fPIC
>
> PIC_FLAGS = -fPIC
>
> CXX_PIC_FLAGS = -fPIC
>
>
>
> Then, I CMake my paraview, with the following:
>
> OPENGL_INCLUDE_DIR
> /projects/viz/paraview/support/Linux-cee-sw-rhel5-x86_64/install/Mesa-7.4.2-static/include
>
> OPENGL_gl_LIBRARY
> /projects/viz/paraview/support/Linux-cee-sw-rhel5-x86_64/install/Mesa-7.4.2-static/lib/libMESAGL.a
>
> OPENGL_glu_LIBRARY
> /projects/viz/paraview/support/Linux-cee-sw-rhel5-x86_64/install/Mesa-7.4.2-static/lib/libMESAGLU.a
>
> OPENGL_xmesa_INCLUDE_DIR
>
> OSMESA_INCLUDE_DIR
> /projects/viz/paraview/support/Linux-cee-sw-rhel5-x86_64/install/Mesa-7.4.2-static/include
>
> OSMESA_LIBRARY
> /projects/viz/paraview/support/Linux-cee-sw-rhel5-x86_64/install/Mesa-7.4.2-static/lib/libMESAOSMesa.a
>
> VTK_USE_MANGLED_MESA             OFF
>
> VTK_OPENGL_HAS_OSMESA            OFF
>
>
>
>
>
> And –it fails as follows:
>
>
>
> inking CXX shared library ../../bin/libvtkRendering.so
>
> /usr/bin/ld:
> /projects/viz/paraview/support/Linux-cee-sw-rhel5-x86_64/install/Me
>                                                                                                                                     sa-7.4.2-static/lib/libMESAGL.a(glapi_x86-64.o):
> relocation R_X86_64_PC32 agains
>                                                                                                                                                                                                 t
> `_glapi_Dispatch' can not be used when making a shared object; recompile
> with
> -fPIC
>
> /usr/bin/ld: final link failed: Bad value
>
> collect2: ld returned 1 exit status
>
> make[2]: *** [bin/libvtkRendering.so.pv3.10] Error 1
>
> make[1]: *** [VTK/Rendering/CMakeFiles/vtkRendering.dir/all] Error 2
>
> make: *** [all] Error 2
>
>
>
> Notice it is the correct version of mesa (I renamed libGL.a to libMESAGL.a,
> thus making sure that I am not picking up system versions of Mesa), and that
> it is still asking for fPIC.
>
>
>
> Alan
>
>
>
>
>
>
>
>
>
>
>
>
>
> *From:* paraview-bounces at paraview.org [mailto:
> paraview-bounces at paraview.org] *On Behalf Of *Scott, W Alan
> *Sent:* Monday, April 11, 2011 6:16 PM
> *To:* pat marion
> *Cc:* paraview at paraview.org
> *Subject:* Re: [Paraview] ParaView builds using Mesa
>
>
>
> Yes, I do have Python enabled.  I see where shared libs gets turned on.
>
>
>
> I will try to create fpic versions of static mesa, and if that doesn’t
> work, try a dynamic build of ParaView (again).
>
>
>
> Thanks.
>
>
>
> Alan
>
>
>
>
>
>
>
> *From:* pat marion [mailto:pat.marion at kitware.com]
> *Sent:* Monday, April 11, 2011 6:08 PM
> *To:* Scott, W Alan
> *Cc:* paraview at paraview.org
> *Subject:* Re: [Paraview] ParaView builds using Mesa
>
>
>
> Hi Alan,
>
> Are you building with python enabled?  If python is enabled then
> BUILD_SHARED_LIBS will turn itself on automatically.
>
> Is there any reason you cannot compile mesa with shared libs, or compile
> mesa static with -fPIC?
>
> Pat
>
>  On Mon, Apr 11, 2011 at 8:00 PM, Scott, W Alan <wascott at sandia.gov>
> wrote:
>
> I am trying to create a paraview (client side) build of ParaView using Mesa
> on Linux.  I have compiled Mesa using Mesa 7.4.2, compiled with ‘make
> linux-x86-64-static’.
>
>
>
> I am now trying to compile ParaView, and keep failing with the following:
>
>
>
> [  7%] Built target Cosmo
>
> Linking CXX shared library ../../../bin/libvtkftgl.so
>
> /usr/bin/ld:
> /projects/viz/paraview/support/Linux-cee-sw-rhel5-x86_64/install/Mesa-7.4.2/lib/libMESAGL.a(glapi.o):
> relocation R_X86_64_32 against `a local symbol' can not be used when making
> a shared object; recompile with -fPIC
>
> /projects/viz/paraview/support/Linux-cee-sw-rhel5-x86_64/install/Mesa-7.4.2/lib/libMESAGL.a:
> could not read symbols: Bad value
>
> collect2: ld returned 1 exit status
>
> make[2]: *** [bin/libvtkftgl.so.pv3.10] Error 1
>
> make[1]: *** [VTK/Utilities/ftgl/CMakeFiles/vtkftgl.dir/all] Error 2
>
> make: *** [all] Error 2
>
>
>
> I have tried setting “BUILD_SHARED_LIBS” off when using ccmake on paraView,
> but it keeps turning itself on.
>
>
>
> What I believe I need to do is create a static build of ParaView, thus Mesa
> won’t need the –fPIC flag.
>
>
>
> Any ideas?
>
>
>
> Thanks all,
>
>
>
> Alan
>
>
>
>
>
> --------------------------------------------------------
>
> W. Alan Scott
>
> ParaView Support Manager
>
>
>
> GAITS
>
> Sandia National Laboratories, MS 0822
>
> Org 9326 - Building 880 A1-C
>
> (505) 284-0932   FAX (505) 845-0833
>
> ---------------------------------------------------------
>
>
>
>
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110412/61dbdaf8/attachment.htm>


More information about the ParaView mailing list