Created attachment 214270 [details] gdal 3.1.0 graphics/gdal: Update to 3.1.0 - fix xml2 configure variable - fix bash_completion script - fix install data - change default_options see #24004 - use qhull from ports - move USES (pet portlint) tested at home and poudriere 12amd64 porlint (looks fine.)
Created attachment 214271 [details] gdal and py-gdal 3.1.0
Hi Loïc, Many thanks for this update. I just tried it on a real life box (13.0-CURRENT amd64; ports options all default) and it breaks with the following message: (cd apps; gmake) gmake[3]: Entering directory '/usr/ports/graphics/gdal/work/gdal-3.1.0/apps' c++ -Wl,-rpath,/usr/local/lib -L/usr/local/lib -fstack-protector-strong gdalwarp_bin.o -L/usr/ports/graphics/gdal/work/gdal-3.1.0 -lgdal -L/usr/local/lib -lIlmImf-2_5 -lImath-2_5 -lHalf-2_5 -lIex-2_5 -lIexMath-2_5 -lIlmThread-2_5 -pthread -lcrypto -L/usr/local/lib -lpoppler -ljson-c -lfreexl -lqhull -L/usr/local/lib -lSFCGAL -L/usr/local/lib -lgeos_c -lwebp -L/usr/local/lib -lkmlbase -lkmldom -lkmlengine -lkmlxsd -lkmlregionator -L/usr/local/lib -lexpat -L/usr/local/lib -lxerces-c -lpthread -L/usr/local/lib -lopenjp2 -ljasper -L/usr/local/lib -lnetcdf -lhdf5 -lgif -ljpeg -lgeotiff -ltiff -lpng -L/usr/local/lib -lpq -lzstd -llzma -lproj -lz -L/usr -L/usr/lib -lpthread -lm -lrt -ldl -L/usr/local/lib -lspatialite -lsqlite3 -lpcre -L/usr/local/lib -lcurl -L/usr/local/lib -lxml2 -o gdalwarp ld: error: undefined symbol: CPLInstallErrorHandlerAccumulator(std::__1::vector<CPLErrorHandlerAccumulatorStruct, std::__1::allocator<CPLErrorHandlerAccumulatorStruct> >&) >>> referenced by gdalwarp_bin.cpp:272 >>> gdalwarp_bin.o:(main) ld: error: undefined symbol: CPLUninstallErrorHandlerAccumulator() >>> referenced by gdalwarp_bin.cpp:275 >>> gdalwarp_bin.o:(main) c++: error: linker command failed with exit code 1 (use -v to see invocation) gmake[3]: *** [GNUmakefile:108: gdalwarp] Error 1 gmake[3]: Leaving directory '/usr/ports/graphics/gdal/work/gdal-3.1.0/apps' gmake[2]: *** [GNUmakefile:114: apps-target] Error 2 gmake[2]: Leaving directory '/usr/ports/graphics/gdal/work/gdal-3.1.0' *** Error code 1 This does not happen, if I remove an installed gdal before the build of 3.1.0. Unfortunately, then there are three other issues in the staging process (with 'DEVELOPER=yes' set in /etc/make.conf): ====> Running Q/A tests (stage-qa) Error: Bad symlink 'etc/bash_completion.d/gdal2tiles.py' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdal2xyz.py' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdaladdo' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdalbuildvrt' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdal_calc.py' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdalchksum.py' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdalcompare.py' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdal-config' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdal_contour' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdaldem' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdal_edit.py' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdalenhance' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdal_fillnodata.py' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdal_grid' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdalident.py' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdalimport.py' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdallocationinfo' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdalmanage' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdal_merge.py' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdalmove.py' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdal_polygonize.py' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdal_proximity.py' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdal_rasterize' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdal_retile.py' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdalserver' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdal_sieve.py' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdalsrsinfo' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdaltindex' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdaltransform' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdal_translate' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/gdalwarp' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/ogr2ogr' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/ogrinfo' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/ogrlineref' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/ogrmerge.py' pointing inside the stage directory Error: Bad symlink 'etc/bash_completion.d/ogrtindex' pointing inside the stage directory Warning: 'bin/gdalinfo' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/gdalserver' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/gdal_translate' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/gdaladdo' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/gdalwarp' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/nearblack' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/gdalmanage' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/gdalenhance' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/gdaltransform' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/gdaldem' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/gdallocationinfo' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/gdalsrsinfo' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/gdalmdiminfo' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/gdalmdimtranslate' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/gdal_viewshed' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/gdal_contour' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/gdaltindex' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/gdal_rasterize' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/gdal_grid' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/ogrinfo' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/ogr2ogr' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/ogrtindex' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/ogrlineref' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/testepsg' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/gdalbuildvrt' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/gnmmanage' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'bin/gnmanalyse' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Error: /usr/local/bin/gdal_contour is linked to /usr/local/lib/libIlmImf-2_5.so.24 from graphics/openexr but it is not declared as a dependency Warning: you need LIB_DEPENDS+=libIlmImf-2_5.so:graphics/openexr Error: /usr/local/bin/gdal_contour is linked to /usr/local/lib/libImath-2_5.so.24 from graphics/ilmbase but it is not declared as a dependency Warning: you need LIB_DEPENDS+=libImath-2_5.so:graphics/ilmbase Error: /usr/local/bin/gdal_contour is linked to /usr/local/lib/libHalf-2_5.so.24 from graphics/ilmbase but it is not declared as a dependency Warning: you need LIB_DEPENDS+=libHalf-2_5.so:graphics/ilmbase Error: /usr/local/bin/gdal_contour is linked to /usr/local/lib/libIex-2_5.so.24 from graphics/ilmbase but it is not declared as a dependency Warning: you need LIB_DEPENDS+=libIex-2_5.so:graphics/ilmbase Error: /usr/local/bin/gdal_contour is linked to /usr/local/lib/libIexMath-2_5.so.24 from graphics/ilmbase but it is not declared as a dependency Warning: you need LIB_DEPENDS+=libIexMath-2_5.so:graphics/ilmbase Error: /usr/local/bin/gdal_contour is linked to /usr/local/lib/libIlmThread-2_5.so.24 from graphics/ilmbase but it is not declared as a dependency Warning: you need LIB_DEPENDS+=libIlmThread-2_5.so:graphics/ilmbase *** Error code 1 Stop. make[1]: stopped in /usr/ports/graphics/gdal HTH and best wishes, Rainer
After building and installing graphics/gdal (w/o 'DEVELOPER=yes' set in /etc/make.conf) successful, I started some tests. It turns out, that 'gdal-config --datadir' gives back a wrong directory: '/usr/local/share/gdal/gdal' instead of '/usr/local/share/gdal'. Obviously, GDALmake.opt.in:l68 is responsible for that: With 'INST_DATA=@datadir@/gdal' it doubles the gdal dir name, since FreeBSD itself already has /usr/local/share/gdal as DATADIR? Don't know, if this is correct, but hopefully somewhat useful ...
Created attachment 214378 [details] gdal and py-gdal 3.1.0 fixed
(In reply to Rainer Hurling from comment #2) Thanks Rainer! I'm sorry I was on the wrong patch... I push the fixed one. Can you try it please? And, yes, you have to deinstall gdal to build it. It's a long time issue :/
(In reply to Loïc Bartoletti from comment #5) Thanks Loïc, For the update. I just reinstalled and as one of the first steps after, tested #gdal-config --datadir /usr/local/share/gdal/gdal It's a bit confusing, but now it seems, the contents of /usr/local/share/gdal doubles under /usr/local/share/gdal/gdal. I think this is not intended. The first level is sufficient, isn't it?
*** This bug has been marked as a duplicate of bug 246392 ***
Created attachment 214402 [details] gdal, p5-geo-GDAL and py-gdal 3.1.0 fixed Rainer, Sorry, you're right I duplicated entries from datadir and forgot to set the new path.