<div dir="ltr">Hi Dan,<div><br></div><div>I'm trying to figure out the issue I detail here:<br></div><div><a href="http://osgeo-org.1560.x6.nabble.com/Failed-to-initialize-PROJ-4-with-quot-quot-td5338323.html" target="_blank">http://osgeo-org.1560.x6.<wbr>nabble.com/Failed-to-<wbr>initialize-PROJ-4-with-quot-<wbr>quot-td5338323.html</a><br></div><div><a href="http://osgeo-org.1560.x6.nabble.com/gdal-dev-ERROR-6-Failed-to-initialize-PROJ-4-with-quot-quot-td5338107.html" target="_blank">http://osgeo-org.1560.x6.<wbr>nabble.com/gdal-dev-ERROR-6-<wbr>Failed-to-initialize-PROJ-4-<wbr>with-quot-quot-td5338107.html</a><br></div><div><br></div><div>Effectively the error is that GDAL seems to call the incorrect library/something happens, and the projection fails.</div><div><br></div><div><div style="font-size:12.8px">In an effort to resolve this I was looking at my binary via LDD and found</div><div style="font-size:12.8px"><div>$ ldd ~/build-release/bin/Release/<wbr>CHM | grep proj4</div><div>        libvtkproj4-8.0.so.1 => /home/cmarsh/build-release/<wbr>lib/VTK/lib/libvtkproj4-8.0.<wbr>so.1 (0x00002b517aa36000)</div><div>        libproj.so.0 => /home/cmarsh/build-release/<wbr>lib/proj4/lib/libproj.so.0 (0x00002b51944d2000)</div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">If I use patchelf (<a href="https://github.com/NixOS/patchelf" target="_blank">https://github.com/NixOS/<wbr>patchelf</a>) to strip libvtkproj4-8.0.so.1 from my binary, my code runs without the error.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I don't quite understand why I don't have this problem on other machines though. Looking at other machines I compile on (using a custom VTK build) I don't see any reference to the VTK libproj4 via ldd.</div><div style="font-size:12.8px"><br></div></div><div>Thus I attributed the error to vtkproj4 inclusion. However if you mangle names, then I agree I don't understand why this is happening. </div><div><br></div><div>Cheers</div><div>Chris</div><div class="gmail_extra"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><br style="color:rgb(102,102,102)"></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On 12 January 2018 at 09:35, Dan Lipsa <span dir="ltr"><<a href="mailto:dan.lipsa@kitware.com" target="_blank">dan.lipsa@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Chris,<div><br></div><div>1. Going back to the beginning of the thread, I don't understand why vtklibproj conflicts with another proj, given that we mangle all names. Can you send us the errors.</div><div><br></div><div>2. If you do want to build with the system proj4</div><div><br></div><div><div>Can you send up the output of:</div><div><div>cat CMakeCache.txt | grep LIBPROJ</div></div><div><br></div><div>This is what I have:</div><div><div>LIBPROJ4_INCLUDE_DIR:PATH=/<wbr>usr/include</div><div>LIBPROJ4_LIBRARIES:FILEPATH=/<wbr>usr/lib/x86_64-linux-gnu/<wbr>libproj.so.12</div><div>LIBPROJ_BINDIR:PATH=bin</div><div>LIBPROJ_DATADIR:PATH=share/<wbr>proj</div><div>LIBPROJ_DOCDIR:PATH=doc/proj</div><div>LIBPROJ_INCLUDEDIR:PATH=<wbr>include</div><div>LIBPROJ_LIBDIR:PATH=lib</div><div>LIBPROJ_M_LIB:FILEPATH=/usr/<wbr>lib/x86_64-linux-gnu/libm.so</div><div>LIBPROJ_USE_THREAD:BOOL=ON</div><div>//Use system-installed LIBPROJ4</div><div>VTK_USE_SYSTEM_LIBPROJ4:BOOL=<wbr>ON</div><div>//ADVANCED property for variable: LIBPROJ4_INCLUDE_DIR</div><div>LIBPROJ4_INCLUDE_DIR-ADVANCED:<wbr>INTERNAL=1</div><div>//ADVANCED property for variable: LIBPROJ4_LIBRARIES</div><div>LIBPROJ4_LIBRARIES-ADVANCED:<wbr>INTERNAL=1</div><div>//MODIFIED property for variable: LIBPROJ4_LIBRARIES</div><div>LIBPROJ4_LIBRARIES-MODIFIED:<wbr>INTERNAL=ON</div><div>//ADVANCED property for variable: LIBPROJ_BINDIR</div><div>LIBPROJ_BINDIR-ADVANCED:<wbr>INTERNAL=1</div><div>//ADVANCED property for variable: LIBPROJ_DATADIR</div><div>LIBPROJ_DATADIR-ADVANCED:<wbr>INTERNAL=1</div><div>//ADVANCED property for variable: LIBPROJ_DOCDIR</div><div>LIBPROJ_DOCDIR-ADVANCED:<wbr>INTERNAL=1</div><div>//ADVANCED property for variable: LIBPROJ_INCLUDEDIR</div><div>LIBPROJ_INCLUDEDIR-ADVANCED:<wbr>INTERNAL=1</div><div>//ADVANCED property for variable: LIBPROJ_LIBDIR</div><div>LIBPROJ_LIBDIR-ADVANCED:<wbr>INTERNAL=1</div><div>//ADVANCED property for variable: LIBPROJ_M_LIB</div><div>LIBPROJ_M_LIB-ADVANCED:<wbr>INTERNAL=1</div><div>//ADVANCED property for variable: LIBPROJ_USE_THREAD</div><div>LIBPROJ_USE_THREAD-ADVANCED:<wbr>INTERNAL=1</div><div>//ADVANCED property for variable: VTK_USE_SYSTEM_LIBPROJ4</div><div>VTK_USE_SYSTEM_LIBPROJ4-<wbr>ADVANCED:INTERNAL=1</div><div>//MODIFIED property for variable: VTK_USE_SYSTEM_LIBPROJ4</div><div>VTK_USE_SYSTEM_LIBPROJ4-<wbr>MODIFIED:INTERNAL=ON</div></div><div><br></div><div><br></div><div>Make sure </div><div>LIBPROJ4_INCLUDE_DIR<br></div><div>LIBPROJ4_LIBRARIES<br></div><div>VTK_USE_SYSTEM_LIBPROJ4<br></div><div>have the correct values.</div><div><br></div><div>All those are cmake variables, you change them using ccmake or cmake-gui.</div><div>After that you call:</div><div><br></div><div>cmake .</div><div>make</div><div><br></div><div><br></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 12, 2018 at 9:15 AM, Aashish Chaudhary <span dir="ltr"><<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a><wbr>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dan Lipsa made last changes perhaps he may have some suggestions. <span class="m_-7586546888782119829HOEnZb"><font color="#888888"><div><br></div></font></span><div><span class="m_-7586546888782119829HOEnZb"><font color="#888888">- aashish<br><br></font></span><div class="gmail_quote"><div><div class="m_-7586546888782119829h5"><div dir="ltr">On Thu, Jan 11, 2018 at 7:41 PM Chris Marsh <<a href="mailto:chris.marsh@usask.ca" target="_blank">chris.marsh@usask.ca</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-7586546888782119829h5"><div dir="ltr">Looks like something is setting <div><div>PROJ4_INCLUDE_DIR </div><div>PROJ4_LIBRARY </div></div><div>to the system's proj4. I use a custom findproj4 that only looks where I tell it. <br></div><div><br></div><div>then I see that </div><div>LIB_FILES:INTERNAL<br></div><div>contains vtkproj4</div><div>LIB_FILES just holds all my 3rd party libraries I need to link against.</div></div><div class="gmail_extra"><br clear="all"><div><div class="m_-7586546888782119829m_713488070064000649m_-4335495123984649302gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span style="color:rgb(102,102,102)">Chris Marsh</span><br style="color:rgb(102,102,102)"><span style="color:rgb(102,102,102)">PhD Candidate</span><br style="color:rgb(102,102,102)"><span style="color:rgb(102,102,102)"></span><a href="http://chrismarsh.ca/" style="color:rgb(102,102,102)" target="_blank">chrismarsh.ca</a><br style="color:rgb(102,102,102)"><br style="color:rgb(102,102,102)"><span style="color:rgb(102,102,102)"><a href="https://maps.google.com/?q=121+Research+Drive+University+of+Saskatchewan&entry=gmail&source=g" target="_blank">121 Research Drive</a></span><br style="color:rgb(102,102,102)"><span style="color:rgb(102,102,102)"><a href="https://maps.google.com/?q=121+Research+Drive+University+of+Saskatchewan&entry=gmail&source=g" target="_blank">University of Saskatchewan</a></span><br style="color:rgb(102,102,102)"></div></div></div></div></div></div></div></div></div></div><div class="gmail_extra">
<br><div class="gmail_quote">On 11 January 2018 at 13:29, Ben Boeckel <span dir="ltr"><<a href="mailto:ben.boeckel@kitware.com" target="_blank">ben.boeckel@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Thu, Jan 11, 2018 at 11:41:40 -0600, Chris Marsh wrote:<br>
> Thanks for the details. This doesn't seem to be working for me though. I've<br>
> tried passing VTK_USE_SYSTEM_libproj4 to cmake on the command line as well<br>
> as defining it as a CXXFLAG='-D VTK_USE_SYSTEM_libproj4", however neither<br>
> works. I still see the vtklibproj4 in the output of ldd.<br>
<br>
</span>CMake should be getting the flag. If you do:<br>
<br>
    grep -i proj4 CMakeCache.txt<br>
<br>
do any variables stand out as potentially being set to use the internal<br>
one?<br>
<span class="m_-7586546888782119829m_713488070064000649m_-4335495123984649302HOEnZb"><font color="#888888"><br>
--Ben<br>
</font></span></blockquote></div><br></div></div></div><span>
______________________________<wbr>_________________<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/opensou<wbr>rce/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://vtk.org/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://vtk.org/mailman/listin<wbr>fo/vtkusers</a><br>
</span></blockquote></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>