<div dir="ltr">Confirming that setting LDFLAGS as above just for the GDAL configure-and-build resolves the problem.<div><br></div><div>Our build guy thinks it's a little hacky, so I'd like to ask again what changed that made this necessary.</div><div><br></div><div>This was all on Ubuntu 18.04, by the way. I need to try it on our other supported Linux flavors too...</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 15, 2019 at 12:52 PM Jim Klassen <<a href="mailto:klassen.js@gmail.com">klassen.js@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
I know I am late to the party, but I ran into the same thing today
(Building Proj 6, GDAL 3 on Debian Stretch). I got around it by
setting LDFLAGS before running ./configure so the linker finds the
proj 6 install first. Without setting LDFLAGS, ./configure would
find the new proj, but libtool would try to link to the system one
(by full path no less, not just -lproj).<br>
<br>
So assuming proj 6 (and GDAL) is installed in $INSTALL_DIR:<br>
<br>
export LDFLAGS="-L${INSTALL_DIR}/lib -Wl,-rpath,${INSTALL_DIR}/lib"<br>
./configure \<br>
--prefix="${INSTALL_DIR}" \<br>
--with-proj="${INSTALL_DIR}" <br>
<br>
I'm not sure if it matters, but I also set
CMAKE_INSTALL_RPATH=$INSTALL_DIR when I build proj.<br>
<p><br>
</p>
<div class="gmail-m_2877067803592212886moz-cite-prefix">On 5/8/19 6:54 PM, Simon Eves wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">I removed the system libgdal-dev and proj-bin, and
then this sequence worked, with ldd showing the local proj, and
the apps all compile.
<div><br>
</div>
<div>Still convinced I'm doing something stupid and n00b, but
what? Why didn't the local proj DSO take priority before?</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, May 8, 2019 at 9:29 AM
Simon Eves <<a href="mailto:simon.eves@omnisci.com" target="_blank">simon.eves@omnisci.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div>$ ls -l /home/simon.eves/scratch/gdal3/install/lib/</div>
<div>total 107536</div>
<div>-rw-r--r-- 1 simon.eves mapd 79490260 May 8 09:06
libproj.a</div>
<div>-rwxr-xr-x 1 simon.eves mapd 998 May 8 09:06 <a href="http://libproj.la" target="_blank">libproj.la</a></div>
<div>lrwxrwxrwx 1 simon.eves mapd 17 May 8 09:06
libproj.so -> libproj.so.15.0.0</div>
<div>lrwxrwxrwx 1 simon.eves mapd 17 May 8 09:06
libproj.so.15 -> libproj.so.15.0.0</div>
<div>-rwxr-xr-x 1 simon.eves mapd 30610584 May 8 09:06
libproj.so.15.0.0</div>
<div>drwxr-xr-x 2 simon.eves mapd 4096 May 8 09:06
pkgconfig</div>
<div><br>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, May 8, 2019 at
9:25 AM Simon Eves <<a href="mailto:simon.eves@omnisci.com" target="_blank">simon.eves@omnisci.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>No, it shows
/usr/lib/x86_64-linux-gnu/libproj.sso.12 (the
system-installed Proj 5.2.0)</div>
<div><br>
</div>
<div>I just did it all again from scratch...<br>
</div>
<div><br>
</div>
<div>
<div>$ echo $LD_LIBRARY_PATH <br>
</div>
<div>
<div>/home/simon.eves/scratch/gdal3/install/lib:/usr/local/mapd-deps/lib64:/usr/local/mapd-deps/lib:/usr/local/cuda/lib64</div>
</div>
<div>$ cd /home/simon.eves/scratch/gdal3/<br>
</div>
<div>$ rm -rf gdal-3.0.0 proj-6.0.0 install/*<br>
</div>
<div>$ tar xzvf proj-6.0.0.tar.gz <br>
</div>
<div>$ cd proj-6.0.0/</div>
<div>$ ./configure
--prefix=/home/simon.eves/scratch/gdal3/install</div>
<div>$ make -j12</div>
<div>[completes]</div>
<div>$ make install</div>
<div>[completes]</div>
<div>$ cd ..<br>
</div>
<div>$ tar xvf gdal-3.0.0rc2.tar <br>
</div>
<div>$ cd gdal-3.0.0/</div>
<div>$ ./configure
--prefix=/home/simon.eves/scratch/gdal3/install
--without-geos
--with-kml=/usr/local/mapd-deps
--with-proj=/home/simon.eves/scratch/gdal3/install</div>
<div>[completes, shows Proj >= 6.0 yes]</div>
<div>$ make -j12</div>
</div>
<div>[fails in first app as before]</div>
<div>
<div>$ ldd .libs/libgdal.so | grep proj</div>
<div>libproj.so.12 =>
/usr/lib/x86_64-linux-gnu/libproj.so.12
(0x00007f3d98cb3000)</div>
</div>
<div><br>
</div>
<div>What am I doing wrong, such that the
combination of $LD_LIBRARY_PATH priority and
--with-proj still isn't making GDAL see the
local Proj before the system one?</div>
<div><br>
</div>
<div>Simon</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, May 8, 2019 at
12:41 AM Even Rouault <<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On mardi 7 mai 2019
16:42:41 CEST Simon Eves wrote:<br>
> That's what I have, even if that's not what I
wrote.<br>
> <br>
> <a class="gmail-m_2877067803592212886moz-txt-link-abbreviated" href="mailto:simon.eves@football:~/scratch/gdal3/gdal-3.0.0$" target="_blank">simon.eves@football:~/scratch/gdal3/gdal-3.0.0$</a>
echo $LD_LIBRARY_PATH<br>
>
/home/simon.eves/scratch/gdal3/install/lib:/usr/local/mapd-deps/lib64:/usr/l<br>
> ocal/mapd-deps/lib:/usr/local/cuda/lib64:<br>
> <a class="gmail-m_2877067803592212886moz-txt-link-abbreviated" href="mailto:simon.eves@football:~/scratch/gdal3/gdal-3.0.0$" target="_blank">simon.eves@football:~/scratch/gdal3/gdal-3.0.0$</a>
./configure --without-geos<br>
> --with-libkml=/usr/local/mapd-deps<br>
>
--with-proj=/home/simon.eves/scratch/gdal3/install<br>
> ...<br>
> <a class="gmail-m_2877067803592212886moz-txt-link-abbreviated" href="mailto:simon.eves@football:~/scratch/gdal3/gdal-3.0.0$" target="_blank">simon.eves@football:~/scratch/gdal3/gdal-3.0.0$</a>
make<br>
> ...<br>
> (cd apps; make)<br>
> make[1]: Entering directory
'/home/simon.eves/scratch/gdal3/gdal-3.0.0/apps'<br>
> /bin/bash
/home/simon.eves/scratch/gdal3/gdal-3.0.0/libtool
--mode=link<br>
> --silent g++ gdalinfo_bin.lo
/home/simon.eves/scratch/gdal3/gdal-3.0.0/<br>
> <a href="http://libgdal.la" rel="noreferrer" target="_blank">libgdal.la</a>
-o gdalinfo<br>
>
/home/simon.eves/scratch/gdal3/gdal-3.0.0/.libs/libgdal.so:
undefined<br>
> reference to `proj_alter_name'<br>
> [etc.]<br>
<br>
Look at the output of<br>
<br>
ldd
/home/simon.eves/scratch/gdal3/gdal-3.0.0/.libs/libgdal.so
| grep proj<br>
<br>
It should normally point to the libproj.so.15 of<br>
/home/simon.eves/scratch/gdal3/install/lib<br>
<br>
-- <br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail-m_2877067803592212886gmail-m_4214021502878222289gmail-m_5498066297828420502gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div style="margin:0px;padding:0px 0px 20px;width:2544px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:medium">
<div>
<div style="font-size:12.8px;margin:8px 0px 0px;padding:0px">
<div>
<div dir="ltr"><span><font color="#888888">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<table style="font-family:Times;width:2544px" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="vertical-align:top;font-size:0px" align="left">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="padding:0px 15px 0px 0px;vertical-align:middle" align="left"><font size="2" face="arial,
helvetica,
sans-serif"><a href="http://www.omnisci.com/" target="_blank"><img src="http://www2.omnisci.com/l/298412/2018-09-18/3sqpg/298412/61753/OmniSci_Email_Header2.png"></a><br>
</font></td>
<td style="padding:0px 0px 0px 15px;vertical-align:top" align="left">
<table style="width:215px" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="vertical-align:top" align="left"><span style="white-space:nowrap;color:rgb(0,0,1)"><span style="color:rgb(14,76,144);font-weight:700"><font size="2" face="arial,
helvetica,
sans-serif">Simon
Eves</font></span></span></td>
</tr>
<tr>
<td style="vertical-align:top" align="left">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="vertical-align:top" align="left"><span style="white-space:nowrap;color:rgb(0,0,1)"><font size="2" face="arial,
helvetica,
sans-serif">Senior
Graphics
Engineer,
Rendering
Group<br>
OmniSci, 1
Front St.
#2650, San
Francisco, CA
94111, USA<br>
</font></span></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="vertical-align:top" align="left">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="padding:0px;vertical-align:top" align="left"><br>
</td>
<td style="padding:0px;vertical-align:top" align="left"><br>
</td>
</tr>
<tr>
<td style="padding:0px;vertical-align:top" align="left"><span style="white-space:nowrap;color:rgb(0,0,1)"><font size="2" face="arial,
helvetica,
sans-serif">Email: <a href="mailto:simon.eves@omnisci.com" target="_blank">simon.eves@omnisci.com</a> |
Cell: </font></span></td>
<td style="padding:0px;vertical-align:top" align="left"><span style="white-space:nowrap;color:rgb(0,0,1)"><font size="2" face="arial,
helvetica,
sans-serif">415.902.1996</font></span></td>
</tr>
</tbody>
</table>
<br>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail-m_2877067803592212886gmail-m_4214021502878222289gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div style="margin:0px;padding:0px 0px 20px;width:2544px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:medium">
<div>
<div style="font-size:12.8px;margin:8px 0px 0px;padding:0px">
<div>
<div dir="ltr"><span><font color="#888888">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<table style="font-family:Times;width:2544px" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="vertical-align:top;font-size:0px" align="left">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="padding:0px 15px 0px 0px;vertical-align:middle" align="left"><font size="2" face="arial,
helvetica,
sans-serif"><a href="http://www.omnisci.com/" target="_blank"><img src="http://www2.omnisci.com/l/298412/2018-09-18/3sqpg/298412/61753/OmniSci_Email_Header2.png"></a><br>
</font></td>
<td style="padding:0px 0px 0px 15px;vertical-align:top" align="left">
<table style="width:215px" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="vertical-align:top" align="left"><span style="white-space:nowrap;color:rgb(0,0,1)"><span style="color:rgb(14,76,144);font-weight:700"><font size="2" face="arial,
helvetica,
sans-serif">Simon
Eves</font></span></span></td>
</tr>
<tr>
<td style="vertical-align:top" align="left">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="vertical-align:top" align="left"><span style="white-space:nowrap;color:rgb(0,0,1)"><font size="2" face="arial,
helvetica,
sans-serif">Senior
Graphics
Engineer,
Rendering
Group<br>
OmniSci, 1
Front St.
#2650, San
Francisco, CA
94111, USA<br>
</font></span></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="vertical-align:top" align="left">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="padding:0px;vertical-align:top" align="left"><br>
</td>
<td style="padding:0px;vertical-align:top" align="left"><br>
</td>
</tr>
<tr>
<td style="padding:0px;vertical-align:top" align="left"><span style="white-space:nowrap;color:rgb(0,0,1)"><font size="2" face="arial,
helvetica,
sans-serif">Email: <a href="mailto:simon.eves@omnisci.com" target="_blank">simon.eves@omnisci.com</a> |
Cell: </font></span></td>
<td style="padding:0px;vertical-align:top" align="left"><span style="white-space:nowrap;color:rgb(0,0,1)"><font size="2" face="arial,
helvetica,
sans-serif">415.902.1996</font></span></td>
</tr>
</tbody>
</table>
<br>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail-m_2877067803592212886gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div style="margin:0px;padding:0px 0px 20px;width:2544px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:medium">
<div>
<div style="font-size:12.8px;margin:8px 0px 0px;padding:0px">
<div>
<div dir="ltr"><span><font color="#888888">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<table style="font-family:Times;width:2544px" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="vertical-align:top;font-size:0px" align="left">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="padding:0px 15px 0px 0px;vertical-align:middle" align="left"><font size="2" face="arial,
helvetica,
sans-serif"><a href="http://www.omnisci.com/" target="_blank"><img src="http://www2.omnisci.com/l/298412/2018-09-18/3sqpg/298412/61753/OmniSci_Email_Header2.png"></a><br>
</font></td>
<td style="padding:0px 0px 0px 15px;vertical-align:top" align="left">
<table style="width:215px" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="vertical-align:top" align="left"><span style="white-space:nowrap;color:rgb(0,0,1)"><span style="color:rgb(14,76,144);font-weight:700"><font size="2" face="arial,
helvetica,
sans-serif">Simon
Eves</font></span></span></td>
</tr>
<tr>
<td style="vertical-align:top" align="left">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="vertical-align:top" align="left"><span style="white-space:nowrap;color:rgb(0,0,1)"><font size="2" face="arial,
helvetica,
sans-serif">Senior
Graphics
Engineer,
Rendering
Group<br>
OmniSci, 1
Front St.
#2650, San
Francisco, CA
94111, USA<br>
</font></span></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="vertical-align:top" align="left">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="padding:0px;vertical-align:top" align="left"><br>
</td>
<td style="padding:0px;vertical-align:top" align="left"><br>
</td>
</tr>
<tr>
<td style="padding:0px;vertical-align:top" align="left"><span style="white-space:nowrap;color:rgb(0,0,1)"><font size="2" face="arial,
helvetica,
sans-serif">Email: <a href="mailto:simon.eves@omnisci.com" target="_blank">simon.eves@omnisci.com</a> |
Cell: </font></span></td>
<td style="padding:0px;vertical-align:top" align="left"><span style="white-space:nowrap;color:rgb(0,0,1)"><font size="2" face="arial,
helvetica,
sans-serif">415.902.1996</font></span></td>
</tr>
</tbody>
</table>
<br>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="gmail-m_2877067803592212886mimeAttachmentHeader"></fieldset>
<pre class="gmail-m_2877067803592212886moz-quote-pre">_______________________________________________
gdal-dev mailing list
<a class="gmail-m_2877067803592212886moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>
<a class="gmail-m_2877067803592212886moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></pre>
</blockquote>
</div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="margin:0px;padding:0px 0px 20px;width:2544px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:medium"><div><div style="font-size:12.8px;margin:8px 0px 0px;padding:0px"><div><div dir="ltr"><span><font color="#888888"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><table cellpadding="0" cellspacing="0" border="0" style="font-family:Times;width:2544px"><tbody><tr><td align="left" style="vertical-align:top;font-size:0px"><table cellpadding="0" cellspacing="0" border="0"><tbody><tr><td align="left" style="padding:0px 15px 0px 0px;vertical-align:middle"><font face="arial, helvetica, sans-serif" size="2"><a href="http://www.omnisci.com/" target="_blank"><img src="http://www2.omnisci.com/l/298412/2018-09-18/3sqpg/298412/61753/OmniSci_Email_Header2.png"></a><br></font></td><td align="left" style="padding:0px 0px 0px 15px;vertical-align:top"><table cellpadding="0" cellspacing="0" border="0" style="width:215px"><tbody><tr><td align="left" style="vertical-align:top"><span style="white-space:nowrap;color:rgb(0,0,1)"><span style="color:rgb(14,76,144);font-weight:700"><font face="arial, helvetica, sans-serif" size="2">Simon Eves</font></span></span></td></tr><tr><td align="left" style="vertical-align:top"><table cellpadding="0" cellspacing="0" border="0"><tbody><tr><td align="left" style="vertical-align:top"><span style="white-space:nowrap;color:rgb(0,0,1)"><font face="arial, helvetica, sans-serif" size="2">Senior Graphics Engineer, Rendering Group<br>OmniSci, 1 Front St. #2650, San Francisco, CA 94111, USA<br></font></span></td></tr></tbody></table></td></tr><tr><td align="left" style="vertical-align:top"><table cellpadding="0" cellspacing="0" border="0"><tbody><tr><td align="left" style="padding:0px;vertical-align:top"><br></td><td align="left" style="padding:0px;vertical-align:top"><br></td></tr><tr><td align="left" style="padding:0px;vertical-align:top"><span style="white-space:nowrap;color:rgb(0,0,1)"><font face="arial, helvetica, sans-serif" size="2">Email: <a href="mailto:simon.eves@omnisci.com" target="_blank">simon.eves@omnisci.com</a> | Cell: </font></span></td><td align="left" style="padding:0px;vertical-align:top"><span style="white-space:nowrap;color:rgb(0,0,1)"><font face="arial, helvetica, sans-serif" size="2">415.902.1996</font></span></td></tr></tbody></table><br></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table><br></div></div></div></div></div></div></div></div></div></div></font></span></div><div></div></div></div><div></div></div></div></div></div></div></div>