conda-forge / libspatialite-feedstock

A conda-smithy repository for libspatialite.
BSD 3-Clause "New" or "Revised" License
4 stars 11 forks source link

The geos 3.10 and geos 3.11 functions don't seem to be available on windows #100

Closed theroggy closed 12 months ago

theroggy commented 1 year ago

Solution to issue cannot be found in the documentation.

Issue

The geos 3.10 and geos 3.11 functions that were added in spatialite 5.1 don't seem to be available on windows. Par example GeosDensify, GeosMakeValid, ReducePrecision,...

They all lead to an error being raised when used in a sql statement: Error no such function: GeosDensify executing....

Other geos functions are available though, e.g. GEOSMinimumRotatedRectangle.

On Linux and MacOS all functions are available.

Installed packages

# Name                    Version                   Build  Channel      
accessible-pygments       0.0.4              pyhd8ed1ab_0    conda-forge
alabaster                 0.7.13             pyhd8ed1ab_0    conda-forge
attrs                     23.1.0             pyh71513ae_1    conda-forge
babel                     2.12.1             pyhd8ed1ab_1    conda-forge
beautifulsoup4            4.12.2             pyha770c72_0    conda-forge
black                     23.9.1          py310h5588dad_0    conda-forge
blosc                     1.21.5               hdccc3a2_0    conda-forge
boost-cpp                 1.78.0               h9f4b32c_4    conda-forge
branca                    0.6.0              pyhd8ed1ab_0    conda-forge
brotli                    1.1.0                hcfcfb64_0    conda-forge
brotli-bin                1.1.0                hcfcfb64_0    conda-forge
brotli-python             1.1.0           py310h00ffb61_0    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
c-ares                    1.19.1               hcfcfb64_0    conda-forge
ca-certificates           2023.7.22            h56e8100_0    conda-forge
cairo                     1.16.0            hdecc03f_1016    conda-forge
certifi                   2023.7.22          pyhd8ed1ab_0    conda-forge
cffi                      1.15.1          py310h628cb3f_3    conda-forge
cfgv                      3.3.1              pyhd8ed1ab_0    conda-forge
cfitsio                   4.3.0                h9b0cee5_0    conda-forge
charset-normalizer        3.2.0              pyhd8ed1ab_0    conda-forge
click                     8.1.7           win_pyh7428d3b_0    conda-forge
click-plugins             1.1.1                      py_0    conda-forge
cligj                     0.7.2              pyhd8ed1ab_1    conda-forge
cloudpickle               2.2.1              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
contourpy                 1.1.1           py310h232114e_1    conda-forge
coverage                  7.3.1           py310h8d17308_0    conda-forge
curl                      8.4.0                hd5e4a3a_0    conda-forge
cycler                    0.12.1             pyhd8ed1ab_0    conda-forge
distlib                   0.3.7              pyhd8ed1ab_0    conda-forge
docutils                  0.20.1          py310h5588dad_0    conda-forge
exceptiongroup            1.1.3              pyhd8ed1ab_0    conda-forge
expat                     2.5.0                h63175ca_1    conda-forge
filelock                  3.12.3             pyhd8ed1ab_0    conda-forge
fiona                     1.9.5           py310h65cc672_0    conda-forge
folium                    0.14.0             pyhd8ed1ab_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.14.2               hbde0cde_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fonttools                 4.43.1          py310h8d17308_0    conda-forge
freetype                  2.12.1               h546665d_1    conda-forge
freexl                    2.0.0                h8276f4a_0    conda-forge
gdal                      3.7.2           py310haa9213b_6    conda-forge
geopandas                 0.14.0             pyhd8ed1ab_1    conda-forge
geopandas-base            0.14.0             pyha770c72_1    conda-forge
geos                      3.12.0               h1537add_0    conda-forge
geotiff                   1.7.1               hcf4a93f_14    conda-forge
gettext                   0.21.1               h5728263_0    conda-forge
hdf4                      4.2.15               h5557f11_7    conda-forge
hdf5                      1.14.2          nompi_h73e8ff5_100    conda-forge
icu                       72.1                 h63175ca_0    conda-forge
identify                  2.5.28             pyhd8ed1ab_0    conda-forge
idna                      3.4                pyhd8ed1ab_0    conda-forge
imagesize                 1.4.1              pyhd8ed1ab_0    conda-forge
importlib-metadata        6.8.0              pyha770c72_0    conda-forge
iniconfig                 2.0.0              pyhd8ed1ab_0    conda-forge
intel-openmp              2023.2.0         h57928b3_49496    conda-forge
jinja2                    3.1.2              pyhd8ed1ab_1    conda-forge
joblib                    1.3.2              pyhd8ed1ab_0    conda-forge
kealib                    1.5.2                ha10e780_1    conda-forge
kiwisolver                1.4.5           py310h232114e_1    conda-forge
krb5                      1.21.2               heb0366b_0    conda-forge
lcms2                     2.15                 h67d730c_3    conda-forge
lerc                      4.0.0                h63175ca_0    conda-forge
libabseil                 20230802.1      cxx17_h63175ca_0    conda-forge
libaec                    1.0.6                h63175ca_1    conda-forge
libarchive                3.7.2                h6f8411a_0    conda-forge
libblas                   3.9.0              18_win64_mkl    conda-forge
libbrotlicommon           1.1.0                hcfcfb64_0    conda-forge
libbrotlidec              1.1.0                hcfcfb64_0    conda-forge
libbrotlienc              1.1.0                hcfcfb64_0    conda-forge
libcblas                  3.9.0              18_win64_mkl    conda-forge
libcrc32c                 1.1.2                h0e60522_0    conda-forge
libcurl                   8.4.0                hd5e4a3a_0    conda-forge
libdeflate                1.19                 hcfcfb64_0    conda-forge
libexpat                  2.5.0                h63175ca_1    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libgdal                   3.7.2                hfca678f_6    conda-forge
libglib                   2.78.0               he8f3873_0    conda-forge
libgoogle-cloud           2.12.0               ha74b051_3    conda-forge
libgrpc                   1.58.1               h43eea02_0    conda-forge
libhwloc                  2.9.1           nocuda_h15da153_6    conda-forge
libiconv                  1.17                 h8ffe710_0    conda-forge
libjpeg-turbo             3.0.0                hcfcfb64_1    conda-forge
libkml                    1.3.0             hf2ab4e4_1015    conda-forge
liblapack                 3.9.0              18_win64_mkl    conda-forge
libnetcdf                 4.9.2           nompi_h8284064_112    conda-forge
libpng                    1.6.39               h19919ed_0    conda-forge
libpq                     16.0                 h43585b0_1    conda-forge
libprotobuf               4.24.3               hb8276f3_1    conda-forge
librttopo                 1.1.0               h92c5fdb_14    conda-forge
libspatialindex           1.9.3                h39d44d4_4    conda-forge
libspatialite             5.1.0                hbf340bc_0    conda-forge
libsqlite                 3.43.2               hcfcfb64_0    conda-forge
libssh2                   1.11.0               h7dfc565_0    conda-forge
libtiff                   4.6.0                h6e2ebb7_2    conda-forge
libwebp-base              1.3.2                hcfcfb64_0    conda-forge
libxcb                    1.15                 hcd874cb_0    conda-forge
libxml2                   2.11.5               hc3477c8_1    conda-forge
libzip                    1.10.1               h1d365fa_3    conda-forge
libzlib                   1.2.13               hcfcfb64_5    conda-forge
lz4-c                     1.9.4                hcfcfb64_0    conda-forge
lzo                       2.10              he774522_1000    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
mapclassify               2.6.1              pyhd8ed1ab_0    conda-forge
markupsafe                2.1.3           py310h8d17308_0    conda-forge
matplotlib-base           3.8.0           py310hc9baf74_1    conda-forge
minizip                   4.0.1                h5bed578_4    conda-forge
mkl                       2022.1.0           h6a75c08_874    conda-forge
msys2-conda-epoch         20160418                      1    conda-forge
munch                     4.0.0              pyhd8ed1ab_0    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
mypy                      1.5.1           py310h8d17308_0    conda-forge
mypy_extensions           1.0.0              pyha770c72_0    conda-forge
networkx                  3.1                pyhd8ed1ab_0    conda-forge
nodeenv                   1.8.0              pyhd8ed1ab_0    conda-forge
numpy                     1.25.2          py310hd02465a_0    conda-forge
openjpeg                  2.5.0                h3d672ee_3    conda-forge
openssl                   3.1.4                hcfcfb64_0    conda-forge
packaging                 23.1               pyhd8ed1ab_0    conda-forge
pandas                    2.1.0           py310hecd3228_0    conda-forge
pandas-stubs              2.0.3.230814       pyhd8ed1ab_0    conda-forge
pathspec                  0.11.2             pyhd8ed1ab_0    conda-forge
pcre2                     10.40                h17e33f8_0    conda-forge
pillow                    10.1.0          py310h1e6a543_0    conda-forge
pip                       23.2.1             pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               h8ffe710_0    conda-forge
platformdirs              3.10.0             pyhd8ed1ab_0    conda-forge
pluggy                    1.3.0              pyhd8ed1ab_0    conda-forge
poppler                   23.08.0              habf82aa_3    conda-forge
poppler-data              0.4.12               hd8ed1ab_0    conda-forge
postgresql                16.0                 hc80876b_1    conda-forge
pre-commit                3.4.0              pyha770c72_1    conda-forge
proj                      9.3.0                he13c7e8_2    conda-forge
psutil                    5.9.5           py310h8d17308_0    conda-forge
pthread-stubs             0.4               hcd874cb_1001    conda-forge
pthreads-win32            2.9.1                hfa6e2cd_3    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pydata-sphinx-theme       0.13.3             pyhd8ed1ab_0    conda-forge
pygeoops                  0.4.0a1                  pypi_0    pypi
pygments                  2.16.1             pyhd8ed1ab_0    conda-forge
pyogrio                   0.7.2           py310ha63b2ce_0    conda-forge
pyparsing                 3.1.1              pyhd8ed1ab_0    conda-forge
pyproj                    3.6.1           py310hebb2149_3    conda-forge
pysocks                   1.7.1              pyh0701188_6    conda-forge
pytest                    7.4.2              pyhd8ed1ab_0    conda-forge
pytest-cov                4.1.0              pyhd8ed1ab_0    conda-forge
python                    3.10.12         h4de0772_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-tzdata             2023.3             pyhd8ed1ab_0    conda-forge
python_abi                3.10                    3_cp310    conda-forge
pytz                      2023.3.post1       pyhd8ed1ab_0    conda-forge
pyyaml                    6.0.1           py310h8d17308_0    conda-forge
re2                       2023.03.02           hd4eee63_0    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
rtree                     1.0.1           py310h1cbd46b_3    conda-forge
ruff                      0.0.288         py310h298983d_0    conda-forge
scikit-learn              1.3.1           py310hfd2573f_1    conda-forge
scipy                     1.11.3          py310hf667824_1    conda-forge
setuptools                68.1.2             pyhd8ed1ab_0    conda-forge
shapely                   2.0.2           py310h839b4a8_0    conda-forge
simplification            0.6.11                   pypi_0    pypi
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.1.10               hfb803bf_0    conda-forge
snowballstemmer           2.2.0              pyhd8ed1ab_0    conda-forge
soupsieve                 2.5                pyhd8ed1ab_1    conda-forge
sphinx                    7.2.5              pyhd8ed1ab_0    conda-forge
sphinx-automodapi         0.13                     pypi_0    pypi
sphinxcontrib-applehelp   1.0.7              pyhd8ed1ab_0    conda-forge
sphinxcontrib-devhelp     1.0.5              pyhd8ed1ab_0    conda-forge
sphinxcontrib-htmlhelp    2.0.4              pyhd8ed1ab_0    conda-forge
sphinxcontrib-jsmath      1.0.1              pyhd8ed1ab_0    conda-forge
sphinxcontrib-qthelp      1.0.6              pyhd8ed1ab_0    conda-forge
sphinxcontrib-serializinghtml 1.1.9              pyhd8ed1ab_0    conda-forge
sqlite                    3.43.2               hcfcfb64_0    conda-forge
tbb                       2021.9.0             h91493d7_0    conda-forge
threadpoolctl             3.2.0              pyha21a80b_0    conda-forge
tiledb                    2.16.3               hbf04793_3    conda-forge
tk                        8.6.13               hcfcfb64_0    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
topojson                  1.5                pyhd8ed1ab_0    conda-forge
types-pillow              10.0.0.3           pyhd8ed1ab_0    conda-forge
types-pytz                2023.3.0.1         pyhd8ed1ab_0    conda-forge
typing-extensions         4.7.1                hd8ed1ab_0    conda-forge
typing_extensions         4.7.1              pyha770c72_0    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
ukkonen                   1.0.1           py310h232114e_3    conda-forge
unicodedata2              15.1.0          py310h8d17308_0    conda-forge
urllib3                   2.0.4              pyhd8ed1ab_0    conda-forge
vc                        14.3                h64f974e_17    conda-forge
vc14_runtime              14.36.32532         hdcecf7f_17    conda-forge
virtualenv                20.24.4            pyhd8ed1ab_0    conda-forge
vs2015_runtime            14.36.32532         h05e6639_17    conda-forge
wheel                     0.41.2             pyhd8ed1ab_0    conda-forge
win_inet_pton             1.1.0              pyhd8ed1ab_6    conda-forge
xerces-c                  3.2.4                h63175ca_3    conda-forge
xorg-libxau               1.0.11               hcd874cb_0    conda-forge
xorg-libxdmcp             1.1.3                hcd874cb_0    conda-forge
xyzservices               2023.10.0          pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge
yaml                      0.2.5                h8ffe710_2    conda-forge
zipp                      3.16.2             pyhd8ed1ab_0    conda-forge
zlib                      1.2.13               hcfcfb64_5    conda-forge
zstd                      1.5.5                h12be248_0    conda-forge

