New GEOS >= 3.10 functions not available in MSVC build?

63 views
Skip to first unread message

Pieter Roggemans

unread,
Nov 3, 2023, 9:44:05 AM11/3/23
to SpatiaLite Users
Is it possible that the new GEOS >= 3.10 functions (e.g. ST_ReducePrecision) are not available in default builds using MSVC?

I use the conda-forge package libspatialite typically and the new GEOS-based functions give an error when I try to use them.

I also opened in issue in the conda-forge spatialite feedstock, but it seems to use the default MSVC build options/procedure as described here, so possibly it would be better if it is changed in the spatialite src:

Pieter Roggemans

unread,
Nov 3, 2023, 11:23:44 AM11/3/23
to SpatiaLite Users
If I understand correctly,  there are some macros not being set that control these features to be available. In header file gaiaconfig.h the macros are not being set. Howevere, in configure, for the gcc based compiling, the macros are added to a confdefs.h file by default. I wonder if this logic isn't kind of missing in the MSVC scripts provided?

Op vrijdag 3 november 2023 om 14:44:05 UTC+1 schreef Pieter Roggemans:

a.fu...@lqt.it

unread,
Nov 3, 2023, 1:17:02 PM11/3/23
to spatiali...@googlegroups.com
On Fri, 3 Nov 2023 08:23:44 -0700 (PDT), Pieter Roggemans wrote:
> If I understand correctly,  there are some macros not being set that
> control these features to be available. In header file gaiaconfig.h
> the macros are not being set. Howevere, in configure, for the gcc
> based compiling, the macros are added to a confdefs.h file by
> default.
> I wonder if this logic isn't kind of missing in the MSVC scripts
> provided?
>

Hi Piotr,

the standard compiler internally used to test under Windows
the current development version is MSYS2+MinGW.

support for building under MSVC is tested and eventually
updated only during the very last stages of the release
cycle of a new version, so it's not at all surprising
if it's currently out of sync.

possible solutions:

A) installing the wonderful MSYS2 + MinGW has never been
as simple and easy as today.
Here you'll find a constantly updated step by step
how-to guide:
https://www.gaia-gis.it/gaia-sins/mingw32_how_to.html
https://www.gaia-gis.it/gaia-sins/mingw64_how_to.html

B) if you absolutely want to use MSVC you can try to fix
the build scripts yourself, it shouldn't be
particularly difficult.

bye Sandro

Pieter Roggemans

unread,
Nov 4, 2023, 7:30:22 AM11/4/23
to spatiali...@googlegroups.com
The conda-forge packages seem typically to be compiled with MSVC...

I looked up the missing macro's and a package maintainer is going to include them in a patch to the source code that is applied before building, so it should work out.

Op vr 3 nov 2023 om 18:17 schreef <a.fu...@lqt.it>:
--
You received this message because you are subscribed to the Google Groups "SpatiaLite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spatialite-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spatialite-users/f75643050b7a8932eb3e15c08ef73c94%40lqt.it.

Pieter Roggemans

unread,
Nov 7, 2023, 5:06:30 AM11/7/23
to SpatiaLite Users
Adding the following defines in ./src/headers/spatialite/gaiaconfig-msvc.h seems to solve it.

#define GEOS_3100 1
#define GEOS_3110 1

Probably easiest if you can add this in the code, to avoid other people having to look for it...


Op zaterdag 4 november 2023 om 12:30:22 UTC+1 schreef Pieter Roggemans:
Reply all
Reply to author
Forward
Message has been deleted
0 new messages