Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate solution for GDAL native libraries on Mac #1684

Closed
jdgarrett opened this issue Feb 19, 2020 · 2 comments
Closed

Investigate solution for GDAL native libraries on Mac #1684

jdgarrett opened this issue Feb 19, 2020 · 2 comments
Assignees

Comments

@jdgarrett
Copy link
Contributor

Right now the raster demo in the quickstart guide does not work on Mac because the GDAL native libraries are no longer available. They used to be available via homebrew, but that solution is no longer valid because the version of GDAL that is required is no longer available.

@richard3d
Copy link
Contributor

richard3d commented May 12, 2020

This required going down a number of rabbit holes but I finally found a solution:

  • Install Apache Ant (1.9.14 was used)
  • Install UNIX IO ImageFramework
  • Obtain GDAL source code for 1.9.2 (This is the version that was used by it.geosolutions to build imageio-ext-gdal-bindings-1.9.2).
  • Obtain source code for SWIG 1.3.40 and build and install (This version of SWIG is required to build the native libraries that are used by the Java bindings)
  • Obtain source code for Postgres 9.2.24 and build and install (This is required to build GDAL with the configuration mentioned in the next step).
  • cd to the GDAL source directory and configure the build with the following settings (make sure --with-java and --with-pg options point to the locations on your machine.) ./configure --with-threads --disable-static --without-grass --with-jasper=/Library/Frameworks/UnixImageIO.framework/unix \ --with-libtiff=/Library/Frameworks/UnixImageIO.framework/unix --with-jpeg=/Library/Frameworks/UnixImageIO.framework/unix \ --with-gif=/Library/Frameworks/UnixImageIO.framework/unix --with-png=/Library/Frameworks/UnixImageIO.framework/unix \ --with-geotiff=/Library/Frameworks/UnixImageIO.framework/unix --with-sqlite3=/Library/Frameworks/SQLite3.framework/unix --with-odbc \ --with-pcraster=internal --with-geos=/Library/Frameworks/GEOS.framework/unix/bin/geos-config --with-static-proj4=/Library/Frameworks/PROJ.framework/unix \ --with-expat=/usr/local --with-curl --with-python --with-java=/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/contents/home \ --with-macosx-framework --with-pg=/usr/local/pgsql/bin/pg_config \ CFLAGS="-Os -arch x86_64" CXXFLAGS="-Os -arch x86_64 -fpermissive" LDFLAGS="-arch x86_64"
  • run make followed by sudo make install
  • copy the built version of GDAL to GeoWave directory e.g. applications/GeoWave/lib/utilities/gdal
  • cd to {gdalSourceDirectory}/swig
  • edit the SWIG variable in SWIGMake.base to point to the swig 1.3.40 executable
  • cd to the java sub-directory and edit all vars in java.opt to point to your runtime (I used jdk 1.8).
  • run make
  • copy all files from .libs folder to the base GeoWave GDAL directory e.g. applications/GeoWave/lib/utilities/gdal

@jdgarrett
Copy link
Contributor Author

This issue is resolved with PR #1722

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants