[OSGeoLive] #2288: libgdal-java needs to be added to the nightly osgeo repo

OSGeoLive trac_osgeolive at osgeo.org
Sun Jun 19 14:03:09 PDT 2022


#2288: libgdal-java needs to be added to the nightly osgeo repo
-----------------------+----------------------------
 Reporter:  misev      |       Owner:  osgeolive@…
     Type:  task       |      Status:  assigned
 Priority:  major      |   Milestone:  OSGeoLive15.0
Component:  OSGeoLive  |  Resolution:
 Keywords:             |
-----------------------+----------------------------
Comment (by edso):

 just took some spare time to try and build the missing java jni. i
 succeeded for simplicity sake with Lubuntu22's default gdal 3.4.1
 1. install in a virtual machine
 2. activate deb+src apt entries, `apt get update`
 now pretty much as explained here https://www.ducea.com/2008/03/06/howto-
 recompile-debian-packages/ patch/rebuild the package
 3. `apt-get install devscripts build-essential`, `apt-get build-dep gdal-
 bin`
 we need java and ant for the java-bindings
 4. `apt-get install openjdk-8-jdk openjdk-8-source ant`
 5. as user, `apt-get source gdal-bin`
 6. `cd gdal-3.4.1+dfsg/`
 7. edit `debian/rules`, add `--with-java` after
 `override_dh_auto_configure:`
 8. edit `swig/java/java.opt` JAVA_HOME to point to
 `/usr/lib/jvm/java-1.8.0-openjdk-amd64`
 9. build `debuild -us -uc`
 this resulted in the deb packages built, but java-jni was still missing.
 so i ran that explicitely
 10. `cd swig/java/`
 11. `make`
 dunno why i needed to run it explicitely. the resulting
 `swig/java/libgdalalljni.so` however worked as expected.

 not sure if that can be integrated into the updated gdal-3.4.3 package on
 https://launchpad.net/~osgeolive/+archive/ubuntu/nightly/+packages

 although the above result will likely work for all 3.4.x versions, the
 java-binding can probably be built from the updated package as well.
-- 
Ticket URL: <https://trac.osgeo.org/osgeolive/ticket/2288#comment:7>
OSGeoLive <https://live.osgeo.org/>
self-contained bootable DVD, USB thumb drive or Virtual Machine based on Lubuntu, that allows you to try a wide variety of open source geospatial software without installing anything.


More information about the osgeolive mailing list