OSGeo / homebrew-osgeo4mac

Mac homebrew tap for maintaining a stable work environment for the OSGeo.org geospatial toolset
https://git.io/fhh3X
BSD 3-Clause "New" or "Revised" License
363 stars 111 forks source link

GRASS still fails with liblas-gdal2 #374

Closed CarlosGrohmann closed 6 years ago

CarlosGrohmann commented 6 years ago

Hello

Although this issue #299 was closed, I want to report that this same issue is happening to me.

With a fresh homebrew install, the first thing i do is to install liblas-gdal2 --with-laszip. After that I try install GRASS: brew install osgeo/osgeo4mac/grass7 --with-liblas --with-openblas

Then I get the same errors:

--
Errors in:
/private/tmp/grass7-20180601-62401-1wogbqr/grass-7.4.0/raster/r.in.lidar
/private/tmp/grass7-20180601-62401-1wogbqr/grass-7.4.0/raster3d/r3.in.lidar
/private/tmp/grass7-20180601-62401-1wogbqr/grass-7.4.0/vector/v.out.lidar
/private/tmp/grass7-20180601-62401-1wogbqr/grass-7.4.0/vector/v.in.lidar
--

Since the installation dirs are removed after the error, I tried to compile from source, and still got the same errors, but this time I could go into one of the modules' dir and run make. The error is this:

dyld: Library not loaded: @rpath/liblas.3.dylib
  Referenced from: /usr/local/opt/liblas-gdal2/lib/liblas_c.3.dylib
  Reason: image not found

@mpickering commented that he used install_name_tool to fix it, but I'd like to hear the details from him, since when I run otool to check the rpath it seems ok to me:

otool -D /usr/local/opt/liblas-gdal2/lib/liblas.3.dylib
/usr/local/opt/liblas-gdal2/lib/liblas.3.dylib:
/usr/local/opt/liblas-gdal2/lib/liblas.3.dylib

OTOH, liblas-config doesn't explicit points to liblas.3.dylib:

/usr/local/opt/liblas-gdal2/bin/liblas-config --libs
-L/usr/local/Cellar/liblas-gdal2/1.8.1_1/lib -llas -llas_c -L/usr/local/lib /usr/local/lib/libboost_program_options-mt.dylib /usr/local/lib/libboost_thread-mt.dylib /usr/local/Cellar/gdal2/2.2.4/lib/libgdal.dylib /usr/local/lib/libgeotiff.dylib /usr/local/lib/libtiff.dylib /usr/local/Cellar/liblas-gdal2/1.8.1_1/libexec/laszip/lib/liblaszip.dylib
nickrobison commented 6 years ago

@CarlosGrohmann Thanks for opening a new issue! Apologies for the delayed response. I'll try to take a look at this either today or tomorrow.

nickrobison commented 6 years ago

@CarlosGrohmann I believe this issue has been resolved. I modified the liblas-gdal2 formula to remove the rpath linking from the liblas_c.3.dylib, which seems to have resolved the issue on my machine. Thanks for your extra debugging work!

You'll need to brew update && brew reinstall liblas-gdal2 --with-laszip and then install grass7 with the appropriate options. Sorry, no bottles yet, we're having some issues with our Travis pipeline, but the compilation should be quick.

Please let me know if this fixes what you're experiencing.

CarlosGrohmann commented 6 years ago

YES! GRASS install fine now!

Thanks for the quick fix!

All seems to be working, except 3D view. Imported LiDAR LAZ files without any trouble.

I did got a warning from wxpython:

/usr/local/lib/python2.7/site-packages/wx-3.0-osx_cocoa/wx/_core.py:16633: UserWarning: wxPython/wxWidgets release number mismatch
  warnings.warn("wxPython/wxWidgets release number mismatch")

could this be related to the non-working 3D view?

nickrobison commented 6 years ago

Great to hear that it's working!

I don't think the warning you're seeing is related to the non-functioning 3D view. If the 2D gui is appearing, that indicates wxpython is working correctly.

Unless you're seeing errors being generated in the logs related to missing libraries or something like that, you're probably observing an upstream issue. You can try to report the bug to the grass project directly, doing a quick search seems to indicate there are some outstanding issues related to the 3D Raster module. Feel free to open a new ticket if the error seems to be related to the actual build process on MacOS. Good luck!