[gdal-dev] Building for Java on MacOS

David Rush david.rush at wyo.gov
Mon Apr 27 06:03:28 PDT 2020


All:

I think I finally found some instructions for building the Java stuff I
need:

https://trac.osgeo.org/gdal/wiki/GdalOgrInJavaBuildInstructionsUnix

That includes some notes for MacOS.  Yay.

I've set up my java.opt per this link referenced in the above link:

https://trac.osgeo.org/gdal/ticket/2401

But when I run "make" from the swig/java directory, I get this error:

GNUmakefile:1: ../../GDALmake.opt: No such file or directory
make: *** No rule to make target `../../GDALmake.opt'.  Stop.

I did a search with "find" but I don't seem to have that file.

What now?

David

On Sun, Apr 26, 2020 at 6:10 PM William Kyngesburye <woklist at kyngchaos.com>
wrote:

> I don't package GDAL java with my framework, and have no interest in java.
>   Sorry.
>
> I don't know about Homebrew.
>
> -----
> William Kyngesburye
> <kyngchaos at kyngchaos.com>
> <http://www.kyngchaos.com>
>
> Don't Panic
>
> On Apr 24, 2020, at 5:36 PM, David Rush <david.rush at wyo.gov> wrote:
>
> 
> Hi.  I'm trying to get to the point where I can use GDAL with Java (on a
> Mac now, Linux server box in the future).
>
> Current box is MacOS 10.15.4.
>
> I've D/L the binaries for 2.4 from
> https://www.kyngchaos.com/software/frameworks/, and installed, which
> appears to have put things
> in /Library/Frameworks/GDAL.framework/Versions/2.4
>
> but I didn't find the gdal-*.jar file anywhere in there.  I searched and
> found gdal-2.4.0.jar at some heavily-advertising driven web site.
>
> When I try to use GDAL, I get:
>
> java.lang.UnsatisfiedLinkError: no gdalalljni in java.library.path
>
> I cannot find a file called "gdalalljin" anywhere.  I forced my
> java.library.path to be /Library/Frameworks/GDAL.framework/unix/lib, but
> got the same error.
>
> I see that I have /Library/Frameworks/GDAL.framework/unix/lib/libgdal.dylib
>
> I then followed the directions here
> https://trac.osgeo.org/gdal/wiki/BuildingOnMac and used Homebrew to build
> GDAL, which appears to have installed it in /usr/local, and appears to be
> version 2.4.4 (per ogr2ogr --version).
>
> I reset my java.library.path to /usr/local/lib, but I still get the same
> error:
>
> java.lang.UnsatisfiedLinkError: no gdalalljni in java.library.path:
> [/usr/local/lib]
>
> I see that I have /usr/local/lib/libgdal.dylib
>
> So where, exactly, can I get the Java native library that I need, and what
> is the canonical source for a gdal-x.y.z.jar file, or instructions to build
> one myself?
>
> David
>
>
> E-Mail to and from me, in connection with the transaction
> of public business, is subject to the Wyoming Public Records
> Act and may be disclosed to third parties.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>

-- 

E-Mail to and from me, in connection with the transaction 
of public 
business, is subject to the Wyoming Public Records 
Act and may be 
disclosed to third parties.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200427/7ba6710c/attachment-0001.html>


More information about the gdal-dev mailing list