<div dir="ltr">Moving libLAS+Mac+Anaconda discussion to the list.<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 9, 2018 at 12:23 AM, Michael Barton <span dir="ltr"><<a href="mailto:Michael.Barton@asu.edu" target="_blank">Michael.Barton@asu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><br><div>The Anaconda LAS package seems to have all the binary distribution files and libraries built by compiling LAS from source (i.e., those that I bundled previously)--EXCEPT for liblas-config.</div></div></blockquote><div><br></div><div>That's what I'm saying. Open an issue (wherever appropriate) to fix libLAS Anaconda package. Perhaps all you need is a development version of this package if Anaconda packaging is similar to Linux packaging.<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 style="overflow-wrap: break-word;"><div>
 It would be nice if I could build GRASS with LAS support without the need for this file.</div></div></blockquote><div><br></div><div>That seems like a workaround for an upstream issue as opposed to reporting the issue upstream as first step in fixing it. If libLAS is dropping liblas-config a way to get the libraries and headers or of if liblas-config usage in this context is not appropriate (which I can't tell), then yes, we should switch to specifying the libraries manually.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">
<div><br>
</div>
<div>I've looked at liblas-config and can see what it does. But AFAICT, when running v.in.lidar or r.in.lidar, they are only really using the LAS libraries and binary tools las2txt and laszip.</div></div></blockquote><div><br>liblas-config is needed for the compilation of things against libLAS, not for runtime. It's the same as with the C header files, you don't need them during runtime, but you need them for compilation.<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 style="overflow-wrap: break-word;"><div> So perhaps GRASS is not using any of the non-LAS linked
 libraries that laslib-config provides paths to (e.g., boost and gdal).</div></div></blockquote><div><br></div><div>As far as I understand, they are needed for the compilation because libLAS needs them. <br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div> If GRASS actually needs all of the linked files that laslib-config provides, then we can't just use the binaries in the Anaconda LAS tools package.</div></div></blockquote><div><br></div><div>libLAS uses Boost and (I think optionally) GDAL, so I would expect that to be part of the Anaconda package (or installed as a dependency).<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div> The only recourse is to try to recompile
 it in an Anaconda environment and have it create an appropriate laslib-config. A serious pain.</div></div></blockquote><div><br></div><div>I would not do that until you see what the upstream (Anaconda package) people say.<br><br>In the mean time, before the issue is resolved upstream, you can create the liblas-config, youself. It will look something like this:<br></div><div><br>if [ "$1" = "--libs" ]<br>then<br>    echo -L/usr/lib -llas -llas_c -L... /usr/lib/x86_64-linux-gnu/libtiff.so<br>...<br><br></div><div>I'm attaching a full script, but you need to supply the values appropriate for Mac/your computer. Start with what you would put to the --with-liblas-libs=...<br><br></div><div>Unrelated to the Mac issue, I wonder if it is a probable that we are not making use of the --defines option in liblas-config (which gives "-DHAVE_GDAL=1 -DHAVE_LIBGEOTIFF=1", but perhaps it is important only when compiling libLAS binary tools.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">
<div><br>
</div>
<div>But if all GRASS really needs are the LAS binaries and libraries (liblas.dylib on the Mac), then maybe we can just point to the resources it needs.</div></div></blockquote><div><br><br></div><div>Try the attached script to do that. For me GRASS configures successfully when I use it instead of liblas-config:<br><br>--with-liblas="/home/.../fake-liblas-config.sh" <br></div><div><br></div><div>Best,<br></div><div>Vaclav<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">
<div><br>
</div>
<div>Cheers</div>
<div>Michael</div>
<div>
<div>
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<div style="text-indent:0px">
<span class="gmail-m_2741894623242975464Apple-style-span" style="border-collapse:separate;text-indent:0px;border-spacing:0px">
<div style="overflow-wrap: break-word;">
<span class="gmail-m_2741894623242975464Apple-style-span" style="border-collapse:separate;text-indent:0px;border-spacing:0px">
<div style="overflow-wrap: break-word;">
<span class="gmail-m_2741894623242975464Apple-style-span" style="border-collapse:separate;text-indent:0px;border-spacing:0px">
<div style="overflow-wrap: break-word;">
<span class="gmail-m_2741894623242975464Apple-style-span" style="border-collapse:separate;text-indent:0px;border-spacing:0px">
<div style="overflow-wrap: break-word;">
<span class="gmail-m_2741894623242975464Apple-style-span" style="border-collapse:separate;text-indent:0px;border-spacing:0px">
<div style="overflow-wrap: break-word;">
<span class="gmail-m_2741894623242975464Apple-style-span" style="border-collapse:separate;text-indent:0px;border-spacing:0px">
<div style="overflow-wrap: break-word;">
<span class="gmail-m_2741894623242975464Apple-style-span" style="border-collapse:separate;text-indent:0px;border-spacing:0px">
<div style="overflow-wrap: break-word;">
<span class="gmail-m_2741894623242975464Apple-style-span" style="border-collapse:separate;text-indent:0px;border-spacing:0px">
<div style="overflow-wrap: break-word;">
<div><span class="gmail-">
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-transform:none;white-space:normal;word-spacing:0px">
____________________</div>
<div style="font-variant:normal;letter-spacing:normal;line-height:normal;text-transform:none;white-space:normal;word-spacing:0px">
<font size="3" face="Helvetica">C. Michael Barton</font></div>
<div style="font-variant:normal;letter-spacing:normal;line-height:normal;text-transform:none;white-space:normal;word-spacing:0px">
<font size="3" face="Helvetica">Director, Center for Social Dynamics & Complexity </font></div>
<div style="font-variant:normal;letter-spacing:normal;line-height:normal;text-transform:none;white-space:normal;word-spacing:0px">
<font size="3" face="Helvetica">Professor of Anthropology, School of Human Evolution & Social Change</font></div>
<div><font size="3" face="Helvetica">Head, Graduate Faculty in Complex Adaptive Systems Science</font></div>
<div style="font-variant:normal;letter-spacing:normal;line-height:normal;text-transform:none;white-space:normal;word-spacing:0px">
<font size="3" face="Helvetica">Arizona State University</font></div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-transform:none;white-space:normal;word-spacing:0px">
<br>
</div>
</span><span class="gmail-"><font size="3" face="Helvetica"><font>voice:  </font><font><a href="tel:(480)%20965-6262" value="+14809656262" target="_blank">480-965-6262</a> (SHESC), <a href="tel:(480)%20965-8130" value="+14809658130" target="_blank">480-965-8130</a>/727-<wbr>9746 (CSDC)</font><br>
<font>fax: <a href="tel:(480)%20965-7671" value="+14809657671" target="_blank">480-965-7671</a> (SHESC),  <a href="tel:(480)%20727-0709" value="+14807270709" target="_blank">480-727-0709</a> (CSDC)</font><br>
</font>
</span><div style="font-variant:normal;letter-spacing:normal;line-height:normal;text-transform:none;white-space:normal;word-spacing:0px">
<font size="3" face="Helvetica">www: <a href="http://www.public.asu.edu/~cmbarton" target="_blank">
http://www.public.asu.edu/~<wbr>cmbarton</a>, <a href="http://csdc.asu.edu" target="_blank">http://csdc.asu.edu</a></font></div>
<br>
</div><br></div></span></div></span></div></span></div></span></div></span></div></span></div></span><br>On Feb 8, 2018, at 6:16 PM, Vaclav Petras <<a href="mailto:wenzeslaus@gmail.com">wenzeslaus@gmail.com</a>> wrote:<br><br>Hi Michael,<br><br>I would say first thing is to check if it is really missing and if so why is that. I assume you have *-config for GDAL, so in general there is no special thing why there should be no *-configure on Mac.<br><br>Then you can supply your own liblas-config. What you need is a bash script which will behave like this:<br><br>$ liblas-config --libs<br>-L/usr/lib -llas -llas_c -L/usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/libboost_program_options.so /usr/lib/x86_64-linux-gnu/libboost_thread.so /usr/lib/libgdal.so /usr/lib/x86_64-linux-gnu/libgeotiff.so /usr/lib/x86_64-linux-gnu/libtiff.so<br>$ liblas-config --cflags<br>-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2<br>$ liblas-config --includes<br>-I/usr/include -I/usr/include/gdal -I/usr/include/geotiff -I/usr/include/x86_64-linux-gnu<br><br>The last resort would be to add --with-*-libs at el. to <a href="http://configure.in">configure.in</a> in GRASS but there are 2 reasons why not to do that: 1) I don't see the combination of *-config and --with-*-libs at el. to be used now. 2) The fix really should be done on the libLAS site.<br><br>If we would switch from liblas-config just to --with-*-libs at el., it would be much harder for the average person compiling GRASS. I don't understand it 100% but I think you need to a list of libLAS dependencies to make it work (such as /usr/lib/x86_64-linux-gnu/libboost_thread.so) which might be hard to get. On the other hand, liblas-config takes care of providing path to the right libraries.<br><br>I just compiled libLAS from latest source on Linux and liblas-config was in dir called `app` after build (i.e. `make`) and after `make install` it is in the install dir under `bin` with other executables. So as far as I can tell, libLAS should have liblas-config.<br><br>Vaclav<br><br>On Thu, Feb 8, 2018 at 3:49 PM, Markus Neteler <<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>> wrote:<br>><br>> ...<br>><br>> On Thu, Feb 8, 2018 at 9:05 PM, Michael Barton <<a href="mailto:Michael.Barton@asu.edu">Michael.Barton@asu.edu</a>> wrote:<br>> > ...<br>> > However, the Anaconda version of LAS tools does not include a liblas-config<br>> > file. The presence of this file is used by GRASS as a proxy check for the<br>> > existence of LAS libraries. I'm not sure if compiling v.in.lidar and<br>> > r.in.lidar actually do anything with the config file beyond finding<br>> > liblas.dylib. But if I try to point configure to the libraries directly<br>> > (with-liblas-libraries="...") it is ignored.<br>> ><br>> > So do you have any thoughts about how to get GRASS to use the liblas<br>> > resources if liblas-config is missing?<br>> ><br>> > Michael<br>> > ______________________________<br>> > C. Michael Barton<br>> > Director, Center for Social Dynamics & Complexity<br>> > Professor of Anthropology, School of Human Evolution & Social Change<br>> > Head, Graduate Faculty in Complex Adaptive Systems Science<br>> > Arizona State University<br>> > Tempe, AZ  85287-2402<br>> > USA<br><br></div></span></div></div></div></div></div>
</div>

</blockquote></div><br></div></div></div>