Environment info

active environment : geofileops-dev
    active env location : C:\TOOLS\mambaforge\envs\geofileops-dev
            shell level : 2
       user config file : C:\Users\PIEROG\.condarc
 populated config files : C:\TOOLS\mambaforge\.condarc
          conda version : 23.1.0
    conda-build version : not installed
         python version : 3.10.12.final.0
       virtual packages : __archspec=1=x86_64
                          __win=0=0
       base environment : C:\TOOLS\mambaforge  (writable)
      conda av data dir : C:\TOOLS\mambaforge\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : C:\TOOLS\mambaforge\pkgs
                          C:\Users\PIEROG\.conda\pkgs
                          C:\Users\PIEROG\AppData\Local\conda\conda\pkgs
       envs directories : C:\TOOLS\mambaforge\envs
                          C:\Users\PIEROG\.conda\envs
                          C:\Users\PIEROG\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/23.1.0 requests/2.31.0 CPython/3.10.12 Windows/10 Windows/10.0.19045
          administrator : False
             netrc file : None
           offline mode : False

reference https://github.com/geofileops/geofileops/issues/401

xylar commented 1 year ago

@theroggy, I think a PR to fix this would be welcome. I looked at the source code and makefile64.vc a bit and didn't see an obvious way to get make sure that GEOS was configured properly, but my Windows expertise is next to nonexistent.

