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
362 stars 111 forks source link

PDAL formula broken. dyld: Library not loaded: /usr/local/opt/osgeo-gdal/lib/libgdal.26.dylib #1383

Closed hawkaa closed 4 years ago

hawkaa commented 4 years ago

Please answers the following

I've...

Describe the bug

Hi all!

I'm trying to get pdal running on my machine. Been struggling for some hours now, after manually uninstalling all gdal/pdal related stuff, and fixed all issues reported by brew doctor.

However, pdal references the wrong version of the libgdal library. When I install osgeo-pdal it installs osgeo-gdal/3.1.0_2 that comes with libgdal.27.dylib. However, pdal requires libgdal.26.dylib

To Reproduce

$ brew install osgeo-pdal
...
$ pdal
dyld: Library not loaded: /usr/local/opt/osgeo-gdal/lib/libgdal.26.dylib
  Referenced from: /usr/local/bin/pdal
  Reason: image not found
[1]    19122 abort      pdal

Expected behavior

pdal should work. In other words, the formula should install libgdal.26.dylib instead of libgdal.27.dylib.

Additional context

brew doctor output:

brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
  /Users/hakon/miniconda3/bin/python3.7-config
  /Users/hakon/miniconda3/bin/python3.7m-config
  /Users/hakon/miniconda3/bin/python3-config
  /Users/hakon/miniconda3/bin/ncursesw6-config
  /Library/Frameworks/Python.framework/Versions/3.8/bin/python3-config
  /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8-config
  /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7-config
  /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7m-config
  /Library/Frameworks/Python.framework/Versions/3.7/bin/python3-config

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  osgeo-vtk
  osgeo-pcl
  python
  awscli
  node

Warning: Homebrew's sbin was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting the PATH for example like so:
  echo 'export PATH="/usr/local/sbin:$PATH"' >> /Users/hakon/.bash_profile

Warning: Some installed formulae are missing dependencies.
You should `brew install` the missing dependencies:
  brew install netcdf pyqt sip

Run `brew missing` for more details.```
hawkaa commented 4 years ago

Looks like I finally got it to run by downgrading GDAL.

First, install gdal 3.0.x:

brew unlink osgeo-gdal && brew install https://raw.githubusercontent.com/OSGeo/homebrew-osgeo4mac/1fadbac01947f7998554a21001e1b7c186578638/Formula/osgeo-gdal.rb

Then, a downgrade of cfitsio to 3.4.70:

brew unlink cfitsio && brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/1343e8b17bc67c1a9b4e170f189b152746246798/Formula/cfitsio.rb
alazarolop commented 4 years ago

Good! This issue is due to an outdated bottle from the repository, so I will run the process to fix it.

Just for your information, if you face it again, you can add the tag --build-from-sourceto the formula instead of downgrading the dependencies.

hawkaa commented 4 years ago

smartereveryday

Thank you! Compiling from source works!

alazarolop commented 4 years ago

@hawkaa the bottle has been rebuilt with the latest version of PDAL formula https://github.com/OSGeo/homebrew-osgeo4mac/commit/edc163563c06da67cb88f073352eeec3cd3d2ffd

aisiklar commented 1 year ago

Hi. last week I was running sumo and runner.py file (and my .py files) with no problem (was able to run the sim) but just this morning I "upgraded brew" and now I cannot execute the runner.py (or my .py file). it says " dyld[8939]: Library not loaded: /usr/local/opt/gdal/lib/libgdal.31.dylib Referenced from: /Users/alptekin/Documents/development/sumo-simulator/sumo/bin/sumo-gui Reason: tried: '/usr/local/opt/gdal/lib/libgdal.31.dylib' (no such file), '/usr/local/lib/libgdal.31.dylib' (no such file), '/usr/lib/libgdal.31.dylib' (no such file), '/usr/local/Cellar/gdal/3.6.1/lib/libgdal.31.dylib' (no such file), '/usr/local/lib/libgdal.31.dylib' (no such file), '/usr/lib/libgdal.31.dylib' (no such file) /Users/alptekin/Documents/development/sumo-simulator/sumo/tools/traci/main.py:154: UserWarning: Could not connect to TraCI server using port 49572 (TraCI server already finished). Retrying with different port. warnings.warn(("Could not connect to TraCI server using port %s (%s)." + "

I think this issue is related with this error but tbh I could not understand it much.

I will appreciate if one can explain it explicitly Thanks