<div dir="ltr"><div dir="ltr"><a href="https://docs.google.com/document/d/1oNurBxXA_UCZcg_08E54fxWTe0noDnxdIX9gPw-74d8/edit#">https://docs.google.com/document/d/1oNurBxXA_UCZcg_08E54fxWTe0noDnxdIX9gPw-74d8/edit#</a><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 27, 2018 at 3:01 PM Prabhu Ramachandran <<a href="mailto:prabhu@aero.iitb.ac.in">prabhu@aero.iitb.ac.in</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p><tt>Hi all,</tt></p>
<p><tt>Here is hopefully the last of the issues I am running into, I
just tried to create wheels for 8.2.0-rc2 and have the following
problem. </tt><tt><br>
</tt></p>
<p><tt>First for some background. Some of the VTK Python libraries
seem to link to the PYTHON_LIBRARY, for the wheels, we do not do
this. JC pointed this out to me
<a class="m_5376724342020312854moz-txt-link-freetext" href="https://www.python.org/dev/peps/pep-0513/#libpythonx-y-so-1" target="_blank">https://www.python.org/dev/peps/pep-0513/#libpythonx-y-so-1</a></tt></p>
<p><tt>Basically, if we build wheels linking to the libpython* the
wheel may not work on Ubuntu/Debian which would be sad.</tt><tt><br>
</tt></p>
<p><tt>In the past what we did to build the wheels is provide a
dummy
VTKPythonPackage/scripts/internal/libpython-not-needed-symbols-exported-by-interpreter
and passing that. This somehow worked by tricking CMake into
thinking there was a library specified but I am not sure how the
linker did not complain. Anyway, when I try to build the wheels
now on MacOS I get this error:</tt></p>
<p><tt>Linking CXX shared
library...ib/libvtkPythonInterpreter-8.2.1.dylib</tt><tt><br>
</tt><tt>FAILED: lib/libvtkPythonInterpreter-8.2.1.dylib</tt><tt><br>
</tt><tt>: &&
/Library/Developer/CommandLineTools/usr/bin/c++ -O3 -DNDEBUG
-arch x86_64 -isysroot
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
-mmacosx-version-min=10.9 -dynamiclib
-Wl,-headerpad_max_install_names -undefined dynamic_lookup
-compatibility_version 1.0.0 -current_version 1.0.0 -o
lib/libvtkPythonInterpreter-8.2.1.dylib -install_name
@rpath/libvtkPythonInterpreter-8.2.1.dylib
Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/vtkPythonInterpreter.cxx.o
Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/vtkPythonInteractiveInterpreter.cxx.o
-Wl,-rpath,VTKPythonPackage/VTK-osx_3.7/lib
VTKPythonPackage/scripts/internal/libpython-not-needed-symbols-exported-by-interpreter
lib/libvtksys-8.2.1.dylib lib/libvtkCommon-8.2.1.dylib
&& :</tt><tt><br>
</tt><tt>ld: file too small (length=0) file
'VTKPythonPackage/scripts/internal/libpython-not-needed-symbols-exported-by-interpreter'
for architecture x86_64</tt><tt><br>
</tt><tt>clang: error: linker command failed with exit code 1 (use
-v to see invocation)</tt><tt><br>
</tt></p>
<p><tt><br>
</tt></p>
<p><tt>Right now, I am able to build wheels only by leaving the
PYTHON_LIBRARY entry blank. This means that the
libvtkPythonInterpreter-8.2.1.dylib does indeed link to the
libpythonx.y.dylib. </tt><tt><br>
</tt></p>
<p><tt>However, I do notice that the other libvtk*Python*8.2.1.dylib
do not link to libpython. So libvtkPythonInterpreter is the
only one linking to libpython. So I think maybe if a user never
uses the libvtkPythonInterpreter or if that is never explicitly
imported or linked to in any Python code, we may be fine with
these wheels. Also I see that none of the Python extension
modules, i.e. all the vtk*Python.so do not link to libpython or
to libvtkPythonInterpreter.<br>
</tt></p>
<p><tt>Should I just ignore the libvtkPythonInterpreter and leave
the PYTHON_LIBRARY field blank?</tt><tt><br>
</tt></p>
<p><tt>I would appreciate your thoughts on this matter. Thanks!<br>
</tt></p>
<p><tt>cheers,</tt></p>
<p><tt>Prabhu</tt><tt><br>
</tt></p>
</div>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Sreekanth Arikatla, Ph.D.,</div><div dir="ltr">Senior R&D Engineer,</div><div dir="ltr"><a href="http://www.kitware.com" style="font-size:12.8px" target="_blank">Kitware, Inc.</a>, Carrboro, NC.<div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>