[gdal-dev] MSSQLSpatial driver cmake build issues

Tamas Szekeres szekerest at gmail.com
Mon Feb 6 14:55:56 PST 2023


Even,

It looks like a good idea.

Thanks,

Tamas



Even Rouault <even.rouault at spatialys.com> ezt írta (időpont: 2023. febr.
6., H, 21:13):

> Tamas,
>
> I would just do:
>
> - do a GDAL build with the MSSQLSpatial driver built-in with the generic
> ODBC driver: -DOGR_ENABLE_DRIVER_MSSQLSPATIAL_PLUGIN=OFF
> -DGDAL_USE_MSSQL_ODBC=OFF -DGDAL_USE_MSSQL_NCLI=OFF
>
> - build it as plugin with MSSQL_ODBC: run cmake again with
> -DOGR_ENABLE_DRIVER_MSSQLSPATIAL_PLUGIN=ON -DGDAL_USE_MSSQL_ODBC=ON
> -DGDAL_USE_MSSQL_NCLI=OFF
>
> - build it as plugin with MSSQL_NCLI: run cmake again with
> -DOGR_ENABLE_DRIVER_MSSQLSPATIAL_PLUGIN=ON -DGDAL_USE_MSSQL_ODBC=OFF
> -DGDAL_USE_MSSQL_NCLI=ON
>
> Even
> Le 06/02/2023 à 20:44, Tamas Szekeres a écrit :
>
> Hi GDAL Devs,
>
> The GISInternals build SDK has been changed to use GDAL 3.6.x and
> therefore it has completely switched to the cmake build. We noticed that
> this change caused to break the appveyor builds for MapServer (with the
> error: Unable to find driver `MSSQLSpatial' ).
> Formerly the MSQLSpatial driver has been built into GDAL by default using
> the legacy ODBC driver, but we could also compile plugin builds against the *SQL
> Server Native Client* and the new *SQL Server ODBC 17* driver, too. If
> either of the plugins was installed with GDAL, the plugin driver (with the
> same name) superseded the functionality of the built in driver.
> With the cmake build - however - if we compile a plugin build (and only
> one driver is supported) the built in driver is not compiled anymore.
>
> The problem with the current solution is that neither the native client
> nor the ODBC 17 drivers are installed on Windows by default and these
> drivers require additional installations. When we install these plugins
> with GDAL, it may cause a failure when the driver is loaded that the the
> related ODBC driver dll-s couldn't be found on the system.
>
> Would that be possible somehow to restore the original behavior for
> example by modifying the cmake build setup for MSSQLSpatial, so that we
> could create a built-in driver as well as one or more plugin drivers
> (against different ODBC drivers) within the same cmake configuration? I
> guess it would somewhat require to add multiple *add_library* entries in
> the cmake setup, but I'm not sure how that fits into the current
> *add_gdal_driver* ecosystem.
>
>
> Thanks,
>
> Tamas
>
>
>
>
>
>
> _______________________________________________
> gdal-dev mailing listgdal-dev at lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> -- http://www.spatialys.com
> My software is free, but my time generally not.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230206/d5d0005e/attachment.htm>


More information about the gdal-dev mailing list