[gdal-dev] jpeg2000/jasper error compiling gdal 2.1 from git release branch
Even Rouault
even.rouault at spatialys.com
Wed Dec 7 09:41:43 PST 2016
On mercredi 7 décembre 2016 10:27:41 CET Donovan Cameron wrote:
> Downgrading jasper to 1.900.5 results in a successful build.
Looking in the jasper of my ubuntu 16.04 (1.900.1-debian1-2.4ubuntu1), I can see:
/usr/include/jasper/jas_config2.h:#define uchar unsigned char
/usr/include/jasper/jas_config.h:#define uchar unsigned char
/usr/include/jasper/jas_icc.h: uchar *ucdata; /* Unicode localizable description */
/usr/include/jasper/jas_icc.h: uchar macdata[69]; /* Localizable Macintosh description
*/
/usr/include/jasper/jas_icc.h:extern uchar jas_iccprofdata_srgb[];
/usr/include/jasper/jas_icc.h:extern uchar jas_iccprofdata_sgray[];
/usr/include/jasper/jas_icc.h:jas_iccprof_t *jas_iccprof_createfrombuf(uchar *buf, int len);
/usr/include/jasper/jas_stream.h: uchar *bufbase_;
/usr/include/jasper/jas_stream.h: uchar *bufstart_;
/usr/include/jasper/jas_stream.h: uchar *ptr_;
/usr/include/jasper/jas_stream.h: uchar tinybuf_[JAS_STREAM_MAXPUTBACK + 1];
/usr/include/jasper/jas_stream.h: uchar *buf_;
/usr/include/jasper/jas_stream.h: jas_stream_flushbuf((stream), (uchar)(c)) : \
/usr/include/jasper/jas_types.h:#if !defined(uchar)
/usr/include/jasper/jas_types.h:#define uchar unsigned char
jasper.h is included by GDAL, which includes in turn jas_config.h and jas_types.h, which both
provide the #define uchar unsigned char
So probably your newer jasper.h has no longer those includes, or something has changed in
one of the above files.
You could as well replace the JAS_CAST(uchar *, buf); by JAS_CAST(unsigned char*, buf)
Even
> On 07/12/16 10:22 AM, Donovan Cameron wrote:
> > Morning Everyone!
> >
> > Jasper was update in Arch Linux today and trying to build gdal 2.1
> > from the git 2.1 release branch (r36743) the compile fails with a
> > jpeg2000 + jasper error:
> >
> > make -C jpeg2000 install-obj
> > make[2]: Entering directory
> > '/tmp/makepkg/gdal-filegdb/src/gdal-2.1/frmts/jpeg2000'
> > g++ -I/tmp/makepkg/gdal-filegdb/src/gdal-2.1/port
> > -I/tmp/makepkg/gdal-filegdb/src/gdal-2.1/gcore
> > -I/tmp/makepkg/gdal-filegdb/src/gdal-2.1/alg
> > -I/tmp/makepkg/gdal-filegdb/src/gdal-2.1/ogr
> > -I/tmp/makepkg/gdal-filegdb/src/gdal-2.1/ogr/ogrsf_frmts
> > -I/tmp/makepkg/gdal-filegdb/src/gdal-2.1/gnm
> > -I/tmp/makepkg/gdal-filegdb/src/gdal-2.1/apps -march=native -O2 -pipe
> > -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC
> > -Wall -Wextra -Winit-self -Wunused-parameter -Wformat
> > -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow
> > -Werror=vla -Wnull-dereference -Wduplicated-cond
> > -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual
> > -fno-operator-names -DOGR_ENABLED -D_FORTIFY_SOURCE=2
> > -I/tmp/makepkg/gdal-filegdb/src/gdal-2.1/port -I/usr/include
> > -DGDAL_COMPILATION -c -o ../o/jpeg2000dataset.o jpeg2000dataset.cpp
> > g++ -I/tmp/makepkg/gdal-filegdb/src/gdal-2.1/port
> > -I/tmp/makepkg/gdal-filegdb/src/gdal-2.1/gcore
> > -I/tmp/makepkg/gdal-filegdb/src/gdal-2.1/alg
> > -I/tmp/makepkg/gdal-filegdb/src/gdal-2.1/ogr
> > -I/tmp/makepkg/gdal-filegdb/src/gdal-2.1/ogr/ogrsf_frmts
> > -I/tmp/makepkg/gdal-filegdb/src/gdal-2.1/gnm
> > -I/tmp/makepkg/gdal-filegdb/src/gdal-2.1/apps -march=native -O2 -pipe
> > -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC
> > -Wall -Wextra -Winit-self -Wunused-parameter -Wformat
> > -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow
> > -Werror=vla -Wnull-dereference -Wduplicated-cond
> > -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual
> > -fno-operator-names -DOGR_ENABLED -D_FORTIFY_SOURCE=2
> > -I/tmp/makepkg/gdal-filegdb/src/gdal-2.1/port -I/usr/include
> > -DGDAL_COMPILATION -c -o ../o/jpeg2000_vsil_io.o jpeg2000_vsil_io.cpp
> > In file included from /usr/include/jasper/jasper.h:68:0,
> >
> > from jpeg2000_vsil_io.h:33,
> >
> > from jpeg2000_vsil_io.cpp:77:
> > jpeg2000_vsil_io.cpp: In function ‘void
> > JPEG2000_VSIL_jas_stream_initbuf(jas_stream_t*, int, char*, int)’:
> > jpeg2000_vsil_io.cpp:212:32: error: ‘uchar’ was not declared in this
> > scope
> >
> > stream->bufbase_ = JAS_CAST(uchar *, buf);
> >
> > ^
> >
> > jpeg2000_vsil_io.cpp:212:23: error: expected primary-expression before
> > ‘)’ token
> >
> > stream->bufbase_ = JAS_CAST(uchar *, buf);
> >
> > ^
> >
> > make[2]: *** [../../GDALmake.opt:648: ../o/jpeg2000_vsil_io.o] Error 1
> > make[2]: Leaving directory
> > '/tmp/makepkg/gdal-filegdb/src/gdal-2.1/frmts/jpeg2000'
> > make[1]: *** [GNUmakefile:15: jpeg2000-install-obj] Error 2
> > make[1]: Leaving directory '/tmp/makepkg/gdal-filegdb/src/gdal-2.1/frmts'
> > make: *** [GNUmakefile:88: frmts-target] Error 2
> >
> > I have the following versions installed:
> >
> > jasper 1.900.31
> >
> > openjpeg2 2.1.2
--
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20161207/efcfcb26/attachment-0001.html>
More information about the gdal-dev
mailing list