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
364 stars 112 forks source link

gdal - linked with incorrect libdap - Big Sur #1408

Closed torchingloom closed 3 years ago

torchingloom commented 3 years ago

I'm sorry, but I have a problem with osgeo-gdal after today brew upgrade

MacOS BigSur 11.2 Beta (20D5042d)


gdalwarp

dyld: Library not loaded: /usr/local/opt/libdap/lib/libdap.25.dylib
  Referenced from: /usr/local/opt/osgeo-gdal/bin/gdalwarp
  Reason: image not found

brew config

HOMEBREW_VERSION: 2.7.5-39-ge8667b6
ORIGIN: https://github.com/Homebrew/brew
HEAD: e8667b609cb7fe2f6baa72ae9798fd01bd40498b
Last commit: 42 minutes ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 1cf17e5879833fe3849aec7328b22063af72870b
Core tap last commit: 70 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: subl
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 16
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 16-core 64-bit kabylake
Clang: 12.0 build 1200
Git: 2.30.0 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 15.0.1, 1.8.261.12, 1.8.0_275
macOS: 11.2-x86_64
CLT: N/A
Xcode: 12.3

brew info osgeo-gdal

osgeo/osgeo4mac/osgeo-gdal: stable 3.1.2 (bottled), HEAD
GDAL: Geospatial Data Abstraction Library
https://www.gdal.org/
/usr/local/Cellar/osgeo-gdal/3.1.2_2 (227 files, 58.8MB) *
  Poured from bottle on 2021-01-18 at 14:35:58
/usr/local/Cellar/osgeo-gdal/3.1.2_2.reinstall (227 files, 58.8MB)
  Poured from bottle on 2021-01-18 at 14:35:30
From: https://github.com/osgeo/homebrew-osgeo4mac/blob/HEAD/Formula/osgeo-gdal.rb
==> Dependencies
Build: pkg-config ✔, openjdk ✔
Required: armadillo ✔, ant ✔, curl-openssl ✔, expat ✔, freexl ✔, geos ✔, giflib ✔, json-c ✔, mdbtools ✔, numpy ✔, libiconv ✔, osgeo-libkml ✔, libpq ✔, osgeo-libspatialite ✔, libzip ✔, pcre ✔, openssl ✔, qhull ✔, sfcgal ✔, sqlite ✔, swig ✔, zlib ✔, cfitsio ✔, epsilon ✔, osgeo-hdf4 ✔, hdf5 ✔, jpeg-turbo ✔, jasper ✔, libdap ✔, libpng ✔, libxml2 ✔, osgeo-netcdf ✔, openjpeg ✔, webp ✔, zstd ✔, unixodbc ✔, xerces-c ✔, xz ✔, osgeo-proj ✔, osgeo-postgresql ✔
==> Requirements
Required: Unlinked ✔
==> Options
--with-pg10
    Build with PostgreSQL 10 client
--with-pg11
    Build with PostgreSQL 11 client
--HEAD
    Install HEAD version

brew info libdap

libdap: stable 3.20.7 (bottled), HEAD
Framework for scientific data networking
https://www.opendap.org/
/usr/local/Cellar/libdap/3.20.7 (163 files, 6.7MB) *
  Poured from bottle on 2021-01-18 at 12:22:04
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/libdap.rb
License: LGPL-2.1-or-later
==> Dependencies
Build: bison ✘, pkg-config ✔
Required: libxml2 ✔, openssl@1.1 ✔
==> Options
--HEAD
    Install HEAD version

ls -lah /usr/local/opt/libdap/lib/

-r--r--r--   1 ta  staff   1,5M 18 янв 12:22 libdap.27.dylib
-r--r--r--   1 ta  staff   2,8M 29 дек 22:05 libdap.a
lrwxr-xr-x   1 ta  staff    15B 29 дек 22:05 libdap.dylib -> libdap.27.dylib
-rw-r--r--   1 ta  staff   264K 18 янв 12:22 libdapclient.6.dylib
-r--r--r--   1 ta  staff   365K 29 дек 22:05 libdapclient.a
lrwxr-xr-x   1 ta  staff    20B 29 дек 22:05 libdapclient.dylib -> libdapclient.6.dylib
-r--r--r--   1 ta  staff    97K 18 янв 12:22 libdapserver.7.dylib
-r--r--r--   1 ta  staff    64K 29 дек 22:05 libdapserver.a
lrwxr-xr-x   1 ta  staff    20B 29 дек 22:05 libdapserver.dylib -> libdapserver.7.dylib
-r--r--r--   1 ta  staff   426K 29 дек 22:05 libtest-types.a
drwxr-xr-x   5 ta  staff   160B 18 янв 12:22 pkgconfig
jvanulde commented 3 years ago

Had the same problem. I solved it by:

 sudo ln -s /usr/local/opt/libdap/lib/libdap.27.dylib /usr/local/opt/libdap/lib/libdap.25.dylib

I hope that helps @torchingloom

torchingloom commented 3 years ago

@jvanulde thank you! Of course I tried it before submit this issue. Output after ln -s /usr/local/opt/libdap/lib/libdap.27.dylib /usr/local/opt/libdap/lib/libdap.25.dylib

OSError: dlopen(/usr/local/lib/libgdal.dylib, 6): Symbol not found: __ZN6libdap5ErrorC1ENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE
  Referenced from: /usr/local/lib/libgdal.dylib
  Expected in: /usr/local/opt/libdap/lib/libdap.25.dylib
 in /usr/local/lib/libgdal.dylib
stale[bot] commented 3 years ago

This issue or pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want to keep the issue open, please comment or update the info here. Thank you for your contributions.

stale[bot] commented 3 years ago

This issue or pull request has been automatically closed because it has not had recent activity. Thank you for your contributions.