[gdal-dev] Building for Java on MacOS
Ivan Lucena
ivan.lucena at outlook.com
Mon Apr 27 07:18:20 PDT 2020
Hi David,
I am in the process of refreshing my GDAL building process in a Mac, so I might be able to help with that question.
You need to install SWIG in your machine. And one way to do that is using the HomeBrewer [brew.sh] another is Anaconda [anaconda.com]
$ brew install swig
or
$ conda install swig
Homebrew mess with you OS and Apple updates might mess with your brew installed software. Anaconda keeps it all in a user sub-folder. It is up to you.
I am not interested in building the Java binding, only Python, but once upon a time I remember I could get all you need "just" by installing uDig [udig.refractions.net]. I mean, the GDAL Java binding was included and ready to use.
Regards,
Ivan
________________________________
From: gdal-dev <gdal-dev-bounces at lists.osgeo.org> on behalf of David Rush <david.rush at wyo.gov>
Sent: Monday, April 27, 2020 10:02 AM
To: gdal-dev at lists.osgeo.org <gdal-dev at lists.osgeo.org>
Subject: Re: [gdal-dev] Building for Java on MacOS
Thank you, Evan. That got me to the next error:
/bin/sh: swig: command not found
make: *** [gdal_wrap.cpp] Error 127
Where/how does the "swig" script or binary come from?
David
On Mon, Apr 27, 2020 at 7:11 AM Even Rouault <even.rouault at spatialys.com<mailto:even.rouault at spatialys.com>> wrote:
On lundi 27 avril 2020 07:03:28 CEST David Rush wrote:
> 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.
You need to run ./configure to generate it. And it is strongly advise that you run the Java bindings against the same version of the native library for which they have been generated.
--
Spatialys - Geospatial professional services
http://www.spatialys.com
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/c9b4ac45/attachment.html>
More information about the gdal-dev
mailing list