I found an old post from Even that mentioned PKG_CONFIG_PATH so I added the 
follow and everything works now:

ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

Ashley Mort
Sr. Software Engineer
972-638-6317 office
814-571-3039 cell

From: Ashley Mort
Sent: Friday, November 18, 2022 5:17 PM
To: gdal-dev@lists.osgeo.org
Subject: jp2openjpeg: gdal build not finding openjpeg

I am trying to get jp2openjpeg in my GDAL build.  This is in a docker image 
running CentOS7.  I have successfully installed other libraries with GDAL 
(PROJ, Expat, LibTIFF, etc.) so I'm not sure why it's not finding OpenJPEG.

Can anyone provide any advice on how to get the jp2openjpeg driver going for my 
GDAL build?  My Linux & GDAL build knowledge is mediocre at best.  I am willing 
to change GDAL version or try to use it as a plugin if necessary but I'm just 
not sure what I need to be investigating.  Any ideas?

Thanks!
Ashley

/usr/local/lib has:
-rw-r--r--. 1 root root    564662 Nov 18 18:59 libopenjp2.a
lrwxrwxrwx. 1 root root        15 Nov 18 18:59 libopenjp2.so -> libopenjp2.so.7
-rwxr-xr-x. 1 root root    458888 Nov 18 18:59 libopenjp2.so.2.5.0
lrwxrwxrwx. 1 root root        19 Nov 18 18:59 libopenjp2.so.7 -> 
libopenjp2.so.2.5.0

GDAL ./configure output shows:
checking for OPENJPEG... no

OpenJPEG support:          no

Dockerfile parts:
#install OpenJPEG (GDAL JP2OpenJPEG jpeg2000 support for reading JPEG2000 
compressed NITF files)
ADD https://dev-server:8443/openjpeg/openjpeg-2.5.0.tar.gz /
RUN tar xzf openjpeg-2.5.0.tar.gz && \
    rm openjpeg-2.5.0.tar.gz && \
    cd openjpeg-2.5.0 && \
    cmake -DCMAKE_BUILD_TYPE=Release && \
   make -j6 && \
    make -j6 install

ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64

#install GDAL
ADD https://dev-server:8443/artifactory/com/gdal/gdal/3.4.1/gdal-3.4.1.tar.gz /
RUN tar xzf gdal-3.4.1.tar.gz && \
    rm gdal-3.4.1.tar.gz && \
    cd gdal-3.4.1 && \
    ./configure --with-openjpeg --with-proj && \
    make -j6 && \
    make -j6 install

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to