Closed bhflm closed 2 years ago
Found a workaround in the meantime : https://gis.stackexchange.com/questions/306473/getting-ogr-to-work-on-a-mac
I'm not OSX user myself, but it seems to me that the following workaround from https://github.com/neovim/neovim/issues/9050#issuecomment-424417456 may be required
Starting with Mojave, the headers are no longer installed under /usr/include/ by default
-- look under Command Line Tools -> New Features in the release notes.
Running
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
from the command line fixes the issue (at least for me and using brew).
Already tried, didn't work !
Hi, I get the exact same error as yours, have you solved the problem?
Hi,
This a c++-conflict introduced with #include
I see no other simple solution, than to raise the required macos deployment target to 10.9. Using the following python-sentence in GDAL/swig/python/setup.py fixes:
Required changes are inserted at lines 330-334:
...
extra_link_args = []
extra_compile_args = []
if sys.platform == 'darwin' and [int(x) for x in os.uname()[2].split('.')] >= [11, 0, 0]:
os.environ['ARCHFLAGS'] = '-mmacosx-version-min=10.9'
gdal_module = Extension('osgeo._gdal',
sources=['extensions/gdal_wrap.cpp'],
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args)
...
11,0,0 is the Kernel Version 11.0.0 and corresponds to Mac OS X v10.7.0 (see wikipedia). Since then, the feature "macosx-version-min" is available.
I think to price is not too high, that the runtime requirements are raised to 10.9 for the python interface. All remaining compiled GDAL-stuff is controlled by configure and remains untouched. Works with XCode 10.2.1, macos 10.4.5, GDAL 2.4.2/GDAL3.0.1 releases from github
@forestgnome Can you issue a pull request with that change ?
yes, I can do it, not today...
@forestgnome still willing to contribute PR ?
Yes, I am willing if it helps, although some problems have disappeared somewhere in 2019: currently GDAL 3.0.4 happily compiles on macos 10.5.4 with XCode 11 fine (without any modification of the released source tree) I am not sure, which layer (GDAL-configure,python,macos-SDK) actually solved the problem...
here are my configure-details: PROJ 6.3 Postgres 12 configure \ CFLAGS="-mmacosx-version-min=$OSX_MinVersion -stdlib=libc++ -I$pcreDir/include" \ CPPFLAGS="-mmacosx-version-min=$OSX_MinVersion -stdlib=libc++ -I$pcreDir/include" \ LDFLAGS="-mmacosx-version-min=$OSX_MinVersion -L$pcreDir/lib -L$fwOSGeoRasterDir/netcdf/$NetCDF_VersionLinked/lib -lnetcdf" \ PQ_CFLAGS="-I$pgDir/include" \ PQ_LIBS="-L$pgDir/lib -lpq" \ --prefix=$fwDir \ --disable-static \ --without-grass \ --with-curl \ --with-cpp14 \ --with-expat=/usr/local \ --with-geos=$fwOSGeoSpatialDir/geos/$GEOS_VersionLinked/bin/geos-config \ --with-geotiff=internal \ --with-gif \ --with-hdf5=$fwOSGeoRasterDir/hdf/$HDF_VersionLinked \ --with-jasper \ --with-jpeg=$fwOSGeoRasterDir/jpeg/$JPEG_VersionLinked \ --with-libkml=$fwOSGeoSpatialDir/libkml/$LIBKML_VersionLinked \ --with-netcdf=$fwOSGeoRasterDir/netcdf/$NetCDF_VersionLinked \ --with-opencl \ --with-openjpeg=$openjpegDir \ --with-pcraster=internal \ --with-pcre \ --with-pg \ --with-png=$fwOSGeoRasterDir/png/$PNG_VersionLinked \ --with-proj=$fwOSGeoSpatialDir/proj/$PROJ_VersionLinked \ --with-python=/Library/Frameworks/Python.framework/Versions/$Python_Version/bin/python$Python_Version \ --with-qhull=internal \ --with-threads \ --with-sfcgal \ --with-sqlite3=$sqliteDir \ --with-spatialite=$fwOSGeoSpatialDir/spatiaLite/$SpatiaLite_VersionLinked
Pending for closing. It seems that the problem does not exist at the moment (2021-02-11).
Urgent, Urgent, Urgent..... Hello every body, when I import gdal from osgeo on mac Mojave I have this ERROR. please can you help me "ERROR 1: dlopen(/Library/Application Support/GDAL/3.2/PlugIns/gdal_MrSID.dylib, 1): Library not loaded: @loader_path/../Libraries/libltidsdk.9.dylib Referenced from: /Library/Application Support/GDAL/3.2/PlugIns/gdal_MrSID.dylib Reason: image not found ERROR 1: dlopen(/Library/Application Support/GDAL/3.2/PlugIns/gdal_MrSID.dylib, 1): Library not loaded: @loader_path/../Libraries/libltidsdk.9.dylib Referenced from: /Library/Application Support/GDAL/3.2/PlugIns/gdal_MrSID.dylib Reason: image not found ERROR 1: dlopen(/Library/Application Support/GDAL/3.2/PlugIns/gdal_ECW_JP2ECW.dylib, 1): Library not loaded: /Library/Application Support/GDAL/3.2/Libraries/libNCSEcw.dylib Referenced from: /Library/Application Support/GDAL/3.2/PlugIns/gdal_ECW_JP2ECW.dylib Reason: image not found ERROR 1: dlopen(/Library/Application Support/GDAL/3.2/PlugIns/gdal_ECW_JP2ECW.dylib, 1): Library not loaded: /Library/Application Support/GDAL/3.2/Libraries/libNCSEcw.dylib Referenced from: /Library/Application Support/GDAL/3.2/PlugIns/gdal_ECW_JP2ECW.dylib Reason: image not found ERROR 1: dlopen(/Library/Application Support/GDAL/3.2/PlugIns/gdal_MG4Lidar.dylib, 1): Library not loaded: @loader_path/../Libraries/liblti_lidar_dsdk.1.dylib Referenced from: /Library/Application Support/GDAL/3.2/PlugIns/gdal_MG4Lidar.dylib Reason: image not found ERROR 1: dlopen(/Library/Application Support/GDAL/3.2/PlugIns/gdal_MG4Lidar.dylib, 1): Library not loaded: @loader_path/../Libraries/liblti_lidar_dsdk.1.dylib Referenced from: /Library/Application Support/GDAL/3.2/PlugIns/gdal_MG4Lidar.dylib Reason: image not found"
All errors refer to plugins which require additional and non open source components. Remove the plugins and and errors should go away. If you need one or more of those plugins you can write mail to gdal-dev mailing list and ask for help. I suggest not to label that mail as urgent.
closing as configure has been removed in GDAL master and replaced by cmake. reopen a new one if there's still an issue
Expected behavior and actual behavior.
Expected to work out a proper installation running
pip3 install GDAL
(no problems with brew install gdal)
actual behaviour:
Steps to reproduce the problem.
just run the following command with osx 10.14.4
pip3 install GDAL
and output will be similar
Operating system
macOS Mojave 10.14.4
GDAL version and provenance
2.4.1
Related : https://github.com/OSGeo/gdal/issues/1465