<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Alan,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Did you used --without-libtool on ./configure?</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
If you do that, I believe that the file ./apps/gdalinfo and all other executables will be real executables and the makefiles will call "install_name_tool" to register the libgdal.dylib on the executables. In that case DYLD_LIBRARY_PATH will be ignored.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
But, if you don't use --without-libtool on ./configure, that means you *do use libtool* and a lot of other interesting things will happen. Like, for example, <span style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; background: var(--white);">the
 files that we think that are executables are not:</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px;">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: "Courier New", monospace;">$ file apps/gdalinfo</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: "Courier New", monospace;">apps/gdalinfo: POSIX shell script text executable, ASCII text</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: "Courier New", monospace;">$ more apps/gdalinfo</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><span style="font-family: "Courier New", monospace;">#! /bin/sh</span></span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>
<div><br>
</div>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>
<div><span style="font-family: "Courier New", monospace;"># gdalinfo - temporary wrapper script for .libs/gdalinfo</span></div>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>
<div><span style="font-family: "Courier New", monospace;"># Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-0.1</span></div>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>
<div><span style="font-family: "Courier New", monospace;">#</span></div>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>
<div><span style="font-family: "Courier New", monospace;"># The gdalinfo program cannot be directly executed until all the libtool</span></div>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>
<div><span style="font-family: "Courier New", monospace;"># libraries that it depends on are installed.</span></div>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>
<div><span style="font-family: "Courier New", monospace;">#</span></div>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>
<div><span style="font-family: "Courier New", monospace;"># This wrapper script should never be moved out of the build directory.</span></div>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>
<div><span style="font-family: "Courier New", monospace;"># If it is, it will not operate correctly.</span></div>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>
<div><br>
</div>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>
<div><span style="font-family: "Courier New", monospace;"># Sed substitution that helps us do robust quoting.  It backslashifies</span></div>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><span style="font-family: "Courier New", monospace;"># metacharacters that are still active within double-quoted strings.</span></span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><span style="font-family: "Courier New", monospace;">...</span></span></div>
</blockquote>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
This is just the initial comments (whatever they means by "libtool libraries are installed") and there is a lot of lines trying to set and reset DYLD_LIBRARY_PATH. T<span style="background: var(--white);">he real executable will be generated on this other folder:</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><span><br>
</span></span></div>
<blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px;">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><span><span style="font-family: "Courier New", monospace;">$ file apps/.libs/gdalinfo</span></span></span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><span><span style="font-family: "Courier New", monospace;">apps/.libs/gdalinfo: Mach-O 64-bit executable x86_64</span></span></span></div>
</blockquote>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><span><span><br>
</span></span></span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
But once you run "make install" the makefiles will generated a "clean" distribution folder where the executable are real executables.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
In either way, with or without libtool, the key point is that DYLD_LIBRARY_PATH on MacOS is becoming deprecated or even useless as it is preceded by whatever "install_name_tool" defines.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
One tools that you can use to figure out where the executable is getting the shared libraries from is "otool", for example:</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px;">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div style="margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt">
<span style="margin: 0px"><span style="margin: 0px"><span style="margin: 0px; font-family: "Courier New", monospace">$ otool -L apps/.libs/gdalinfo</span></span></span></div>
</div>
</blockquote>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
And then I believe you can use "install_name_path" to delete the rpath that you disagree with. Maybe DYLD_LIBRARY_PATH will work then. If you really need.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
That is my experience with setdevenv.sh on MacOS in regard to the DYLD_LIBRARY_PATH variable. </div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I am sure you can find a lot of discussions on that theme over the web, for example</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<a href="https://superuser.com/questions/282450/where-do-i-set-dyld-library-path-on-mac-os-x-and-is-it-a-good-idea" id="LPNoLP775697">https://superuser.com/questions/282450/where-do-i-set-dyld-library-path-on-mac-os-x-and-is-it-a-good-idea</a> </div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<a href="https://blogs.oracle.com/dipol/dynamic-libraries,-rpath,-and-mac-os" id="LPNoLP881676">https://blogs.oracle.com/dipol/dynamic-libraries,-rpath,-and-mac-os</a></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Good luck,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Ivan</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><span><br>
</span></span></div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> gdal-dev <gdal-dev-bounces@lists.osgeo.org> on behalf of Alan Stewart <astewart@terragotech.com><br>
<b>Sent:</b> Tuesday, January 15, 2019 2:00 PM<br>
<b>To:</b> Even Rouault<br>
<b>Cc:</b> gdal-dev@lists.osgeo.org<br>
<b>Subject:</b> Re: [gdal-dev] osx compile failure</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Disabling SIP makes no difference.<br>
<br>
Alan Stewart<br>
Senior Software Engineer<br>
TerraGo Technologies<br>
3200 Windy Hill Road, Suite 1550W<br>
Atlanta, GA 30339 USA<br>
O.  +1 678.391.9615<br>
 <br>
<a href="http://www.terragotech.com">www.terragotech.com</a><br>
<br>
-----Original Message-----<br>
From: Even Rouault <even.rouault@spatialys.com> <br>
Sent: Monday, January 14, 2019 3:38 PM<br>
To: Alan Stewart <astewart@terragotech.com><br>
Cc: gdal-dev@lists.osgeo.org<br>
Subject: Re: [gdal-dev] osx compile failure<br>
<br>
On lundi 14 janvier 2019 20:25:42 CET Alan Stewart wrote:<br>
> DYLD_LIBRARY_PATH<br>
<br>
Maybe an effect of the SIP thing you'd need to disable ?<br>
<a href="https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/RuntimeProtections/RuntimeProtections.html">https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/RuntimeProtections/RuntimeProtections.html</a><br>
<br>
--<br>
Spatialys - Geospatial professional services <a href="http://www.spatialys.com">http://www.spatialys.com</a><br>
_______________________________________________<br>
gdal-dev mailing list<br>
gdal-dev@lists.osgeo.org<br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></div>
</span></font></div>
</body>
</html>