@conda-forge/libspatialite, any of the rest of you have time and expertise to try to fix this?

ocefpaf commented 1 year ago

@conda-forge/libspatialite, any of the rest of you have time and expertise to try to fix this?

Windows is always hard. If you can send a PR please do!

theroggy commented 1 year ago

I'm afraid I haven't been programming in C/C++ in about 15 years, so I'm afraid I'm not qualified to make a PR.

Nonetheless I have had a look as well and I think the main issue is that 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, but if you use configure for the gcc based compiling the macros are added to a confdefs.h file, and I wonder if this logic isn't just kind of missing in the MSVC scripts provided.

So, I recently posted a message in the spatialite forum as well, because if above is the case, it probably would be better that it would be fixed/changed upstream? https://groups.google.com/g/spatialite-users/c/jb7wZWEs0_Y

gillins commented 1 year ago

Yes upstream would be best, but reading that conversation it sounds like they are not interested in MSVC builds (which we require for compatibility with Python on Windows). Can you list the macros that are missing on the Windows build? I can take a look then.

theroggy commented 1 year ago

Yes upstream would be best, but reading that conversation it sounds like they are not interested in MSVC builds (which we require for compatibility with Python on Windows). Can you list the macros that are missing on the Windows build? I can take a look then.

I think these should do the trick:

#define GEOS_3100 1
#define GEOS_3110 1

Thanks for looking into it!