wiki:JasPer

Version 4 (modified by Mateusz Łoskot, 16 years ago) ( diff )

Added Open Tickets to JasPer Wiki

JasPer

The JasPer library can be used for JPEG2000 access in GDAL.

Building with JasPer

JPEG2000 support based on JasPer toolkit which can be accessed from the JasPer Project Home Page.

JasPer itself is a bridge for working with several image file formats. Only JP2 and JPC parts of JasPer used in GDAL.

You need modified JasPer library to build this driver with GeoJP2 support enabled. Modified version can be downloaded from ftp://ftp.remotesensing.org/gdal/jasper-1.900.1.uuid.tar.gz.

On 64bit linux systems it may be necessary to force use of -fPIC when building JasPer or else it can't be used in the GDAL shared library.

  export CFLAGS="-O2 -fPIC"
  ./configure

Troubleshooting

If may encounter following error during linking, especially when building GDAL on Mac OS X:

ld: common symbols not allowed with MH_DYLIB output format with the -multi_module option
/usr/local/lib/libjasper.a(jpc_t1cod.o) definition of common _jpc_magctxnolut (size 16384)
/usr/local/lib/libjasper.a(jpc_t1cod.o) definition of common _jpc_mqctxs (size 160)
/usr/local/lib/libjasper.a(jpc_t1cod.o) definition of common _jpc_refnmsedec (size 512)
/usr/local/lib/libjasper.a(jpc_t1cod.o) definition of common _jpc_refnmsedec0 (size 512)
/usr/local/lib/libjasper.a(jpc_t1cod.o) definition of common _jpc_scctxnolut (size 1024)
/usr/local/lib/libjasper.a(jpc_t1cod.o) definition of common _jpc_signmsedec (size 512)
/usr/local/lib/libjasper.a(jpc_t1cod.o) definition of common _jpc_signmsedec0 (size 512)
/usr/local/lib/libjasper.a(jpc_t1cod.o) definition of common _jpc_spblut (size 1024)
/usr/local/lib/libjasper.a(jpc_t1cod.o) definition of common _jpc_zcctxnolut (size 4096)
/usr/bin/libtool: internal link edit command failed
make[1]: *** [/Users/mloskot/dev/gdal/_svn/trunk/gdal/libgdal.dylib] Error 1
make: *** [check-lib] Error 2

In order to fix it, it's required to rebuild JasPer with additional compilation option:

$ export CFLAGS="-fno-common"
$ export CXXFLAGS=$CFLAGS
$ ./configure
make clean
make
make install

After new build of JasPer is installed, GDAL should compile and link with success.

Open Tickets

No results

Note: See TracWiki for help on using the wiki.