Here’s my quick guide on how to install and enable GDAL support for Geoserver on macOS / Mac OS X.
···
On Tue, Mar 21, 2017 at 3:56 AM, Gilles Celli <gilles.celli@anonymised.com> wrote:
Hi Daniele,
I made some progress:
By checking logs of geoserver, “gdal.jar” was missing in “geoserver/WEB-INF/lib”, I copied it then to it.
And yes the dynamic libs were built by swig in the gdal/swig/java/ as you mentioned:
#ls gdal-2.1.3/swig/java/*.dylib
libgdalconstjni.20.dylib libgdaljni.20.dylib libogrjni.20.dylib libosrjni.20.dylib
libgdalconstjni.dylib libgdaljni.dylib libogrjni.dylib libosrjni.dylib
So I copied the dynamic libs to /usr/local/lib and set the DYLD_LIBRARY_PATH in both “setenv.sh” and my ~/.bash_profile
But I sill get:
21-Mar-2017 11:52:30.973 WARNING [localhost-startStop-1] it.geosolutions.imageio.gdalframework.GDALUtilities.loadGDAL Failed to load the GDAL native libs. This is not a problem unless you need to use the GDAL plugins: they won’t be enabled.
java.lang.UnsatisfiedLinkError: no gdaljni in java.library.path
From “catalina.out” log file:
21-Mar-2017 11:35:21.773 WARNING [localhost-startStop-1] it.geosolutions.imageio.gdalframework.GDALUtilities.loadGDAL Failed to load the GDAL native libs. This is not a problem unless you need to use the GDAL plugins: they won’t be enabled.
java.lang.UnsatisfiedLinkError: no gdaljni in java.library.path
21-Mar-2017 11:35:11.801 INFO [localhost-startStop-2] org.geoserver.GeoserverInitStartupListener.contextDestroyed Unregistering Image I/O provider it.geosolutions.imageio.plugins.jp2kakadu.JP2GDALKakaduImageWriterSpi@7a22e404
21-Mar-2017 11:35:11.801 INFO [localhost-startStop-2] org.geoserver.GeoserverInitStartupListener.contextDestroyed Unregistering Image I/O provider it.geosolutions.imageio.stream.output.spi.StringImageOutputStreamSpi@35038fe5
Any clues ?
Cheers,
Gilles
On 21 Mar 2017, at 10:00, Daniele Romagnoli <daniele.romagnoli@anonymised.comsolutions.it> wrote:
Hi Gilles,
can you check the GeoServer log and the catalina.out looking for some GDAL library loading related message?
You should see one of these 2 messages (depending on loading success vs loading failure):
When successfully loaded:
GDAL Native Library loaded (version: X.X.X)
When missing:
Failed to load the GDAL native libs. This is not a problem
unless you need to use the GDAL plugins: they won’t be enabled
Does your swig build also created gdaljni, gdalconstjni, ogrjni, osrjni,… dynamic libs?
If that is the case, are them in the same location where you have installed the other libs ?
Being on a MacOS, you may need to configure the DYLD_LIBRARY_PATH on your startup scripts, referring to the path where the dynamic lib have been installed.
Hopefully, some MacOS dev may chime in to provide you additional feedbacks on this topic.
Please, let us know.
Best Regards,
Daniele
Check out the vibrant tech community on one of the world’s most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Geoserver-devel mailing list
Geoserver-devel@anonymised.comsourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
On Mon, Mar 20, 2017 at 4:51 PM, Gilles Celli <gilles.celli@anonymised.com> wrote:
Hello Geoserver-Developers,
Well I’m not sure if i should post that here (or on the geoserver-users mailing list), but it seems related to Geoserver development, so here we go:
We have Geoserver 2.10.1 running on macOS 10.11 but we need ENVI file support, that’s why I compiled the latest gdal 2.1.3 libraries manually
to allow compilation of the java binding file for gdal-format.
The gdal native libraries are installed in /usr/local/lib/
I copied the “gdal.jar” java binding file to geoserver/WEB-INF/lib/ along with imageio-ext recommended .jars files, as described here
http://docs.geoserver.org/latest/en/user/data/raster/gdal.html
However the ENVI format in “Raster Data Sources” is not available.
It seems that Geoserver doesn’t recognize the “gdal.jar” binding file, even if I rename it to “imageio-ext-gdal-bindings-1.9.2.jar”
( Geo-Solutions Java Binding file it is named “imageio-ext-gdal-bindings-1.9.2.jar” file in th
So my question is:
Does someone know how to properly setup the gdal.jar binding file so that GEOSERVER could recognize it ?
Note that I even compiled the ImageIO-Ext 1.1.7 plugin for macOS (by correcting the pom.xml files) (which I don’t think it’s required since the .jars can be downloaded from
http://demo.geo-solutions.it/share/github/imageio-ext/releases/1.1.X/1.1.16/
For compilation Info:
GDAL configure command (needed Kyng Chaos UnixImageIO, PROJ and GEOS frameworks)
#cd gdal-2.1.3
#./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-pcraster=internal --with-geos=/Library/Frameworks/GEOS.framework/unix/bin/geos-config --with-static-proj4=/Library/Frameworks/PROJ.framework/unix
–with-expat --with-python -with-java -with-jvm-lib=/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
#make install
#cd swig/java
#make
it compiles and builds a “gdal.jar” binding file
Any help is greatly appreciated,
Gilles
Check out the vibrant tech community on one of the world’s most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Geoserver-devel mailing list
Geoserver-devel@anonymised.comrge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
–
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.
Ing. Daniele Romagnoli
Senior Software Engineer
GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.