[mapserver-users] GDAL 3.1 linking issue with TIFFGetStrileByteCountWithErr
Herzmann, Daryl E [AGRON]
akrherz at iastate.edu
Tue Oct 13 11:46:12 PDT 2020
Howdy again,
I figured I would figure it out after hitting send :/ The issue is that the RHEL8 provided libtiff is 4.0.9, so one needs to LD_PRELOAD anaconda's libtiff (4.1.0) to get that libtiff loaded first before the system provided one.
LD_PRELOAD=/opt/miniconda3/envs/prod/lib/libtiff.so php ....
Sorry for the noise and hopefully this helps somebody.
daryl
--
/**
* daryl herzmann
* Systems Analyst III -- Iowa Environmental Mesonet
* https://mesonet.agron.iastate.edu
*/
________________________________________
From: mapserver-users <mapserver-users-bounces at lists.osgeo.org> on behalf of Herzmann, Daryl E [AGRON] <akrherz at iastate.edu>
Sent: Tuesday, October 13, 2020 1:29 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] GDAL 3.1 linking issue with TIFFGetStrileByteCountWithErr
Howdy,
I've been playing around attempting to build mapserver (7.6 branch or master) against https://anaconda.org (conda-forge) provided GDAL 3.1. My build command is below. Whilst I am able to build mapserver, I hit runtime errors like so:
PHP Warning: PHP Startup: Unable to load dynamic library 'php_mapscript' (tried: /usr/lib64/php/modules/php_mapscript (/usr/lib64/php/modules/php_mapscript: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/php_mapscript.so (/opt/miniconda3/envs/prod/lib/libgdal.so.27: undefined symbol: TIFFGetStrileByteCountWithErr)) in Unknown on line 0
For right or wrong, this used to work with GDAL 3.0. A workaround is to tell PHP to LD_PRELOAD gdal.so like so:
LD_PRELOAD=/opt/miniconda3/envs/prod/lib/libgdal.so.27 php ...
Any comments on this situation. Is it just expected that the GDAL mapserver links against is compiled with --with-libtiff=internal ?
thanks
daryl
export MYCONDA=/opt/miniconda3/envs/prod
cmake .. -DWITH_CLIENT_WFS=1 \
-DWITH_CLIENT_WMS=1 \
-DWITH_GIF=1 \
-DWITH_PHP=1 \
-DWITH_PYTHON=1 \
-DWITH_PROTOBUFC=0 \
-DCMAKE_INSTALL_PREFIX:PATH=$MYCONDA \
-DPNG_LIBRARY=$MYCONDA/lib/libpng.so \
-DPNG_INCLUDE_DIR=$MYCONDA/include \
-DJPEG_LIBRARY=$MYCONDA/lib/libjpeg.so \
-DJPEG_INCLUDE_DIR=$MYCONDA/include \
-DFREETYPE_LIBRARY=$MYCONDA/lib/libfreetype.so \
-DFREETYPE_INCLUDE_DIR=$MYCONDA/include \
-DGIF_LIBRARY=$MYCONDA/lib/libgif.so \
-DGIF_INCLUDE_DIR=$MYCONDA/include \
-DCAIRO_LIBRARY=$MYCONDA/lib/libcairo.so \
-DCAIRO_INCLUDE_DIR=$MYCONDA/include/cairo/ \
-DCURL_LIBRARY=$MYCONDA/lib/libcurl.so \
-DCURL_INCLUDE_DIR=$MYCONDA/include \
-DPROJ_LIBRARY=$MYCONDA/lib/libproj.so \
-DPROJ_INCLUDE_DIR=$MYCONDA/include \
-DLIBXML2_LIBRARY=$MYCONDA/lib/libxml2.so \
-DLIBXML2_INCLUDE_DIR=$MYCONDA/include/libxml2/ \
-DHARFBUZZ_LIBRARY=$MYCONDA/lib/libharfbuzz.so \
-DHARFBUZZ_INCLUDE_DIR=$MYCONDA/include/harfbuzz/ \
-DFRIBIDI_LIBRARY=$MYCONDA/lib/libfribidi.so \
-DFRIBIDI_INCLUDE_DIR=$MYCONDA/include \
-DZLIB_LIBRARY=$MYCONDA/lib/libz.so \
-DZLIB_INCLUDE_DIR=$MYCONDA/include \
-DGEOS_LIBRARY=$MYCONDA/lib/libgeos_c.so \
-DGEOS_INCLUDE_DIR=$MYCONDA/include \
-DGDAL_LIBRARY=$MYCONDA/lib/libgdal.so \
-DGDAL_INCLUDE_DIR=$MYCONDA/include \
-DPOSTGRESQL_LIBRARY=$MYCONDA/lib/libpq.so \
-DPOSTGRESQL_INCLUDE_DIR=$MYCONDA/include
--
/**
* daryl herzmann
* Systems Analyst III -- Iowa Environmental Mesonet
* https://mesonet.agron.iastate.edu
*/
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list