Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#5579 closed defect (fixed)

GDAL doesn't compile against openjpeg 2.1.0

Reported by: saultdon Owned by: warmerdam
Priority: normal Milestone: 2.0.0
Component: ConfigBuild Version: 1.11.0
Severity: normal Keywords:
Cc: reffettc@…

Description

I'm having some troubles getting gdal to compile against openjpeg 2.1.0 on Linux.

Compile reports the following error(s):

cannot find openjpeg.h in /usr/include/openjpeg-2.0 (doesn't exist)

So I made a symlink of openjpeg-2.1 to /usr/include/openjpeg-2.0

Then compiling spits out:

g++ -march=native -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC -DHAVE_SSE_AT_COMPILE_TIME  -Wall  -I/tmp/makepkg/gdal-filegdb/src/gdal-1.11.0/port -I/tmp/makepkg/gdal-filegdb/src/gdal-1.11.0/gcore -I/tmp/makepkg/gdal-filegdb/src/gdal-1.11.0/alg -I/tmp/makepkg/gdal-filegdb/src/gdal-1.11.0/ogr -I/tmp/makepkg/gdal-filegdb/src/gdal-1.11.0/ogr/ogrsf_frmts -DOGR_ENABLED -D_FORTIFY_SOURCE=2 -I/tmp/makepkg/gdal-filegdb/src/gdal-1.11.0/port -I/usr/include  -c -o ../o/openjpegdataset.o openjpegdataset.cpp
openjpegdataset.cpp: In member function ‘CPLErr JP2OpenJPEGDataset::ReadBlock(int, VSILFILE*, int, int, void*, int, int*)’:
openjpegdataset.cpp:615:41: error: too few arguments to function ‘void opj_stream_set_user_data(void**, void*, opj_stream_free_user_data_fn)’
     opj_stream_set_user_data(pStream, fp);
                                         ^
In file included from openjpegdataset.cpp:33:0:
/usr/include/openjpeg-2.0/openjpeg.h:1154:27: note: declared here
 OPJ_API void OPJ_CALLCONV opj_stream_set_user_data (opj_stream_t* p_stream, void * p_data, opj_stream_free_user_data_fn p_function);
                           ^
openjpegdataset.cpp: In static member function ‘static GDALDataset* JP2OpenJPEGDataset::Open(GDALOpenInfo*)’:
openjpegdataset.cpp:953:41: error: too few arguments to function ‘void opj_stream_set_user_data(void**, void*, opj_stream_free_user_data_fn)’
     opj_stream_set_user_data(pStream, fp);
                                         ^
In file included from openjpegdataset.cpp:33:0:
/usr/include/openjpeg-2.0/openjpeg.h:1154:27: note: declared here
 OPJ_API void OPJ_CALLCONV opj_stream_set_user_data (opj_stream_t* p_stream, void * p_data, opj_stream_free_user_data_fn p_function);
                           ^
openjpegdataset.cpp: In static member function ‘static GDALDataset* JP2OpenJPEGDataset::CreateCopy(const char*, GDALDataset*, int, char**, GDALProgressFunc, void*)’:
openjpegdataset.cpp:1501:41: error: too few arguments to function ‘void opj_stream_set_user_data(void**, void*, opj_stream_free_user_data_fn)’
     opj_stream_set_user_data(pStream, fp);
                                         ^
In file included from openjpegdataset.cpp:33:0:
/usr/include/openjpeg-2.0/openjpeg.h:1154:27: note: declared here
 OPJ_API void OPJ_CALLCONV opj_stream_set_user_data (opj_stream_t* p_stream, void * p_data, opj_stream_free_user_data_fn p_function);
                           ^
../../GDALmake.opt:561: recipe for target '../o/openjpegdataset.o' failed
make[2]: *** [../o/openjpegdataset.o] Error 1
make[2]: Leaving directory '/tmp/makepkg/gdal-filegdb/src/gdal-1.11.0/frmts/openjpeg'
GNUmakefile:10: recipe for target 'openjpeg-install-obj' failed
make[1]: *** [openjpeg-install-obj] Error 2
make[1]: Leaving directory '/tmp/makepkg/gdal-filegdb/src/gdal-1.11.0/frmts'
GNUmakefile:63: recipe for target 'frmts-target' failed
make: *** [frmts-target] Error 2

Change History (3)

comment:1 Changed 7 years ago by reffettc

Cc: reffettc@… added

comment:2 Changed 7 years ago by Even Rouault

Milestone: 2.0
Resolution: fixed
Status: newclosed

trunk r27538 "JP2OpenJPEG: add compatibility with OpenJPEG 2.1 (#5579)"

comment:3 Changed 6 years ago by Even Rouault

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.