Hi Alan,<br><br>I'm not sure if this will help but could you give the output of:<br>readelf -d <span style="font-size: 11pt; color: rgb(31, 73, 125);">/projects/viz/paraview/support/Linux-cee-sw-rhel5-x86_64/install/Mesa-7.4.2-static/lib/libMESAGL.a</span> |grep TEXT<br>
<br>If there's a line like <code><span class="pln"></span><font size="2"><span class="lit">0x00000016</span><span class="pln"> </span><span class="pun">(</span><span class="pln">TEXTREL</span><span class="pun">) then the -fPIC flag may not have been passed to the compiler. If it's empty then it should have gotten the -fPIC flag. <br>
<br>For reference, I built mesa 7.6.1 on my machine with the following options:<br>./configure --prefix=/home/acbauer/UTIL/MESA/install --exec-prefix=/home/acbauer/UTIL/MESA/install --without-x --<br>with-driver=osmesa<br>
I did get all shared libraries though.<br><br>Andy<br><br><br></span></font><span class="pln"></span></code><br><div class="gmail_quote">On Tue, Apr 12, 2011 at 12:59 PM, Scott, W Alan <span dir="ltr"><<a href="mailto:wascott@sandia.gov">wascott@sandia.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Pat/All,</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">So, I tried compiling the static mesa libraries with fpic. Basically, I added the following to a special configs file:</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">CFLAGS = -O -fPIC</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">CXXFLAGS = -O -fPIC</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">PIC_FLAGS = -fPIC</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">CXX_PIC_FLAGS = -fPIC</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Then, I CMake my paraview, with the following:</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">OPENGL_INCLUDE_DIR /projects/viz/paraview/support/Linux-cee-sw-rhel5-x86_64/install/Mesa-7.4.2-static/include</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">OPENGL_gl_LIBRARY /projects/viz/paraview/support/Linux-cee-sw-rhel5-x86_64/install/Mesa-7.4.2-static/lib/libMESAGL.a</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">OPENGL_glu_LIBRARY /projects/viz/paraview/support/Linux-cee-sw-rhel5-x86_64/install/Mesa-7.4.2-static/lib/libMESAGLU.a</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">OPENGL_xmesa_INCLUDE_DIR</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">OSMESA_INCLUDE_DIR /projects/viz/paraview/support/Linux-cee-sw-rhel5-x86_64/install/Mesa-7.4.2-static/include</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">OSMESA_LIBRARY /projects/viz/paraview/support/Linux-cee-sw-rhel5-x86_64/install/Mesa-7.4.2-static/lib/libMESAOSMesa.a</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">VTK_USE_MANGLED_MESA OFF</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">VTK_OPENGL_HAS_OSMESA OFF</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">And –it fails as follows:</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">inking CXX shared library ../../bin/libvtkRendering.so</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">/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</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">/usr/bin/ld: final link failed: Bad value</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">collect2: ld returned 1 exit status</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">make[2]: *** [bin/libvtkRendering.so.pv3.10] Error 1</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">make[1]: *** [VTK/Rendering/CMakeFiles/vtkRendering.dir/all] Error 2</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">make: *** [all] Error 2</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">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.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Alan</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<div>
<div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; padding: 3pt 0in 0in;">
<p class="MsoNormal"><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> <a href="mailto:paraview-bounces@paraview.org" target="_blank">paraview-bounces@paraview.org</a> [mailto:<a href="mailto:paraview-bounces@paraview.org" target="_blank">paraview-bounces@paraview.org</a>]
<b>On Behalf Of </b>Scott, W Alan<br>
<b>Sent:</b> Monday, April 11, 2011 6:16 PM<br>
<b>To:</b> pat marion<br>
<b>Cc:</b> <a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a><br>
<b>Subject:</b> Re: [Paraview] ParaView builds using Mesa</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Yes, I do have Python enabled. I see where shared libs gets turned on.
</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">I will try to create fpic versions of static mesa, and if that doesn’t work, try a dynamic build of ParaView (again).
</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Thanks.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Alan</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; padding: 3pt 0in 0in;">
<p class="MsoNormal"><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> pat marion [mailto:<a href="mailto:pat.marion@kitware.com" target="_blank">pat.marion@kitware.com</a>]
<br>
<b>Sent:</b> Monday, April 11, 2011 6:08 PM<br>
<b>To:</b> Scott, W Alan<br>
<b>Cc:</b> <a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a><br>
<b>Subject:</b> Re: [Paraview] ParaView builds using Mesa</span></p>
</div>
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="margin-bottom: 12pt;">Hi Alan,<br>
<br>
Are you building with python enabled? If python is enabled then BUILD_SHARED_LIBS will turn itself on automatically.<br>
<br>
Is there any reason you cannot compile mesa with shared libs, or compile mesa static with -fPIC?<br>
<br>
Pat<br>
<br>
</p>
<div>
<p class="MsoNormal">On Mon, Apr 11, 2011 at 8:00 PM, Scott, W Alan <<a href="mailto:wascott@sandia.gov" target="_blank">wascott@sandia.gov</a>> wrote:</p>
<div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;">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’.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;">I am now trying to compile ParaView, and keep failing with the following:</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;">[ 7%] Built target Cosmo</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;">Linking CXX shared library ../../../bin/libvtkftgl.so</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;">/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</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;">/projects/viz/paraview/support/Linux-cee-sw-rhel5-x86_64/install/Mesa-7.4.2/lib/libMESAGL.a: could not read symbols: Bad value</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;">collect2: ld returned 1 exit status</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;">make[2]: *** [bin/libvtkftgl.so.pv3.10] Error 1</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;">make[1]: *** [VTK/Utilities/ftgl/CMakeFiles/vtkftgl.dir/all] Error 2</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;">make: *** [all] Error 2</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;">I have tried setting “BUILD_SHARED_LIBS” off when using ccmake on paraView, but it keeps turning itself on.
</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;">What I believe I need to do is create a static build of ParaView, thus Mesa won’t need the –fPIC flag.
</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;">Any ideas?</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;">Thanks all,</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;">Alan</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 10pt;">--------------------------------------------------------</span><span style="font-size: 11pt;"></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 10pt;">W. Alan Scott</span><span style="font-size: 11pt;"></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 10pt;">ParaView Support Manager</span><span style="font-size: 11pt;"></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 10pt;"> </span><span style="font-size: 11pt;"></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 10pt;">GAITS</span><span style="font-size: 11pt;"></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 10pt;">Sandia National Laboratories, MS 0822</span><span style="font-size: 11pt;"></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 10pt;">Org 9326 - Building 880 A1-C</span><span style="font-size: 11pt;"></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 10pt;"><a href="tel:%28505%29%20284-0932" target="_blank">(505) 284-0932</a> FAX
<a href="tel:%28505%29%20845-0833" target="_blank">(505) 845-0833</a></span><span style="font-size: 11pt;"></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 10pt;">---------------------------------------------------------</span><span style="font-size: 11pt;"></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 10pt;"> </span><span style="font-size: 11pt;"></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size: 11pt;"> </span></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom: 12pt;"><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">
http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a></p>
</div>
<p class="MsoNormal"> </p>
</div>
</div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br>