[gdal-dev] GDAL 1.7.3 java bindings on Centos 5 (64 bit)
daniele.romagnoli at geo-solutions.it
Tue Jan 24 06:38:48 EST 2012
We was able to get it working using GDAL 1.8.1 and SWIG 1.3.40.
Not sure which part fixed it (GDAL 1.8.1 or SWIG 1.3.40).
Thanks for your suggestions. (In case we have some free time, we will
probably try GDAL 1.7.3 with SWIG 1.3.40 just to understand which component
fixed our issues).
On Mon, Jan 23, 2012 at 8:12 PM, Even Rouault
<even.rouault at mines-paris.org>wrote:
> Le lundi 23 janvier 2012 18:12:14, Daniele Romagnoli a écrit :
> > Hi list,
> > Does anyone have any experience about the reported topic?
> > I have downloaded GDAL 1.7.3 on my Centos 5.7 (64) machine and built it
> > (with only base drivers and with threads support).
> > Utilities are working fine (gdalinfo, gdal_translate, ...)
> > Then, I have installed SWIG 1.3.36 (I know, it's quite old but testing
> > 1.3.4X or 2.x in the past, I got several JVM crashes or other types of
> > issues) and I have created java bindings for it.
> > Once I have configured LD_LIBRARY_PATH to use all SOs it needs, I have
> > started running some ImageIO-Ext tests with maven and JVM is crashing.
> > In case someone don't know it, ImageIO-Ext mainly allows to bridge Java's
> > ImageIO (ImageReaders/writers/SPI) to GDAL format drivers.
> > On several Ubuntu (8, 9, 10, 11) I never had similar problems. We
> > use ImageIO-Ext 1.1.2 built on top of GDAL 1.7.3 on projects like
> > GeoServer, Udig, ... Therefore I guess it's not a problem on the
> > ImageIO-Ext caller side. I think it could be related to the SWIG-JNI
> > counterpart which isn't working properly or something odd with the memory
> > usage.
> > Does anyone have any feedback on this? (supported/never tested/won't
> > work/need some CXX flags/... anything)
> > I'm pasting the hs_err_pid Log in case you find anything interesting.
> > : http://pastebin.com/WQkfnutJ
> Hi Daniele,
> I've never used ImageIO-Ext myself. Looking at the traces, the problem
> in GetMetadata_List() (but this may be just a consequence of an issue
> elsewhere). Do you have a simple code and associate data that could be
> used to
> reproduce the problem ?
> I've tested the following code :
> import org.gdal.gdal.*;
> public class testgetmetadatalist
> public static void main(String args)
> Dataset ds = gdal.Open(args);
> for(int i=0;i<1000;i++)
> and it runs without any problem on my system (Ubuntu 10.04 64bit). I've
> tested with GDAL trunk, but I'm not aware of significant fixes in the Java
> bindings since 1.7.3 that could explain a difference in behaviour.
> I've run it under Valgrind too ( valgrind --trace-children=yes java -
> Djava.library.path=. -cp gdal.jar:. testgetmetadatalist byte.tif), and
> see anything alarming (you can see a bunch of warnings due to the JVM inner
> working, but nothing from GDAL code). You need Valgrind 3.6.1 at least
> so that valgrind works correctly with a 64bit JVM.
> Could you test that on your end ?
> As far as swig version is concerned, I believe we have used 1.3.36 in the
> so that shouldn't be a problem. Perhaps you could retry with 1.3.40 that is
> the one I use currently ?
> Another track: perhaps you could try to recompile the lib*jni.so without
> the -
> O2 flag and see if it makes a difference. There was at a time a problem
> with the
> swig generated code that has caused the -fno-strict-aliasing to be added
> swig/java/GNUmakefile and that has solved the problem (I've checked that
> the fix
> is well in 1.7.3), but perhaps there's something else with the compiler
> version you are using.
> Best regards,
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
Ing. Daniele Romagnoli
Via Poggio alle Viti 1187
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 962313
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev