Homebrew / homebrew-core

🍻 Default formulae for the missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
13.7k stars 12.4k forks source link

PDAL: Can't read compressed file without LASzip or LAZperf decompression library. #3699

Closed garthk closed 8 years ago

garthk commented 8 years ago

Is there some way to have the pdal formula use the laszip formula?

$ brew install pdal laszip
Warning: pdal-1.1.0 already installed
Warning: laszip-2.2.0 already installed
$ pdal info points.laz
PDAL: Can't read compressed file without LASzip or LAZperf decompression library.

/ping @bfontaine @hobu @dakcarto @Homebrew/geospatial

MikeMcQuaid commented 8 years ago

Could try just adding a depends_on "laszip" => :optional or :recommended if it's a small and important dependency.

garthk commented 8 years ago

I don't believe that's sufficient: pdal doesn't pick up that laszip is available.

MikeMcQuaid commented 8 years ago

Could you try and open a pull request? That'll make this easier to debug. This document should help and I'm happy to walk you through anything else.

I suspect it also may need a cmake argument.

Thanks!

garthk commented 8 years ago

Note for those arriving here via Google: brew install laszip pdal won't give you a PDAL with LASzip support. The CI-brewed bottles for pdal don't include laszip because it's optional, thus not present at compile time.

The correct installation procedure for LASzip support is: brew install laszip && brew install --with-laszip pdal

$ brew install laszip
Warning: laszip-2.2.0 already installed

$ brew info pdal
pdal: stable 1.1.0 (bottled), HEAD
Point data abstraction library
http://www.pdal.io/
/usr/local/Cellar/pdal/1.1.0 (1,100 files, 61.9M) *
  Built from source on 2016-08-26 at 13:17:03 with: --with-laszip
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/pdal.rb
==> Dependencies
Build: cmake ✔
Required: gdal ✔, boost ✔
Optional: laszip ✔
==> Options
--with-laszip
    Build with laszip support
--HEAD
    Install HEAD version

$ brew install --with-laszip pdal
==> Using the sandbox
==> Downloading https://github.com/PDAL/PDAL/archive/1.1.0.tar.gz
Already downloaded: /Users/x/Library/Caches/Homebrew/pdal-1.1.0.tar.gz
==> cmake . -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/pdal/1.1.0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DWITH_LASZIP=TRUE
==> make install
🍺  /usr/local/Cellar/pdal/1.1.0: 1,100 files, 61.9M, built in 2 minutes 8 seconds

Thanks for the formula patch, @DomT4!

DomT4 commented 8 years ago

The correct installation procedure for LASzip support is: brew install laszip && brew install --with-laszip pdal

If you just do brew install pdal --with-laszip it'll grab the dependency for you if you need it. No need to preempt it unless you particularly wish to.

Thanks for the formula patch

No worries! 😺

Poormanphysics commented 8 years ago

Sorry to open this up but one key process on my work flow does not seemed to work? On Mac OS El Capitan the above seemed not to cut it? ADMIN-SRS1s-MacBook-Pro:Boundless OpenGeo Demo Data SRS1$ pdal info --input 20090429_42122c8225_ld_p23.laz --metadata --xml PDAL: Can't read compressed file without LASzip or LAZperf decompression library

[1]+ Stopped info pdal ADMIN-SRS1s-MacBook-Pro:Boundless OpenGeo Demo Data SRS1$ brew info pdal pdal: stable 1.1.0 (bottled), HEAD Point data abstraction library http://www.pdal.io/ /usr/local/Cellar/pdal/1.1.0 (1,074 files, 60M) * Poured from bottle on 2016-09-01 at 06:58:58 From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/pdal.rb ==> Dependencies Build: cmake ✘ Required: gdal ✔, boost ✔ Optional: laszip ✔ ==> Options --with-laszip Build with laszip support --HEAD Install HEAD version How do I make my own cmake.txt to make this work?

DomT4 commented 8 years ago

As @garthk noted, you'll need to brew reinstall pdal --with-laszip.

Poormanphysics commented 8 years ago

I figured out that I uninstalled the pdal and laszip then reinstall them back now its working sorry for the panic button! Heres is some part of th xml output: "vlr_4": "AgAAAAIBAAAAAAAAUMMAAP////////////////////8CAAYAFAACAAcACAACAA==", "vlr_4": { "description": "by laszip of LAStools (121127)", "record_id": 22204, "user_id": "laszip encoded" } }, "pdal_version": "1.1.0 (git-version: Release)" } ADMIN-SRS1s-MacBook-Pro:Boundless OpenGeo Demo Data SRS1$