MXE compilation, openjpeg.h not found error

487 views Asked by At

I am compiling MXE for the cross-compilation of FFmpeg. I am following the instructions here and after running the make command, the following error occurred:

[build]       proj                   i686-w64-mingw32.static
[done]        proj                   i686-w64-mingw32.static                                  27156 KiB      0m10.026s
[build]       libgeotiff             i686-w64-mingw32.static
[done]        libgeotiff             i686-w64-mingw32.static                                  41492 KiB      0m19.380s
[build]       netcdf                 i686-w64-mingw32.static
[done]        netcdf                 i686-w64-mingw32.static                                  114152 KiB     0m22.519s
[build]       openjpeg               i686-w64-mingw32.static
[done]        openjpeg               i686-w64-mingw32.static                                  38572 KiB      0m9.627s
[build]       spatialite             i686-w64-mingw32.static
[done]        spatialite             i686-w64-mingw32.static                                  380204 KiB     0m58.171s
[build]       gdal                   i686-w64-mingw32.static

Failed to build package gdal for target i686-w64-mingw32.static!
------------------------------------------------------------
checking for nc_open in -lnetcdf... no
configure: JasPer (JPEG2000) support disabled.
configure: error: openjpeg.h not found in /home/hiqbal/mxe/usr/i686-w64-mingw32.static/include/openjpeg-2.0 or /home/hiqbal/mxe/usr/i686-w64-mingw32.static/include/openjpeg-2.1 or /home/hiqbal/mxe/usr/i686-w64-mingw32.static/include/openjpeg-2.2 or /home/hiqbal/mxe/usr/i686-w64-mingw32.static/include/openjpeg-2.3
Makefile:851: recipe for target 'build-only-gdal_i686-w64-mingw32.static' failed
make[1]: *** [build-only-gdal_i686-w64-mingw32.static] Error 1
make[1]: Leaving directory '/home/hiqbal/mxe'
real    0m17.644s
user    0m13.999s
sys 0m1.669s
------------------------------------------------------------
[log]      /home/hiqbal/mxe/log/gdal_i686-w64-mingw32.static

Makefile:851: recipe for target '/home/hiqbal/mxe/usr/i686-w64-mingw32.static/installed/gdal' failed
make: *** [/home/hiqbal/mxe/usr/i686-w64-mingw32.static/installed/gdal] Error 1

It seems that it was unable to find openjpeg.h and searched in folder openjpeg-2.0 to openjpeg-2.3. However, when I checked /mxe/usr/i686-w64-mingw32.static/include/, it contains openjpeg-2.4.

The log for /mxe/log/gdal_i686-w64-mingw32.static is present here.

Please help fix this. Thanks.

1

There are 1 answers

0
Hizzy On BEST ANSWER

gdal is installing 2.4 which is an issue. Run this make command make gdal_CONFIGURE_OPTS=--with-openjpeg=no ... to turn it off.

git hub issue: https://github.com/mxe/mxe/issues/2630