Community Packages

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#56121 - [gdal] JPEG2000 support doesn't work since openjpeg2 2.3.0

Attached to Project: Community Packages
Opened by Laurențiu Nicola (lnicola) - Thursday, 26 October 2017, 07:45 GMT
Last edited by Doug Newgard (Scimmia) - Monday, 27 November 2017, 15:14 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jaroslav Lichtblau (Dragonlord)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


GDAL can't open JPEG2000 files.

Additional info:
* gdal 2.2.2-1

Steps to reproduce:

I used the first image from

$ opj_dump -i TC_NG_Baghdad_IQ_Geo.jp2

[INFO] Start to read j2k main header (2144).
[INFO] Main header has been correctly decoded.
Image info {
x0=0, y0=0
x1=4408, y1=4323
component 0 {
dx=1, dy=1

$ gdalinfo TC_NG_Baghdad_IQ_Geo.jp2
ERROR 4: `TC_NG_Baghdad_IQ_Geo.jp2' not recognized as a supported file format.
gdalinfo failed - unable to open 'TC_NG_Baghdad_IQ_Geo.jp2'.

On a different box (CentOS):

$ gdalinfo TC_NG_Baghdad_IQ_Geo.jp2
Driver: JP2OpenJPEG/JPEG-2000 driver based on OpenJPEG library
Files: TC_NG_Baghdad_IQ_Geo.jp2
Size is 4408, 4323
Coordinate System is:
This task depends upon

Closed by  Doug Newgard (Scimmia)
Monday, 27 November 2017, 15:14 GMT
Reason for closing:  Fixed
Additional comments about closing:  gdal 2.2.3-1
Comment by Laurențiu Nicola (lnicola) - Thursday, 26 October 2017, 07:52 GMT
checking openjpeg-2.2/openjpeg.h usability... no
checking openjpeg-2.2/openjpeg.h presence... no
checking for openjpeg-2.2/openjpeg.h... no
checking openjpeg-2.1/openjpeg.h usability... no
checking openjpeg-2.1/openjpeg.h presence... no
checking for openjpeg-2.1/openjpeg.h... no
checking openjpeg-2.0/openjpeg.h usability... no
checking openjpeg-2.0/openjpeg.h presence... no
checking for openjpeg-2.0/openjpeg.h... no
OpenJPEG support: no

$ pacman -Qo /usr/include/openjpeg-2.3
/usr/include/openjpeg-2.3/ is owned by openjpeg2 2.3.0-1

Right, then. Probably an upstream issue.
Comment by Laurențiu Nicola (lnicola) - Thursday, 26 October 2017, 07:56 GMT
Patch available here, although I didn't test it.
Comment by Eli Schwartz (eschwartz) - Thursday, 26 October 2017, 15:50 GMT
No, that just switches the version used in Travis CI.

The configure fix is here:
All it does is modify the include path so it should be quite safe to cherry-pick.
Comment by Laurențiu Nicola (lnicola) - Thursday, 26 October 2017, 16:07 GMT
Sorry, I pasted the wrong URL. That's the proper one.
Comment by Laurențiu Nicola (lnicola) - Monday, 27 November 2017, 09:41 GMT
Fixed in gdal 2.2.3-1