Created attachment 240274 [details] gdal 3.6.1 configure log Since CMAKE switch, our gdal come back with no driver enabled... The cmake options have some default, but no one are really enabled. What's I have for vector drivers: ``` Unable to open datasource `file.gpkg' with the following drivers. -> `ESRI Shapefile' -> `MapInfo File' -> `OGR_VRT' -> `Memory' -> `KML' -> `GeoJSON' -> `GeoJSONSeq' -> `ESRIJSON' -> `TopoJSON' ``` In attachment my gdal's configure log.
Hi Loïc, Thanks for the pointer. I just had a look and on my boxes also drivers for SAGA and PostGIS are not enabled anymore :( A complete list of enabled and disabled drivers is listed by 'make configure' in the port: -- Enabled drivers and features and found dependency packages -- The following features have been enabled: * gdal_GTIFF, GeoTIFF image format * gdal_MEM, Read/write data in Memory * gdal_VRT, Virtual GDAL Datasets * gdal_HFA, Erdas Imagine .img * ogr_MEM, Read/write driver for MEMORY virtual files * ogr_GEOJSON, GeoJSON/ESRIJSON/TopoJSON driver * ogr_TAB, MapInfo TAB and MIF/MID * ogr_SHAPE, ESRI shape-file * ogr_KML, KML * ogr_VRT, VRT - Virtual Format -- The following OPTIONAL packages have been found: * Threads * ODBC Enable DB support through ODBC * Iconv Character set recoding (used in GDAL portability library) * LibXml2 Read and write XML formats * XercesC Read and write XML formats (needed for GMLAS and ILI drivers) * Deflate Enable libdeflate compression library (complement to ZLib) * OpenSSL Use OpenSSL library * ZSTD, Zstandard - Fast real-time compression algorithm, <https://github.com/facebook/zstd> ZSTD compression library * SFCGAL gdal core supports ISO 19107:2013 and OGC Simple Features Access 1.2 for 3D operations * ZLIB zlib (external) * GIF GIF compression library (external) * JSONC json-c library (external) * Shapelib Enable Shapelib support (not recommended, internal Shapelib is preferred). * PCRE2 Enable PCRE2 support for sqlite3 * SPATIALITE Enable spatialite support for sqlite3 * RASTERLITE2 Enable RasterLite2 support for sqlite3 * LibKML * HDF5 Enable HDF5 * WebP WebP compression * FreeXL Enable XLS driver * CFITSIO C FITS I/O library * ECW Enable ECW driver * NetCDF Enable netCDF driver * OpenCL Enable OpenCL (may be used for warping) * PostgreSQL * LibLZMA LZMA compression * LZ4 LZ4 compression * Blosc Blosc compression * JXL JPEG-XL compression * JXL_THREADS JPEG-XL threading * TileDB enable TileDB driver * OpenEXR OpenEXR >=2.2 * HEIF HEIF >= 1.1 * OpenJPEG * Poppler, A PDF rendering library, <http://poppler.freedesktop.org> Enable PDF driver with Poppler (read side) * JNI SWIG_JAVA: Java binding * Java * BISON -- The following RECOMMENDED packages have been found: * EXPAT Read and write XML formats * TIFF (required version >= 4.0), Support for the Tag Image File Format (TIFF)., <https://libtiff.gitlab.io/libtiff/> Support for the Tag Image File Format (TIFF). gdal_GTIFF: GeoTIFF image format gdal_CALS: CALS type 1 driver * GeoTIFF libgeotiff library (external) * PNG PNG compression library (external) * JPEG JPEG compression library (external) * QHULL Enable QHULL (external) * SQLite3 Enable SQLite3 support (used by SQLite/Spatialite, GPKG, Rasterlite, MBTiles, etc.) * GEOS Geometry Engine - Open Source (GDAL core dependency) * SWIG, software development tool that connects programs written in C and C++ with a variety of high-level programming languages., <http://swig.org/> Enable language bindings -- The following features have been disabled: * gdal_JPEG, JPEG image format * gdal_RAW, Raw formats:EOSAT FAST Format, FARSITE LCP and Vexcel MFF2 Image * gdal_SDTS, SDTS translator * gdal_NITF, National Imagery Transmission Format * gdal_GXF, GXF * gdal_AAIGRID, Arc/Info ASCII Grid Format. * gdal_CEOS, CEOS translator * gdal_SAR_CEOS, ASI CEOS translator * gdal_XPM, XPM image format * gdal_DTED, Military Elevation Data * gdal_JDEM, JDEM driver * gdal_ENVISAT, Envisat * gdal_ELAS, Earth Resources Laboratory Applications Software * gdal_FIT, FIT driver * gdal_L1B, NOAA Polar Orbiter Level 1b Data Set (AVHRR) * gdal_RS2, RS2 -- RadarSat 2 XML Product * gdal_ILWIS, Raster Map * gdal_RMF, RMF --- Raster Matrix Format * gdal_LEVELLER, Daylon Leveller heightfield * gdal_SGI, SGI Image driver * gdal_SRTMHGT, SRTM HGT File Read Support * gdal_IDRISI, Idrisi Raster Format * gdal_GSG, Implements the Golden Software Surfer 7 Binary Grid Format. * gdal_ERS, ERMapper .ERS * gdal_JAXAPALSAR, JAXA PALSAR Level 1.1 and Level 1.5 processed products support * gdal_DIMAP, SPOT Dimap Driver * gdal_GFF, Ground-based SAR Applitcations Testbed File Format driver * gdal_COSAR, COSAR -- TerraSAR-X Complex SAR Data Product * gdal_PDS, USGS Astrogeology ISIS Cube (Version 2) * gdal_ADRG, ADRG reader and ASRP/USRP Reader * gdal_COASP, DRDC Configurable Airborne SAR Processor (COASP) data reader * gdal_TSX, TerraSAR-X XML Product Support * gdal_TERRAGEN, Terragen™ Terrain File * gdal_BLX, Magellan BLX Topo File Format * gdal_MSGN, Meteosat Second Generation (MSG) Native Archive Format (.nat) * gdal_TIL, EarthWatch .TIL Driver * gdal_R, R Object Data Store * gdal_NORTHWOOD, NWT_GRD/NWT_GRC -- Northwood/Vertical Mapper File Format * gdal_SAGA, SAGA GIS Binary Driver * gdal_XYZ, ASCII Gridded XYZ * gdal_HEIF, HEIF * gdal_ESRIC, ESRI compact cache * gdal_HF2, HF2/HFZ heightfield raster * gdal_KMLSUPEROVERLAY * gdal_CTG, CTG driver * gdal_ZMAP, ZMAP * gdal_NGSGEOID, NOAA NGS Geoid Height Grids * gdal_IRIS, IRIS driver * gdal_MAP, OziExplorer .MAP * gdal_CALS, CALS type 1 * gdal_SAFE, SAFE -- Sentinel-1 SAFE XML Product * gdal_SENTINEL2, Driver for Sentinel-2 Level-1B, Level-1C and Level-2A products. * gdal_PRF, PHOTOMOD Raster File * gdal_MRF, Meta raster format * gdal_WMTS, OGC Web Map Tile Service * gdal_GRIB, WMO General Regularly-distributed Information in Binary form * gdal_BMP, Microsoft Windows Device Independent Bitmap * gdal_TGA, TGA * gdal_STACTA, STACTA * gdal_OGCAPI, OGCAPI * gdal_BSB, Maptech/NOAA BSB Nautical Chart Format * gdal_AIGRID, Arc/Info Binary Grid Format * gdal_ARG, ARG: Azavea Raster Grid * gdal_USGSDEM, USGS ASCII DEM (and CDED) * gdal_AIRSAR, AirSAR Polarimetric Format * gdal_OZI, OZF2/OZFX3 raster * gdal_PCIDSK, PCI Geomatics Database File * gdal_SIGDEM, Scaled Integer Gridded DEM .sigdem Driver * gdal_MSG, Meteosat Second Generation * gdal_RIK, RIK -- Swedish Grid Maps * gdal_STACIT, STACIT * gdal_PDF, Geospatial PDF * gdal_PNG, PNG image format * gdal_GIF, Graphics Interchange Format * gdal_WCS, OGC Web Coverage Service * gdal_HTTP, HTTP driver * gdal_NETCDF, NetCDF network Common Data Form * gdal_ZARR, ZARR * gdal_DAAS, Airbus DS Intelligence Data As A Service(DAAS) * gdal_EEDA, Earth Engine Data API * gdal_FITS, FITS Driver * gdal_RASDAMAN, Rasdaman GDAL driver * gdal_HDF5, Hierarchical Data Format Release 5 (HDF5) * gdal_PLMOSAIC, PLMosaic (Planet Labs Mosaics API) * gdal_WMS, Web Map Services * gdal_GTA, Generic Tagged Arrays * gdal_WEBP, WebP * gdal_HDF4, Hierarchical Data Format Release 4 (HDF4) * gdal_RASTERLITE, Rasterlite - Rasters in SQLite DB * gdal_MBTILES, MBTile * gdal_POSTGISRASTER, PostGIS Raster driver * gdal_DDS, DirectDraw Surface * gdal_KEA, Kea * gdal_JP2OPENJPEG, JPEG2000 driver based on OpenJPEG library * gdal_TILEDB, TileDB tiledb.io * gdal_EXR, EXR support via OpenEXR library * gdal_PCRASTER, PCRaster CSF 2.0 raster file driver * gdal_RDB, RIEGL RDB Map Pixel (.mpx) driver * gdal_JPEGXL, JPEG-XL * gdal_BASISU_KTX2, Basis Universal and KTX2 texture formats * gdal_JP2KAK, JPEG-2000 (based on Kakadu) * gdal_JPIPKAK, JPIP Streaming * gdal_JP2LURA, JPEG-2000 (based on Luratech) * gdal_SDE, ESRI ArcSDE Raster * gdal_MRSID, Multi-resolution Seamless Image Database * gdal_GEOR, Oracle Spatial GeoRaster * gdal_ECW, ERDAS JPEG2000 (.jp2) * ogr_AVC, AVC * ogr_GML, GML * ogr_CSV, CSV * ogr_DGN, DGN * ogr_GMT, GMT * ogr_NTF, NTF * ogr_S57, S57 * ogr_TIGER, U.S. Census TIGER/Line * ogr_GEOCONCEPT, GEOCONCEPT * ogr_GEORSS, GEORSS * ogr_DXF, DXF * ogr_PGDUMP, PGDump * ogr_GPSBABEL, GPSBABEL * ogr_EDIGEO, EDIGEO * ogr_SXF, SXF * ogr_OPENFILEGDB, OPENFILEGDB * ogr_WASP, WAsP .map format * ogr_SELAFIN, OSELAFIN * ogr_JML, JML * ogr_VDV, VDV-451/VDV-452/INTREST Data Format * ogr_FLATGEOBUF, FlatGeobuf * ogr_MAPML, MapML * ogr_SDTS, SDTS * ogr_GPX, GPX - GPS Exchange Format * ogr_GMLAS, GMLAS * ogr_SVG, Scalable Vector Graphics * ogr_CSW, CSW * ogr_DWG, DWG * ogr_FILEGDB, FileGDB * ogr_LIBKML, LibKML * ogr_NAS, NAS/ALKIS * ogr_PLSCENES, PLSCENES * ogr_SOSI, SOSI:Systematic Organization of Spatial Information * ogr_WFS, OGC WFS service * ogr_NGW, NextGIS Web * ogr_ELASTIC, ElasticSearch * ogr_IDRISI, IDRISI * ogr_PDS, Planetary Data Systems TABLE * ogr_SQLITE, SQLite3 / Spatialite RDBMS * ogr_GPKG, GeoPackage * ogr_OSM, OpenStreetMap XML and PBF * ogr_VFK, Czech Cadastral Exchange Data Format * ogr_MVT, MVT * ogr_AMIGOCLOUD, AMIGOCLOUD * ogr_CARTO, CARTO * ogr_ILI, ILI * ogr_MYSQL, MySQL * ogr_PG, PostGIS * ogr_MSSQLSPATIAL, MSSQLSPATIAL * ogr_ODBC, ODBC * ogr_PGEO, PGEO * ogr_XLSX, Microsoft Office Excel(xlsx) * ogr_XLS, Microsoft Office Excel(xls) * ogr_MONGODBV3, MongoDB V3 * ogr_CAD, OpenCAD * ogr_PARQUET, Parquet * ogr_ARROW, Arrow * ogr_OCI, Oracle OCI * ogr_IDB, IDB * ogr_ODS, ODS * ogr_OGDI, OGDI * ogr_LVBAG, LVBAG * ogr_HANA, SAP HANA -- The following OPTIONAL packages have not been found: * ODBCCPP odbc-cpp library (external) * MSSQL_NCLI MSSQL Native Client to enable bulk copy * MSSQL_ODBC MSSQL ODBC driver to enable bulk copy * MySQL MySQL * CryptoPP Use crypto++ library for CPL. * OpenCAD libopencad (external, used by OpenCAD driver) * BRUNSLI Enable BRUNSLI for JPEG packing in MRF * libQB3 Enable QB3 compression in MRF * GTA Enable GTA driver * MRSID MrSID raster SDK * Armadillo C++ library for linear algebra (used for TPS transformation) * HDF4 Enable HDF4 driver * KEA Enable KEA driver * OGDI Enable ogr_OGDI driver * FYBA enable ogr_SOSI driver * Crnlib enable gdal_DDS driver * basisu Enable BASISU driver * IDB enable ogr_IDB driver * RASDAMAN enable rasdaman driver * rdb enable RIEGL RDB library * MONGOCXX Enable MongoDBV3 driver * HDFS Enable Hadoop File System through native library * PDFIUM Enable PDF driver with Pdfium (read side) * Oracle Enable Oracle OCI driver * TEIGHA Enable DWG and DGNv8 drivers * FileGDB Enable FileGDB (based on closed-source SDK) driver * KDU Enable KAKADU * LURATECH Enable JP2Lura driver * Arrow Apache Arrow C++ library * Dotnet * CSharp SWIG_CSharp: CSharp binding -- The following RECOMMENDED packages have not been found: * LERC Enable LERC (external) -- Disabled components: * ODBC component has been detected, but is disabled with GDAL_USE_ODBC=false * CFITSIO component has been detected, but is disabled with GDAL_USE_CFITSIO=false * OPENCL component has been detected, but is disabled with GDAL_USE_OPENCL=OFF * POSTGRESQL component has been detected, but is disabled with GDAL_USE_POSTGRESQL=OFF GIS software like graphics/qgis and math/saga is not much usable with this configuration, I am afraid.
Hi, I was about to report it, seen it a few days ago, but needed some time to put my head in the new cmake build scripts: At first sight, it's because if GDAL_BUILD_OPTIONAL_DRIVERS if set to OFF, no optional drivers (ie 95% of GDAL's drivers) are not built, only the few internal ones. It was put in the CMAKE_OFF variable, if I move it to the CMAKE_ON, the drivers are built... But I did not have time yet to review if the driver selection is exactly what is requested (since package plisting is right, seems good?).
(In reply to Matthieu Volat from comment #2) Good catch! Thanks for the help.
(In reply to Matthieu Volat from comment #2) (In reply to Po-Chuan Hsieh from comment #3) from gdal-3.6.2_2.log: Error: Orphaned: lib/gdalplugins/gdal_HDF5.so Error: Orphaned: lib/gdalplugins/gdal_JP2OpenJPEG.so Error: Orphaned: lib/gdalplugins/gdal_PCIDSK.so Error: Orphaned: lib/gdalplugins/gdal_PCRaster.so Error: Orphaned: lib/gdalplugins/gdal_PDF.so Error: Orphaned: lib/gdalplugins/gdal_PNG.so Error: Orphaned: lib/gdalplugins/gdal_WEBP.so Error: Orphaned: lib/gdalplugins/gdal_WMS.so Error: Orphaned: lib/gdalplugins/gdal_netCDF.so It seems that I have to: - Move GDAL_ENABLE_PLUGINS from CMAKE_ON to CMAKE_OFF - Move GDAL_BUILD_OPTIONAL_DRIVERS from CMAKE_OFF to CMAKE_ON - Add GDAL_ENABLE_PLUGINS_NO_DEPS to CMAKE_OFF
Created attachment 240542 [details] patch-to-enable-needed-drivers The missing drivers are causing major problems for many geo-based programs and services. For example, GDAL-based database queries cannot be performed with PostgreSQL/PostGIS. This affects programs like math/saga or graphics/qgis, but also geo packages of math/R and others. The attached patch changes the configuration of the port so that important missing drivers can be re-enabled. In addition to changes as shown in comment #4, it was also necessary to correct the notation from GDAL_USE_KML to GDAL_USE_LIBKML and from GDAL_USE_PGSQL to GDAL_USE_POSTGRESQL. pkg_plist was updated accordingly, probably adjustments are still necessary here.
Could you please try this one [1]? The version update should not affect the result. [1] https://people.freebsd.org/~sunpoet/patch/graphics-gdal.txt
(In reply to Po-Chuan Hsieh from comment #6) Hi Sunpoet, Thanks for the update. The patched versions builds fine. But it turns out, that your set of arguments is missing the build some important drivers (like gdal_PostGISRaster.so, gdal_TileDB.so, gdal_NetCDF.so, ogr_LIBKMS.so, and others), that I really need in my (standard) configuration for graphics/qgis and math/saga. The patched version builds fine. But it turns out that your set of arguments does not build some very important drivers (like gdal_PostGISRaster.so, gdal_TileDB.so, gdal_NetCDF.so, ogr_LIBKMS.so, and others) that I really need for the standard configuration of graphics/qgis and math/saga. A diff of pkg-plist with the updated one show the complete list of missing drivers (not all of them really necessary for my cases): 131d130 < lib/gdalplugins/gdal_ECW_JP2ECW.so 136d134 < lib/gdalplugins/gdal_EXR.so 142,143d139 < lib/gdalplugins/gdal_HDF5.so < lib/gdalplugins/gdal_HEIF.so 149,150d144 < lib/gdalplugins/gdal_JP2OpenJPEG.so < lib/gdalplugins/gdal_JPEGXL.so 160,162d153 < lib/gdalplugins/gdal_PCIDSK.so < lib/gdalplugins/gdal_PCRaster.so < lib/gdalplugins/gdal_PDF.so 164d154 < lib/gdalplugins/gdal_PNG.so 166d155 < lib/gdalplugins/gdal_PostGISRaster.so 185d173 < lib/gdalplugins/gdal_TileDB.so 188,189d175 < lib/gdalplugins/gdal_WEBP.so < lib/gdalplugins/gdal_WMS.so 195d180 < lib/gdalplugins/gdal_netCDF.so 198d182 < lib/gdalplugins/ogr_Carto.so 201d184 < lib/gdalplugins/ogr_Elastic.so 203d185 < lib/gdalplugins/ogr_GMLAS.so 210d191 < lib/gdalplugins/ogr_LIBKML.so 217,218d197 < lib/gdalplugins/ogr_PG.so < lib/gdalplugins/ogr_PLSCENES.so 224d202 < lib/gdalplugins/ogr_VFK.so 226d203 < lib/gdalplugins/ogr_XLS.so I would be very happy if the list of arguments can be adjusted to also build the drivers mentioned in the diff, or at least the four listed in parenthesis. Many thanks in advance, Rainer
It seems you want GDAL_ENABLE_PLUGINS enabled but it is disabled in my patch. Could you share why GDAL_ENABLE_PLUGINS should be enabled? That's why I put it in CMAKE_OFF. % grep GDAL_ENABLE_PLUGINS gdal.cmake option(GDAL_ENABLE_PLUGINS "Set ON to build drivers that have non-core external dependencies as plugin" OFF) option(GDAL_ENABLE_PLUGINS_NO_DEPS "Set ON to build drivers that have no non-core external dependencies as plugin" OFF) BTW, after I re-read the doc [1], I move GDAL_ENABLE_PLUGINS_NO_DEPS back to CMAKE_OFF. [1] https://gdal.org/development/building_from_source.html#cmdoption-arg-GDAL_ENABLE_PLUGINS_NO_DEPS-BOOL
(In reply to Po-Chuan Hsieh from comment #8) I think you are right. Both options, GDAL_ENABLE_PLUGINS and GDAL_ENABLE_PLUGINS_NO_DEPS, are not needed here. It is, as already mentioned by Matthieu Volat in comment #2, that GDAL_BUILD_OPTIONAL_DRIVERS is sufficient to include the drivers, needed for other ports like math/saga and graphics/qgis. Thank you for your work on this port.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=8b1e446b29c12d4178bcca2edb32efef3cbb96e1 commit 8b1e446b29c12d4178bcca2edb32efef3cbb96e1 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2023-04-05 17:14:43 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2023-04-05 17:30:00 +0000 graphics/gdal: Update to 3.6.3 - Fix options drivers [1] - Update WWW and clean up pkg-descr Changes: https://github.com/OSGeo/gdal/releases https://github.com/OSGeo/gdal/blob/release/3.6/NEWS.md PR: 269708 [1] graphics/gdal/Makefile | 21 ++++++++++----------- graphics/gdal/distinfo | 6 +++--- 2 files changed, 13 insertions(+), 14 deletions(-)
Hi Sunpoet, Many thanks for the update, especially for the options, enabled now! Best wishes, Rainer
(In reply to Rainer Hurling from comment #11) I second Rainer, many thanks sunpoet@ !