<div dir="ltr">We did not build shared libraries for ITK and our <font face="monospace, monospace">CMAKE_ARCHIVE_OUTPUT_DIRECTORY=${NAMICExtBuild}/lib</font>, which is already on my <font face="monospace, monospace">DYLD_LIBRARY_PATH </font><font face="arial, helvetica, sans-serif">(this is set via </font><font face="monospace, monospace">postactivate</font><font face="arial, helvetica, sans-serif"> in the virtualenv). </font><div><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div><span style="font-family:arial,helvetica,sans-serif">We use the </span><font face="monospace, monospace">RPATH</font><span style="font-family:arial,helvetica,sans-serif">, but there are no additional paths via </span><font face="monospace, monospace">DYLD_LIBRARY_PATH</font><span style="font-family:arial,helvetica,sans-serif"> at compile time, AFAIK. </span><br></div><div><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div><font face="arial, helvetica, sans-serif">With some more investigation, this build was compiled inside an Anaconda environment so I'll see if I can tease out the issue. In the meanwhile, here's the SimpleITK CMakeCache file.</font></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">Cheers,<div>Dave<br></div></div></div></div>
<br><div class="gmail_quote">On Mon, Jul 13, 2015 at 2:38 PM, Bradley Lowekamp <span dir="ltr"><<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hello David,<div><br></div><div>I am going to guess that you compiled ITK with shared libraries?</div><div><br></div><div>Most likely python couldn't resolve the ITK library dependencies when it tried to load _SimpleITK.so.</div><div><br></div><div>Try adding the ITK library directory to you LD_LIBRARY_PATH environment variable.</div><div><br></div><div>I am also going to guess that you are relying on CMake setting the RPATH for the libraries based on the build directory for you other projects. SimpleITK explicitly disables this [1], to enable language based packaging from the build tree without using CMake to modify the RPATH. Your case may be a reasonable option to allow the user to configure a default for SKIP_BUILD_RPATH for SimpleITK, but I am not completely sure of the expected and reasonable behavior for this. Nor if anyone else would know how to do it.</div><div><br></div><div>HTH,</div><div>Brad</div><div><br></div><div>[1] <a href="https://github.com/SimpleITK/SimpleITK/blob/master/Code/BasicFilters/src/CMakeLists.txt#L109" target="_blank">https://github.com/SimpleITK/SimpleITK/blob/master/Code/BasicFilters/src/CMakeLists.txt#L109</a></div><div><br><div><div><div class="h5"><div>On Jul 13, 2015, at 2:55 PM, David Welch <<a href="mailto:david.m.welch@gmail.com" target="_blank">david.m.welch@gmail.com</a>> wrote:</div><br></div></div><blockquote type="cite"><div><div class="h5"><div dir="ltr">Hi Brad, <div><br></div><div>I've built a virtualenv using virtualenvwrapper to use SimpleITK (built using NAMICExternalProjects). <span style="font-family:arial,helvetica,sans-serif">For reproducibility, we'd like to use only dependencies within the </span><span style="font-family:monospace,monospace">${NAMICExtBuild}</span><font face="arial, helvetica, sans-serif"> directory, which makes most of the online installation instructions invalid, AFAIK. </font></div><div><br></div><div>I've prepend the sys.path like so:</div><div><br></div><div><font face="monospace, monospace">add2virtualenv ${NAMICExtBuild}/SimpleITK-build/bin</font></div><div><span style="font-family:monospace,monospace">add2virtualenv</span><span style="font-family:monospace,monospace"> </span><font face="monospace, monospace">${NAMICExtBuild}/SimpleITK-build/lib</font></div><div><span style="font-family:monospace,monospace">add2virtualenv</span><span style="font-family:monospace,monospace"> </span><font face="monospace, monospace">${NAMICExtBuild}/SimpleITK-build/Wrapping</font></div><div><br></div><div>This writes to the <font face="monospace, monospace">$VIRTUAL_ENV/lib/site_packages/_virtualenv_path_extensions.pth</font> file (used by virtualenvwrapper to manage package/module paths). </div><div><br></div><div>I have also tried: </div><div><br></div><div><font face="monospace, monospace">python $</font><span style="font-family:monospace,monospace">{NAMICExtBuild}/SimpleITK-build/Wrapping/PythonPackage/setupegg.py install</span></div><div><font face="monospace, monospace"><br></font></div><div><font face="arial, helvetica, sans-serif">within my virtualenv, but no such luck. Any suggestions? </font></div><div><font face="arial, helvetica, sans-serif"><br></font><div><div><div dir="ltr">Cheers,<div>Dave<br></div></div></div></div>
</div></div></div></div>
_____________________________________<br>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br><a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br><br>Please keep messages on-topic and check the ITK FAQ at:<br><a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://public.kitware.com/mailman/listinfo/insight-users" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>_______________________________________________<br>Community mailing list<br><a href="mailto:Community@itk.org" target="_blank">Community@itk.org</a><br><a href="http://public.kitware.com/mailman/listinfo/community" target="_blank">http://public.kitware.com/mailman/listinfo/community</a><br></blockquote></div><br></div></div></blockquote></div><br></div>