<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Nov 2, 2018 at 4:45 PM Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On vendredi 2 novembre 2018 16:32:29 CET Andrew Bell wrote:<br>
> Hi,<br>
> <br>
> I'm trying to figure out what might be going on with setting things up for<br>
> proj with GDAL. If I set<br>
> --with-proj=/directory/to/where/proj/is/installed, I end up with<br>
> PROJ_STATIC set to true, even though I have no static proj library built (I<br>
> only have libproj.so, no libproj.a in the install directory). Looking at<br>
> <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a>, I'm not seeing anything that would explicitly check for a<br>
> static library at all, just a bunch of checks for a proj library of various<br>
> incarnations in various directories relative to the one I set in<br>
> --with-proj.<br>
> <br>
<br>
The 'static' here is not to be understood as linking against a static library, <br>
but linking at build time against a .a or .so. To be opposed to the default <br>
mode which uses dlopen().<br></blockquote><div><br></div><div>This is confuing. Perhaps changing the name of the macro would be helpful. I could do this if nobody minds.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> At the conclusion of configuration, GDALmake.opt sets LIBS includes the<br>
> proper information to link:<br>
> <br>
> LIBS = ... -L/directory/to/where/proj/is/installed/lib -lproj ...<br>
> <br>
> But no rpath is entered to support locating the proj library when linking<br>
> another project with GDAL, which means that I get errors at link time<br>
> asking for me to add --rpath-link to my link line.<br>
<br>
AFAIK GDAL never sets rpath<br></blockquote><div><br></div><div>In this case, since you're providing a SPECIFIC library path at configuration, it would seem reasonable to store that information in the created GDAL library. Otherwise, I'm not sure what the point is, since you can provide a library search path at link time through the environment.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> What, exactly, is --with-proj supposed to do and how does it interact with<br>
> static linking of proj, assuming I have libproj.a somewhere?<br>
<br>
--with-proj should behave similarly to linking against other libraries if <br>
you've only .so, only .a or both (in later case, not sure which one will be <br>
choosen, but that will be whatever the linker does in those cases)<br></blockquote><div><br></div><div>Why is proj special? Why is it not always linked to the GDAL library like so many other things? Why would one want to dlopen() proj instead of having it located as other libraries are located at link/runtime? I'm sure there's a reason ;)</div><div><br></div><div>Thanks,</div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Andrew Bell<br><a href="mailto:andrew.bell.ia@gmail.com" target="_blank">andrew.bell.ia@gmail.com</a></div></div>