matplotlib / basemap

Plot on map projections (with coastlines and political boundaries) using matplotlib
MIT License
772 stars 390 forks source link

Problem with installation on linux/arm64 conda environment #581

Closed leonid-butenko closed 12 months ago

leonid-butenko commented 1 year ago

Hi,

I'm trying to install basemap on my mac using docker. As long as conda-forge doesn't seem to support basemap for linux-aarch64 architecture, i try to do that with pip. What am I doing wrong? Running basemap build manually gives same result

> docker run -it --rm --platform=linux/arm64 condaforge/miniforge3:latest
(base) root@1a3647250cc2:/# conda create -y -n test 
(base) root@1a3647250cc2:/# conda activate test
(test) root@1a3647250cc2:/# conda install -y matplotlib pyproj=3.5 proj geos numpy=1.24
(test) root@1a3647250cc2:/# GEOS_DIR=$CONDA_PREFIX python -m pip install basemap                                                                                                                               
Collecting basemap                                                                                                                                                                                                    
  Downloading basemap-1.3.7.zip (156 kB)                                                                                                                                                                              
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 156.4/156.4 kB 2.8 MB/s eta 0:00:00
  Installing build dependencies ... done                                                                                                                                                                              
  Getting requirements to build wheel ... done                                                                                                                                                                        
  Preparing metadata (pyproject.toml) ... done                                                                                                                                                                        
Collecting basemap-data<1.4,>=1.3.2 (from basemap)                                                                                                                                                                    
  Downloading basemap_data-1.3.2-py2.py3-none-any.whl (30.5 MB)                                                                                                                                                       
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 30.5/30.5 MB 44.9 MB/s eta 0:00:00
Collecting pyshp<2.4,>=1.2 (from basemap)                                                                                                                                                                             
  Downloading pyshp-2.3.1-py2.py3-none-any.whl (46 kB)                                                                                                                                                                
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.5/46.5 kB 26.3 MB/s eta 0:00:00
Requirement already satisfied: matplotlib<3.8,>=1.5 in /opt/conda/envs/test/lib/python3.11/site-packages (from basemap) (3.7.2)                                                                                       
Requirement already satisfied: pyproj<3.6.0,>=1.9.3 in /opt/conda/envs/test/lib/python3.11/site-packages (from basemap) (3.5.0)                                                                                       
Requirement already satisfied: numpy<1.25,>=1.22 in /opt/conda/envs/test/lib/python3.11/site-packages (from basemap) (1.24.4)                                                                                         
Requirement already satisfied: contourpy>=1.0.1 in /opt/conda/envs/test/lib/python3.11/site-packages (from matplotlib<3.8,>=1.5->basemap) (1.1.0)                                                                     
Requirement already satisfied: cycler>=0.10 in /opt/conda/envs/test/lib/python3.11/site-packages (from matplotlib<3.8,>=1.5->basemap) (0.11.0)                                                                        
Requirement already satisfied: fonttools>=4.22.0 in /opt/conda/envs/test/lib/python3.11/site-packages (from matplotlib<3.8,>=1.5->basemap) (4.41.0)                                                                   
Requirement already satisfied: kiwisolver>=1.0.1 in /opt/conda/envs/test/lib/python3.11/site-packages (from matplotlib<3.8,>=1.5->basemap) (1.4.4)                                                                    
Requirement already satisfied: packaging>=20.0 in /opt/conda/envs/test/lib/python3.11/site-packages (from matplotlib<3.8,>=1.5->basemap) (23.1)                                                                       
Requirement already satisfied: pillow>=6.2.0 in /opt/conda/envs/test/lib/python3.11/site-packages (from matplotlib<3.8,>=1.5->basemap) (10.0.0)                                                                       
Requirement already satisfied: pyparsing<3.1,>=2.3.1 in /opt/conda/envs/test/lib/python3.11/site-packages (from matplotlib<3.8,>=1.5->basemap) (3.0.9)                                                                
Requirement already satisfied: python-dateutil>=2.7 in /opt/conda/envs/test/lib/python3.11/site-packages (from matplotlib<3.8,>=1.5->basemap) (2.8.2)                                                                 
Requirement already satisfied: certifi in /opt/conda/envs/test/lib/python3.11/site-packages (from pyproj<3.6.0,>=1.9.3->basemap) (2023.5.7)                                                                           
Requirement already satisfied: six>=1.5 in /opt/conda/envs/test/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib<3.8,>=1.5->basemap) (1.16.0)                                                      
Building wheels for collected packages: basemap                                                                                                                                                                       
  Building wheel for basemap (pyproject.toml) ... error                                                                                                                                                               
  error: subprocess-exited-with-error                                                                                                                                                                                 

  × Building wheel for basemap (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [121 lines of output]
      /tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/dist.py:945: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated.
      !!

              ********************************************************************************
              Please replace its usage with implicit namespaces (PEP 420).

              See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages for details.
              ********************************************************************************

      !!
        ep.load()(self, ep.name, value)
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-cpython-311
      creating build/lib.linux-aarch64-cpython-311/mpl_toolkits
      copying src/mpl_toolkits/__init__.py -> build/lib.linux-aarch64-cpython-311/mpl_toolkits
      creating build/lib.linux-aarch64-cpython-311/mpl_toolkits/basemap
      copying src/mpl_toolkits/basemap/proj.py -> build/lib.linux-aarch64-cpython-311/mpl_toolkits/basemap
      copying src/mpl_toolkits/basemap/__init__.py -> build/lib.linux-aarch64-cpython-311/mpl_toolkits/basemap
      copying src/mpl_toolkits/basemap/solar.py -> build/lib.linux-aarch64-cpython-311/mpl_toolkits/basemap
      copying src/mpl_toolkits/basemap/test.py -> build/lib.linux-aarch64-cpython-311/mpl_toolkits/basemap
      copying src/mpl_toolkits/basemap/cm.py -> build/lib.linux-aarch64-cpython-311/mpl_toolkits/basemap
      copying src/mpl_toolkits/basemap/diagnostic.py -> build/lib.linux-aarch64-cpython-311/mpl_toolkits/basemap
      running build_ext

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
      __geos_major_version__ = GEOS_VERSION_MAJOR
      #if __geos_version__ != "2.2.3-CAPI-1.1.1":
      #     raise ValueError('version 2.2.3 of the geos library is required')

      # intialize GEOS (parameters are notice and error function callbacks).
      initGEOS(notice_h, error_h)
               ^
      ------------------------------------------------------------

      src/_geoslib.pyx:136:9: Cannot assign type 'void (char *, char *) except *' to 'GEOSMessageHandler'

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
      __geos_major_version__ = GEOS_VERSION_MAJOR
      #if __geos_version__ != "2.2.3-CAPI-1.1.1":
      #     raise ValueError('version 2.2.3 of the geos library is required')

      # intialize GEOS (parameters are notice and error function callbacks).
      initGEOS(notice_h, error_h)
                         ^
      ------------------------------------------------------------

      src/_geoslib.pyx:136:19: Cannot assign type 'void (char *, char *) except *' to 'GEOSMessageHandler'
      Compiling src/_geoslib.pyx because it changed.
      [1/1] Cythonizing src/_geoslib.pyx
      Traceback (most recent call last):
        File "/opt/conda/envs/test/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/opt/conda/envs/test/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/conda/envs/test/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 416, in build_wheel
          return self._build_with_temp_dir(['bdist_wheel'], '.whl',
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 401, in _build_with_temp_dir
          self.run_setup()
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 171, in <module>
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 343, in run
          self.run_command("build")
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 84, in run
          _build_ext.run(self)
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
          self.build_extensions()
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
          self._build_extensions_serial()
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
          self.build_extension(ext)
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
          _build_ext.build_extension(self, ext)
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/Cython/Distutils/build_ext.py", line 122, in build_extension
          new_ext = cythonize(
                    ^^^^^^^^^^
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
          cythonize_one(*args)
        File "/tmp/pip-build-env-q5qoi0gb/overlay/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: src/_geoslib.pyx
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for basemap
Failed to build basemap
ERROR: Could not build wheels for basemap, which is required to install pyproject.toml-based projects
molinav commented 1 year ago

Hi @leonid-butenko! Sorry for the late reply. I can reproduce the same problem as you on my Windows machine. It seems that it is being caused by the latest release 3.0.0 of Cython. I will downgrade the Cython upper pin from "< 3.1.0" to "< 3.0.0" until this Cython major release becomes more stable.

molinav commented 1 year ago

@leonid-butenko May I ask you to try two things on your system? After configuring GEOS_DIR properly:

  1. First, try to install basemap version 1.3.7 from the GitHub repo with the command below, which should fail with the same error as in your original issue:

    python -m pip install git+https://github.com/matplotlib/basemap.git@v1.3.7#subdirectory=packages/basemap
  2. Second, try to install basemap hotfix branch 1.3.8 with the command below, which (hopefully) would work:

    python -m pip install git+https://github.com/matplotlib/basemap.git@hotfix-1.3.8#subdirectory=packages/basemap

If both installation cases are reproducible for you (that v1.3.7 fails and hotfix-1.3.8 works), then I can confirm that the source of conflict is Cython 3.0.0, and I can try to prepare the v1.3.8 release in a few days.

molinav commented 1 year ago

@leonid-butenko It would be great if you can provide your feedback during this week, then I can prepare the 1.3.8 patch release including this bugfix soon. Very likely the issue is with the Cython 3.0.0 version, since I could reproduce the same error as you and it is gone after pinning Cython to the 0.29.x series, but before releasing I would like to confirm that the problem also gets solved for you.

leonid-butenko commented 1 year ago

@molinav Thanks for your quick reply! Something strange here. As you suggested the first command with installation from GitHub fails exactly the same way as before. Howerer the second one has another issue. During building it complains about linking errors. Please see below:

>docker run -it --rm --platform=linux/arm64 condaforge/miniforge3:latest
(base) root@773c986b8780:/# conda install -y matplotlib pyproj=3.5 proj geos numpy=1.24 gcc_linux-64=12.3 gxx_linux-64=12.3 cmake make
(base) root@773c986b8780:/# GEOS_DIR=/opt/conda/ python -m pip install git+https://github.com/matplotlib/basemap.git@hotfix-1.3.8#subdirectory=packages/basemap                           
Collecting git+https://github.com/matplotlib/basemap.git@hotfix-1.3.8#subdirectory=packages/basemap                                                                                         
  Cloning https://github.com/matplotlib/basemap.git (to revision hotfix-1.3.8) to /tmp/pip-req-build-fl628dwb                                                                               
  Running command git clone --filter=blob:none --quiet https://github.com/matplotlib/basemap.git /tmp/pip-req-build-fl628dwb                                                                
  Running command git checkout -b hotfix-1.3.8 --track origin/hotfix-1.3.8                                                                                                                  
  Switched to a new branch 'hotfix-1.3.8'
  Branch 'hotfix-1.3.8' set up to track remote branch 'hotfix-1.3.8' from 'origin'.
  Resolved https://github.com/matplotlib/basemap.git to commit 40b7ba8c63bcf7ab7ae6bee67ee2798b19b454ec
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting basemap-data<1.4,>=1.3.2 (from basemap==1.3.7)
  Downloading basemap_data-1.3.2-py2.py3-none-any.whl (30.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 30.5/30.5 MB 53.4 MB/s eta 0:00:00
Collecting pyshp<2.4,>=1.2 (from basemap==1.3.7)
  Downloading pyshp-2.3.1-py2.py3-none-any.whl (46 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.5/46.5 kB 25.5 MB/s eta 0:00:00
Requirement already satisfied: matplotlib<3.8,>=1.5 in /opt/conda/lib/python3.10/site-packages (from basemap==1.3.7) (3.7.2)
Requirement already satisfied: pyproj<3.7.0,>=1.9.3 in /opt/conda/lib/python3.10/site-packages (from basemap==1.3.7) (3.5.0)
Requirement already satisfied: numpy<1.26,>=1.21 in /opt/conda/lib/python3.10/site-packages (from basemap==1.3.7) (1.24.4)
Requirement already satisfied: contourpy>=1.0.1 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (1.1.0)
Requirement already satisfied: cycler>=0.10 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (0.11.0)
Requirement already satisfied: fonttools>=4.22.0 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (4.41.1)
Requirement already satisfied: kiwisolver>=1.0.1 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (1.4.4)
Requirement already satisfied: packaging>=20.0 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (23.1)
Requirement already satisfied: pillow>=6.2.0 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (10.0.0)
Requirement already satisfied: pyparsing<3.1,>=2.3.1 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (3.0.9)
Requirement already satisfied: python-dateutil>=2.7 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (2.8.2)
Requirement already satisfied: certifi in /opt/conda/lib/python3.10/site-packages (from pyproj<3.7.0,>=1.9.3->basemap==1.3.7) (2023.7.22)
Requirement already satisfied: six>=1.5 in /opt/conda/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib<3.8,>=1.5->basemap==1.3.7) (1.16.0)
Building wheels for collected packages: basemap
  Building wheel for basemap (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for basemap (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [648 lines of output]
      /tmp/pip-build-env-bhhe3rqn/overlay/lib/python3.10/site-packages/setuptools/dist.py:945: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated.
      !!

              ********************************************************************************
              Please replace its usage with implicit namespaces (PEP 420).

              See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages for details.
              ********************************************************************************

      !!
        ep.load()(self, ep.name, value)
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-cpython-310
      creating build/lib.linux-aarch64-cpython-310/mpl_toolkits
      copying src/mpl_toolkits/__init__.py -> build/lib.linux-aarch64-cpython-310/mpl_toolkits
      creating build/lib.linux-aarch64-cpython-310/mpl_toolkits/basemap
      copying src/mpl_toolkits/basemap/proj.py -> build/lib.linux-aarch64-cpython-310/mpl_toolkits/basemap
      copying src/mpl_toolkits/basemap/__init__.py -> build/lib.linux-aarch64-cpython-310/mpl_toolkits/basemap
      copying src/mpl_toolkits/basemap/solar.py -> build/lib.linux-aarch64-cpython-310/mpl_toolkits/basemap
      copying src/mpl_toolkits/basemap/test.py -> build/lib.linux-aarch64-cpython-310/mpl_toolkits/basemap
      copying src/mpl_toolkits/basemap/cm.py -> build/lib.linux-aarch64-cpython-310/mpl_toolkits/basemap
      copying src/mpl_toolkits/basemap/diagnostic.py -> build/lib.linux-aarch64-cpython-310/mpl_toolkits/basemap
      running build_ext
      cythoning src/_geoslib.pyx to src/_geoslib.c
      building '_geoslib' extension
      creating build/temp.linux-aarch64-cpython-310
      creating build/temp.linux-aarch64-cpython-310/src
      /opt/conda/bin/x86_64-conda-linux-gnu-cc -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O3 -Wall -fPIC -O3 -isystem /opt/conda/include -fPIC -O3 -isystem /opt/conda/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/conda/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /opt/conda/include -fPIC -I/tmp/pip-build-env-bhhe3rqn/overlay/lib/python3.10/site-packages/numpy/core/include -I/opt/conda/include -I/opt/conda/include/python3.10 -c src/_geoslib.c -o build/temp.linux-aarch64-cpython-310/src/_geoslib.o
      In file included from /tmp/pip-build-env-bhhe3rqn/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h:1969,
                       from /tmp/pip-build-env-bhhe3rqn/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                       from /tmp/pip-build-env-bhhe3rqn/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                       from src/_geoslib.c:750:
      /tmp/pip-build-env-bhhe3rqn/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
         17 | #warning "Using deprecated NumPy API, disable it with " \
            |  ^~~~~~~
      src/_geoslib.c: In function '__pyx_pf_8_geoslib_12BaseGeometry_is_valid':
      src/_geoslib.c:1858:43: warning: passing argument 1 of 'GEOSisValid' from incompatible pointer type [-Wincompatible-pointer-types]
       1858 |   __pyx_v_valid = GEOSisValid(__pyx_v_self->_geom);
            |                               ~~~~~~~~~~~~^~~~~~~
            |                                           |
            |                                           GEOSGeometry ** {aka struct GEOSGeom_t **}
      In file included from src/_geoslib.c:751:
      /opt/conda/include/geos_c.h:2968:54: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2968 | extern char GEOS_DLL GEOSisValid(const GEOSGeometry* g);
            |                                  ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c: In function '__pyx_pf_8_geoslib_12BaseGeometry_2geom_type':
      src/_geoslib.c:1958:59: warning: passing argument 1 of 'GEOSGeomType' from incompatible pointer type [-Wincompatible-pointer-types]
       1958 |   __pyx_t_1 = PyBytes_FromString(GEOSGeomType(__pyx_v_self->_geom)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error)
            |                                               ~~~~~~~~~~~~^~~~~~~
            |                                                           |
            |                                                           GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2533:56: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2533 | extern char GEOS_DLL *GEOSGeomType(const GEOSGeometry* g);
            |                                    ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c: In function '__pyx_pf_8_geoslib_12BaseGeometry_4within':
      src/_geoslib.c:2049:31: warning: passing argument 1 of 'GEOSWithin' from incompatible pointer type [-Wincompatible-pointer-types]
       2049 |   __pyx_v_answer = GEOSWithin(__pyx_v_g1, __pyx_v_g2);
            |                               ^~~~~~~~~~
            |                               |
            |                               GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:4694:53: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       4694 | extern char GEOS_DLL GEOSWithin(const GEOSGeometry* g1, const GEOSGeometry* g2);
            |                                 ~~~~~~~~~~~~~~~~~~~~^~
      src/_geoslib.c:2049:43: warning: passing argument 2 of 'GEOSWithin' from incompatible pointer type [-Wincompatible-pointer-types]
       2049 |   __pyx_v_answer = GEOSWithin(__pyx_v_g1, __pyx_v_g2);
            |                                           ^~~~~~~~~~
            |                                           |
            |                                           GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:4694:77: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       4694 | extern char GEOS_DLL GEOSWithin(const GEOSGeometry* g1, const GEOSGeometry* g2);
            |                                                         ~~~~~~~~~~~~~~~~~~~~^~
      src/_geoslib.c: In function '__pyx_pf_8_geoslib_12BaseGeometry_6union':
      src/_geoslib.c:2187:26: warning: passing argument 1 of 'GEOSUnion' from incompatible pointer type [-Wincompatible-pointer-types]
       2187 |   __pyx_v_g3 = GEOSUnion(__pyx_v_g1, __pyx_v_g2);
            |                          ^~~~~~~~~~
            |                          |
            |                          GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:3496:25: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       3496 |     const GEOSGeometry* ga,
            |     ~~~~~~~~~~~~~~~~~~~~^~
      src/_geoslib.c:2187:38: warning: passing argument 2 of 'GEOSUnion' from incompatible pointer type [-Wincompatible-pointer-types]
       2187 |   __pyx_v_g3 = GEOSUnion(__pyx_v_g1, __pyx_v_g2);
            |                                      ^~~~~~~~~~
            |                                      |
            |                                      GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:3497:25: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       3497 |     const GEOSGeometry* gb);
            |     ~~~~~~~~~~~~~~~~~~~~^~
      src/_geoslib.c:2187:14: warning: assignment to 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'} from incompatible pointer type 'GEOSGeometry *' {aka 'struct GEOSGeom_t *'} [-Wincompatible-pointer-types]
       2187 |   __pyx_v_g3 = GEOSUnion(__pyx_v_g1, __pyx_v_g2);
            |              ^
      src/_geoslib.c:2196:35: warning: passing argument 1 of 'GEOSGeomTypeId' from incompatible pointer type [-Wincompatible-pointer-types]
       2196 |   __pyx_v_typeid = GEOSGeomTypeId(__pyx_v_g3);
            |                                   ^~~~~~~~~~
            |                                   |
            |                                   GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2541:56: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2541 | extern int GEOS_DLL GEOSGeomTypeId(const GEOSGeometry* g);
            |                                    ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:2283:45: warning: passing argument 1 of 'GEOSGetNumGeometries' from incompatible pointer type [-Wincompatible-pointer-types]
       2283 |     __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3);
            |                                             ^~~~~~~~~~
            |                                             |
            |                                             GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2573:62: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2573 | extern int GEOS_DLL GEOSGetNumGeometries(const GEOSGeometry* g);
            |                                          ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:2292:37: warning: passing argument 1 of 'GEOSGetGeometryN' from incompatible pointer type [-Wincompatible-pointer-types]
       2292 |     __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, 0);
            |                                     ^~~~~~~~~~
            |                                     |
            |                                     GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2591:25: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2591 |     const GEOSGeometry* g,
            |     ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:2292:18: warning: assignment to 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'} from incompatible pointer type 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} [-Wincompatible-pointer-types]
       2292 |     __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, 0);
            |                  ^
      src/_geoslib.c:2335:45: warning: passing argument 1 of 'GEOSGetNumGeometries' from incompatible pointer type [-Wincompatible-pointer-types]
       2335 |     __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3);
            |                                             ^~~~~~~~~~
            |                                             |
            |                                             GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2573:62: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2573 | extern int GEOS_DLL GEOSGetNumGeometries(const GEOSGeometry* g);
            |                                          ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:2344:37: warning: passing argument 1 of 'GEOSGetGeometryN' from incompatible pointer type [-Wincompatible-pointer-types]
       2344 |     __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, 0);
            |                                     ^~~~~~~~~~
            |                                     |
            |                                     GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2591:25: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2591 |     const GEOSGeometry* g,
            |     ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:2344:18: warning: assignment to 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'} from incompatible pointer type 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} [-Wincompatible-pointer-types]
       2344 |     __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, 0);
            |                  ^
      src/_geoslib.c:2387:49: warning: passing argument 1 of 'GEOSGeomType' from incompatible pointer type [-Wincompatible-pointer-types]
       2387 |     __pyx_t_2 = PyBytes_FromString(GEOSGeomType(__pyx_v_g3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
            |                                                 ^~~~~~~~~~
            |                                                 |
            |                                                 GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2533:56: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2533 | extern char GEOS_DLL *GEOSGeomType(const GEOSGeometry* g);
            |                                    ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:2417:20: warning: passing argument 1 of 'GEOSGeom_destroy' from incompatible pointer type [-Wincompatible-pointer-types]
       2417 |   GEOSGeom_destroy(__pyx_v_g3);
            |                    ^~~~~~~~~~
            |                    |
            |                    GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2514:53: note: expected 'GEOSGeometry *' {aka 'struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2514 | extern void GEOS_DLL GEOSGeom_destroy(GEOSGeometry* g);
            |                                       ~~~~~~~~~~~~~~^
      src/_geoslib.c: In function '__pyx_pf_8_geoslib_12BaseGeometry_8simplify':
      src/_geoslib.c:2523:29: warning: passing argument 1 of 'GEOSSimplify' from incompatible pointer type [-Wincompatible-pointer-types]
       2523 |   __pyx_v_g3 = GEOSSimplify(__pyx_v_g1, __pyx_v_tolerance);
            |                             ^~~~~~~~~~
            |                             |
            |                             GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:4498:25: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       4498 |     const GEOSGeometry* g,
            |     ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:2523:14: warning: assignment to 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'} from incompatible pointer type 'GEOSGeometry *' {aka 'struct GEOSGeom_t *'} [-Wincompatible-pointer-types]
       2523 |   __pyx_v_g3 = GEOSSimplify(__pyx_v_g1, __pyx_v_tolerance);
            |              ^
      src/_geoslib.c:2532:35: warning: passing argument 1 of 'GEOSGeomTypeId' from incompatible pointer type [-Wincompatible-pointer-types]
       2532 |   __pyx_v_typeid = GEOSGeomTypeId(__pyx_v_g3);
            |                                   ^~~~~~~~~~
            |                                   |
            |                                   GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2541:56: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2541 | extern int GEOS_DLL GEOSGeomTypeId(const GEOSGeometry* g);
            |                                    ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:2619:45: warning: passing argument 1 of 'GEOSGetNumGeometries' from incompatible pointer type [-Wincompatible-pointer-types]
       2619 |     __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3);
            |                                             ^~~~~~~~~~
            |                                             |
            |                                             GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2573:62: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2573 | extern int GEOS_DLL GEOSGetNumGeometries(const GEOSGeometry* g);
            |                                          ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:2628:37: warning: passing argument 1 of 'GEOSGetGeometryN' from incompatible pointer type [-Wincompatible-pointer-types]
       2628 |     __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, 0);
            |                                     ^~~~~~~~~~
            |                                     |
            |                                     GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2591:25: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2591 |     const GEOSGeometry* g,
            |     ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:2628:18: warning: assignment to 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'} from incompatible pointer type 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} [-Wincompatible-pointer-types]
       2628 |     __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, 0);
            |                  ^
      src/_geoslib.c:2671:45: warning: passing argument 1 of 'GEOSGetNumGeometries' from incompatible pointer type [-Wincompatible-pointer-types]
       2671 |     __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3);
            |                                             ^~~~~~~~~~
            |                                             |
            |                                             GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2573:62: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2573 | extern int GEOS_DLL GEOSGetNumGeometries(const GEOSGeometry* g);
            |                                          ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:2680:37: warning: passing argument 1 of 'GEOSGetGeometryN' from incompatible pointer type [-Wincompatible-pointer-types]
       2680 |     __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, 0);
            |                                     ^~~~~~~~~~
            |                                     |
            |                                     GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2591:25: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2591 |     const GEOSGeometry* g,
            |     ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:2680:18: warning: assignment to 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'} from incompatible pointer type 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} [-Wincompatible-pointer-types]
       2680 |     __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, 0);
            |                  ^
      src/_geoslib.c:2723:49: warning: passing argument 1 of 'GEOSGeomType' from incompatible pointer type [-Wincompatible-pointer-types]
       2723 |     __pyx_t_3 = PyBytes_FromString(GEOSGeomType(__pyx_v_g3)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 227, __pyx_L1_error)
            |                                                 ^~~~~~~~~~
            |                                                 |
            |                                                 GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2533:56: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2533 | extern char GEOS_DLL *GEOSGeomType(const GEOSGeometry* g);
            |                                    ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:2753:20: warning: passing argument 1 of 'GEOSGeom_destroy' from incompatible pointer type [-Wincompatible-pointer-types]
       2753 |   GEOSGeom_destroy(__pyx_v_g3);
            |                    ^~~~~~~~~~
            |                    |
            |                    GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2514:53: note: expected 'GEOSGeometry *' {aka 'struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2514 | extern void GEOS_DLL GEOSGeom_destroy(GEOSGeometry* g);
            |                                       ~~~~~~~~~~~~~~^
      src/_geoslib.c: In function '__pyx_pf_8_geoslib_12BaseGeometry_10fix':
      src/_geoslib.c:2847:27: warning: passing argument 1 of 'GEOSBuffer' from incompatible pointer type [-Wincompatible-pointer-types]
       2847 |   __pyx_v_g3 = GEOSBuffer(__pyx_v_g1, 0., 0);
            |                           ^~~~~~~~~~
            |                           |
            |                           GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:3624:62: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       3624 | extern GEOSGeometry GEOS_DLL *GEOSBuffer(const GEOSGeometry* g,
            |                                          ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:2847:14: warning: assignment to 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'} from incompatible pointer type 'GEOSGeometry *' {aka 'struct GEOSGeom_t *'} [-Wincompatible-pointer-types]
       2847 |   __pyx_v_g3 = GEOSBuffer(__pyx_v_g1, 0., 0);
            |              ^
      src/_geoslib.c:2856:35: warning: passing argument 1 of 'GEOSGeomTypeId' from incompatible pointer type [-Wincompatible-pointer-types]
       2856 |   __pyx_v_typeid = GEOSGeomTypeId(__pyx_v_g3);
            |                                   ^~~~~~~~~~
            |                                   |
            |                                   GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2541:56: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2541 | extern int GEOS_DLL GEOSGeomTypeId(const GEOSGeometry* g);
            |                                    ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:2943:45: warning: passing argument 1 of 'GEOSGetNumGeometries' from incompatible pointer type [-Wincompatible-pointer-types]
       2943 |     __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3);
            |                                             ^~~~~~~~~~
            |                                             |
            |                                             GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2573:62: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2573 | extern int GEOS_DLL GEOSGetNumGeometries(const GEOSGeometry* g);
            |                                          ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:2952:37: warning: passing argument 1 of 'GEOSGetGeometryN' from incompatible pointer type [-Wincompatible-pointer-types]
       2952 |     __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, 0);
            |                                     ^~~~~~~~~~
            |                                     |
            |                                     GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2591:25: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2591 |     const GEOSGeometry* g,
            |     ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:2952:18: warning: assignment to 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'} from incompatible pointer type 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} [-Wincompatible-pointer-types]
       2952 |     __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, 0);
            |                  ^
      src/_geoslib.c:2995:45: warning: passing argument 1 of 'GEOSGetNumGeometries' from incompatible pointer type [-Wincompatible-pointer-types]
       2995 |     __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3);
            |                                             ^~~~~~~~~~
            |                                             |
            |                                             GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2573:62: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2573 | extern int GEOS_DLL GEOSGetNumGeometries(const GEOSGeometry* g);
            |                                          ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:3004:37: warning: passing argument 1 of 'GEOSGetGeometryN' from incompatible pointer type [-Wincompatible-pointer-types]
       3004 |     __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, 0);
            |                                     ^~~~~~~~~~
            |                                     |
            |                                     GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2591:25: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2591 |     const GEOSGeometry* g,
            |     ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:3004:18: warning: assignment to 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'} from incompatible pointer type 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} [-Wincompatible-pointer-types]
       3004 |     __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, 0);
            |                  ^
      src/_geoslib.c:3047:49: warning: passing argument 1 of 'GEOSGeomType' from incompatible pointer type [-Wincompatible-pointer-types]
       3047 |     __pyx_t_2 = PyBytes_FromString(GEOSGeomType(__pyx_v_g3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 258, __pyx_L1_error)
            |                                                 ^~~~~~~~~~
            |                                                 |
            |                                                 GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2533:56: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2533 | extern char GEOS_DLL *GEOSGeomType(const GEOSGeometry* g);
            |                                    ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:3077:20: warning: passing argument 1 of 'GEOSGeom_destroy' from incompatible pointer type [-Wincompatible-pointer-types]
       3077 |   GEOSGeom_destroy(__pyx_v_g3);
            |                    ^~~~~~~~~~
            |                    |
            |                    GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2514:53: note: expected 'GEOSGeometry *' {aka 'struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2514 | extern void GEOS_DLL GEOSGeom_destroy(GEOSGeometry* g);
            |                                       ~~~~~~~~~~~~~~^
      src/_geoslib.c: In function '__pyx_pf_8_geoslib_12BaseGeometry_12intersects':
      src/_geoslib.c:3180:35: warning: passing argument 1 of 'GEOSIntersects' from incompatible pointer type [-Wincompatible-pointer-types]
       3180 |   __pyx_v_answer = GEOSIntersects(__pyx_v_g1, __pyx_v_g2);
            |                                   ^~~~~~~~~~
            |                                   |
            |                                   GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:4672:57: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       4672 | extern char GEOS_DLL GEOSIntersects(const GEOSGeometry* g1, const GEOSGeometry* g2);
            |                                     ~~~~~~~~~~~~~~~~~~~~^~
      src/_geoslib.c:3180:47: warning: passing argument 2 of 'GEOSIntersects' from incompatible pointer type [-Wincompatible-pointer-types]
       3180 |   __pyx_v_answer = GEOSIntersects(__pyx_v_g1, __pyx_v_g2);
            |                                               ^~~~~~~~~~
            |                                               |
            |                                               GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:4672:81: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       4672 | extern char GEOS_DLL GEOSIntersects(const GEOSGeometry* g1, const GEOSGeometry* g2);
            |                                                             ~~~~~~~~~~~~~~~~~~~~^~
      src/_geoslib.c: In function '__pyx_pf_8_geoslib_12BaseGeometry_14intersection':
      src/_geoslib.c:3320:33: warning: passing argument 1 of 'GEOSIntersection' from incompatible pointer type [-Wincompatible-pointer-types]
       3320 |   __pyx_v_g3 = GEOSIntersection(__pyx_v_g1, __pyx_v_g2);
            |                                 ^~~~~~~~~~
            |                                 |
            |                                 GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:3397:68: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       3397 | extern GEOSGeometry GEOS_DLL *GEOSIntersection(const GEOSGeometry* g1, const GEOSGeometry* g2);
            |                                                ~~~~~~~~~~~~~~~~~~~~^~
      src/_geoslib.c:3320:45: warning: passing argument 2 of 'GEOSIntersection' from incompatible pointer type [-Wincompatible-pointer-types]
       3320 |   __pyx_v_g3 = GEOSIntersection(__pyx_v_g1, __pyx_v_g2);
            |                                             ^~~~~~~~~~
            |                                             |
            |                                             GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:3397:92: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       3397 | extern GEOSGeometry GEOS_DLL *GEOSIntersection(const GEOSGeometry* g1, const GEOSGeometry* g2);
            |                                                                        ~~~~~~~~~~~~~~~~~~~~^~
      src/_geoslib.c:3320:14: warning: assignment to 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'} from incompatible pointer type 'GEOSGeometry *' {aka 'struct GEOSGeom_t *'} [-Wincompatible-pointer-types]
       3320 |   __pyx_v_g3 = GEOSIntersection(__pyx_v_g1, __pyx_v_g2);
            |              ^
      src/_geoslib.c:3329:35: warning: passing argument 1 of 'GEOSGeomTypeId' from incompatible pointer type [-Wincompatible-pointer-types]
       3329 |   __pyx_v_typeid = GEOSGeomTypeId(__pyx_v_g3);
            |                                   ^~~~~~~~~~
            |                                   |
            |                                   GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2541:56: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2541 | extern int GEOS_DLL GEOSGeomTypeId(const GEOSGeometry* g);
            |                                    ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:3446:45: warning: passing argument 1 of 'GEOSGetNumGeometries' from incompatible pointer type [-Wincompatible-pointer-types]
       3446 |     __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3);
            |                                             ^~~~~~~~~~
            |                                             |
            |                                             GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2573:62: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2573 | extern int GEOS_DLL GEOSGetNumGeometries(const GEOSGeometry* g);
            |                                          ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:3477:39: warning: passing argument 1 of 'GEOSGetGeometryN' from incompatible pointer type [-Wincompatible-pointer-types]
       3477 |       __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, __pyx_v_i);
            |                                       ^~~~~~~~~~
            |                                       |
            |                                       GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2591:25: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2591 |     const GEOSGeometry* g,
            |     ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:3477:20: warning: assignment to 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'} from incompatible pointer type 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} [-Wincompatible-pointer-types]
       3477 |       __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, __pyx_v_i);
            |                    ^
      src/_geoslib.c:3530:45: warning: passing argument 1 of 'GEOSGetNumGeometries' from incompatible pointer type [-Wincompatible-pointer-types]
       3530 |     __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3);
            |                                             ^~~~~~~~~~
            |                                             |
            |                                             GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2573:62: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2573 | extern int GEOS_DLL GEOSGetNumGeometries(const GEOSGeometry* g);
            |                                          ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:3561:39: warning: passing argument 1 of 'GEOSGetGeometryN' from incompatible pointer type [-Wincompatible-pointer-types]
       3561 |       __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, __pyx_v_i);
            |                                       ^~~~~~~~~~
            |                                       |
            |                                       GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2591:25: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2591 |     const GEOSGeometry* g,
            |     ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:3561:20: warning: assignment to 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'} from incompatible pointer type 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} [-Wincompatible-pointer-types]
       3561 |       __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, __pyx_v_i);
            |                    ^
      src/_geoslib.c:3614:22: warning: passing argument 1 of 'GEOSGeom_destroy' from incompatible pointer type [-Wincompatible-pointer-types]
       3614 |     GEOSGeom_destroy(__pyx_v_g3);
            |                      ^~~~~~~~~~
            |                      |
            |                      GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2514:53: note: expected 'GEOSGeometry *' {aka 'struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2514 | extern void GEOS_DLL GEOSGeom_destroy(GEOSGeometry* g);
            |                                       ~~~~~~~~~~~~~~^
      src/_geoslib.c:3639:20: warning: passing argument 1 of 'GEOSGeom_destroy' from incompatible pointer type [-Wincompatible-pointer-types]
       3639 |   GEOSGeom_destroy(__pyx_v_g3);
            |                    ^~~~~~~~~~
            |                    |
            |                    GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2514:53: note: expected 'GEOSGeometry *' {aka 'struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2514 | extern void GEOS_DLL GEOSGeom_destroy(GEOSGeometry* g);
            |                                       ~~~~~~~~~~~~~~^
      src/_geoslib.c: In function '__pyx_pf_8_geoslib_12BaseGeometry_18__dealloc__':
      src/_geoslib.c:3768:32: warning: passing argument 1 of 'GEOSGeom_destroy' from incompatible pointer type [-Wincompatible-pointer-types]
       3768 |   GEOSGeom_destroy(__pyx_v_self->_geom);
            |                    ~~~~~~~~~~~~^~~~~~~
            |                                |
            |                                GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2514:53: note: expected 'GEOSGeometry *' {aka 'struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2514 | extern void GEOS_DLL GEOSGeom_destroy(GEOSGeometry* g);
            |                                       ~~~~~~~~~~~~~~^
      src/_geoslib.c: In function '__pyx_pf_8_geoslib_7Polygon___init__':
      src/_geoslib.c:4197:14: warning: assignment to 'GEOSCoordSequence **' {aka 'struct GEOSCoordSeq_t **'} from incompatible pointer type 'GEOSCoordSequence *' {aka 'struct GEOSCoordSeq_t *'} [-Wincompatible-pointer-types]
       4197 |   __pyx_v_cs = GEOSCoordSeq_create(__pyx_v_M, 2);
            |              ^
      src/_geoslib.c:4243:30: warning: passing argument 1 of 'GEOSCoordSeq_setX' from incompatible pointer type [-Wincompatible-pointer-types]
       4243 |     (void)(GEOSCoordSeq_setX(__pyx_v_cs, __pyx_v_i, __pyx_v_dx));
            |                              ^~~~~~~~~~
            |                              |
            |                              GEOSCoordSequence ** {aka struct GEOSCoordSeq_t **}
      /opt/conda/include/geos_c.h:2184:58: note: expected 'GEOSCoordSequence *' {aka 'struct GEOSCoordSeq_t *'} but argument is of type 'GEOSCoordSequence **' {aka 'struct GEOSCoordSeq_t **'}
       2184 | extern int GEOS_DLL GEOSCoordSeq_setX(GEOSCoordSequence* s,
            |                                       ~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:4252:30: warning: passing argument 1 of 'GEOSCoordSeq_setY' from incompatible pointer type [-Wincompatible-pointer-types]
       4252 |     (void)(GEOSCoordSeq_setY(__pyx_v_cs, __pyx_v_i, __pyx_v_dy));
            |                              ^~~~~~~~~~
            |                              |
            |                              GEOSCoordSequence ** {aka struct GEOSCoordSeq_t **}
      /opt/conda/include/geos_c.h:2194:58: note: expected 'GEOSCoordSequence *' {aka 'struct GEOSCoordSeq_t *'} but argument is of type 'GEOSCoordSequence **' {aka 'struct GEOSCoordSeq_t **'}
       2194 | extern int GEOS_DLL GEOSCoordSeq_setY(GEOSCoordSequence* s,
            |                                       ~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:4290:30: warning: passing argument 1 of 'GEOSCoordSeq_setX' from incompatible pointer type [-Wincompatible-pointer-types]
       4290 |     (void)(GEOSCoordSeq_setX(__pyx_v_cs, (__pyx_v_M - 1), __pyx_v_dx));
            |                              ^~~~~~~~~~
            |                              |
            |                              GEOSCoordSequence ** {aka struct GEOSCoordSeq_t **}
      /opt/conda/include/geos_c.h:2184:58: note: expected 'GEOSCoordSequence *' {aka 'struct GEOSCoordSeq_t *'} but argument is of type 'GEOSCoordSequence **' {aka 'struct GEOSCoordSeq_t **'}
       2184 | extern int GEOS_DLL GEOSCoordSeq_setX(GEOSCoordSequence* s,
            |                                       ~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:4299:30: warning: passing argument 1 of 'GEOSCoordSeq_setY' from incompatible pointer type [-Wincompatible-pointer-types]
       4299 |     (void)(GEOSCoordSeq_setY(__pyx_v_cs, (__pyx_v_M - 1), __pyx_v_dy));
            |                              ^~~~~~~~~~
            |                              |
            |                              GEOSCoordSequence ** {aka struct GEOSCoordSeq_t **}
      /opt/conda/include/geos_c.h:2194:58: note: expected 'GEOSCoordSequence *' {aka 'struct GEOSCoordSeq_t *'} but argument is of type 'GEOSCoordSequence **' {aka 'struct GEOSCoordSeq_t **'}
       2194 | extern int GEOS_DLL GEOSCoordSeq_setY(GEOSCoordSequence* s,
            |                                       ~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:4317:42: warning: passing argument 1 of 'GEOSGeom_createLinearRing' from incompatible pointer type [-Wincompatible-pointer-types]
       4317 |   __pyx_v_lr = GEOSGeom_createLinearRing(__pyx_v_cs);
            |                                          ^~~~~~~~~~
            |                                          |
            |                                          GEOSCoordSequence ** {aka struct GEOSCoordSeq_t **}
      /opt/conda/include/geos_c.h:2391:76: note: expected 'GEOSCoordSequence *' {aka 'struct GEOSCoordSeq_t *'} but argument is of type 'GEOSCoordSequence **' {aka 'struct GEOSCoordSeq_t **'}
       2391 | extern GEOSGeometry GEOS_DLL *GEOSGeom_createLinearRing(GEOSCoordSequence* s);
            |                                                         ~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:4317:14: warning: assignment to 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'} from incompatible pointer type 'GEOSGeometry *' {aka 'struct GEOSGeom_t *'} [-Wincompatible-pointer-types]
       4317 |   __pyx_v_lr = GEOSGeom_createLinearRing(__pyx_v_cs);
            |              ^
      src/_geoslib.c:4326:59: warning: passing argument 1 of 'GEOSGeom_createPolygon' from incompatible pointer type [-Wincompatible-pointer-types]
       4326 |   __pyx_v_self->__pyx_base._geom = GEOSGeom_createPolygon(__pyx_v_lr, NULL, 0);
            |                                                           ^~~~~~~~~~
            |                                                           |
            |                                                           GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2434:19: note: expected 'GEOSGeometry *' {aka 'struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2434 |     GEOSGeometry* shell,
            |     ~~~~~~~~~~~~~~^~~~~
      src/_geoslib.c:4326:34: warning: assignment to 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'} from incompatible pointer type 'GEOSGeometry *' {aka 'struct GEOSGeom_t *'} [-Wincompatible-pointer-types]
       4326 |   __pyx_v_self->__pyx_base._geom = GEOSGeom_createPolygon(__pyx_v_lr, NULL, 0);
            |                                  ^
      src/_geoslib.c: In function '__pyx_pf_8_geoslib_7Polygon_2area':
      src/_geoslib.c:4402:43: warning: passing argument 1 of 'GEOSArea' from incompatible pointer type [-Wincompatible-pointer-types]
       4402 |   (void)(GEOSArea(__pyx_v_self->__pyx_base._geom, (&__pyx_v_area)));
            |                   ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
            |                                           |
            |                                           GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:3144:25: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       3144 |     const GEOSGeometry* g,
            |     ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c: In function '__pyx_pf_8_geoslib_10LineString___init__':
      src/_geoslib.c:4602:14: warning: assignment to 'GEOSCoordSequence **' {aka 'struct GEOSCoordSeq_t **'} from incompatible pointer type 'GEOSCoordSequence *' {aka 'struct GEOSCoordSeq_t *'} [-Wincompatible-pointer-types]
       4602 |   __pyx_v_cs = GEOSCoordSeq_create(__pyx_v_M, 2);
            |              ^
      src/_geoslib.c:4648:30: warning: passing argument 1 of 'GEOSCoordSeq_setX' from incompatible pointer type [-Wincompatible-pointer-types]
       4648 |     (void)(GEOSCoordSeq_setX(__pyx_v_cs, __pyx_v_i, __pyx_v_dx));
            |                              ^~~~~~~~~~
            |                              |
            |                              GEOSCoordSequence ** {aka struct GEOSCoordSeq_t **}
      /opt/conda/include/geos_c.h:2184:58: note: expected 'GEOSCoordSequence *' {aka 'struct GEOSCoordSeq_t *'} but argument is of type 'GEOSCoordSequence **' {aka 'struct GEOSCoordSeq_t **'}
       2184 | extern int GEOS_DLL GEOSCoordSeq_setX(GEOSCoordSequence* s,
            |                                       ~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:4657:30: warning: passing argument 1 of 'GEOSCoordSeq_setY' from incompatible pointer type [-Wincompatible-pointer-types]
       4657 |     (void)(GEOSCoordSeq_setY(__pyx_v_cs, __pyx_v_i, __pyx_v_dy));
            |                              ^~~~~~~~~~
            |                              |
            |                              GEOSCoordSequence ** {aka struct GEOSCoordSeq_t **}
      /opt/conda/include/geos_c.h:2194:58: note: expected 'GEOSCoordSequence *' {aka 'struct GEOSCoordSeq_t *'} but argument is of type 'GEOSCoordSequence **' {aka 'struct GEOSCoordSeq_t **'}
       2194 | extern int GEOS_DLL GEOSCoordSeq_setY(GEOSCoordSequence* s,
            |                                       ~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:4667:62: warning: passing argument 1 of 'GEOSGeom_createLineString' from incompatible pointer type [-Wincompatible-pointer-types]
       4667 |   __pyx_v_self->__pyx_base._geom = GEOSGeom_createLineString(__pyx_v_cs);
            |                                                              ^~~~~~~~~~
            |                                                              |
            |                                                              GEOSCoordSequence ** {aka struct GEOSCoordSeq_t **}
      /opt/conda/include/geos_c.h:2400:76: note: expected 'GEOSCoordSequence *' {aka 'struct GEOSCoordSeq_t *'} but argument is of type 'GEOSCoordSequence **' {aka 'struct GEOSCoordSeq_t **'}
       2400 | extern GEOSGeometry GEOS_DLL *GEOSGeom_createLineString(GEOSCoordSequence* s);
            |                                                         ~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:4667:34: warning: assignment to 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'} from incompatible pointer type 'GEOSGeometry *' {aka 'struct GEOSGeom_t *'} [-Wincompatible-pointer-types]
       4667 |   __pyx_v_self->__pyx_base._geom = GEOSGeom_createLineString(__pyx_v_cs);
            |                                  ^
      src/_geoslib.c: In function '__pyx_pf_8_geoslib_5Point___init__':
      src/_geoslib.c:4786:14: warning: assignment to 'GEOSCoordSequence **' {aka 'struct GEOSCoordSeq_t **'} from incompatible pointer type 'GEOSCoordSequence *' {aka 'struct GEOSCoordSeq_t *'} [-Wincompatible-pointer-types]
       4786 |   __pyx_v_cs = GEOSCoordSeq_create(1, 2);
            |              ^
      src/_geoslib.c:4813:28: warning: passing argument 1 of 'GEOSCoordSeq_setX' from incompatible pointer type [-Wincompatible-pointer-types]
       4813 |   (void)(GEOSCoordSeq_setX(__pyx_v_cs, 0, __pyx_v_dx));
            |                            ^~~~~~~~~~
            |                            |
            |                            GEOSCoordSequence ** {aka struct GEOSCoordSeq_t **}
      /opt/conda/include/geos_c.h:2184:58: note: expected 'GEOSCoordSequence *' {aka 'struct GEOSCoordSeq_t *'} but argument is of type 'GEOSCoordSequence **' {aka 'struct GEOSCoordSeq_t **'}
       2184 | extern int GEOS_DLL GEOSCoordSeq_setX(GEOSCoordSequence* s,
            |                                       ~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:4822:28: warning: passing argument 1 of 'GEOSCoordSeq_setY' from incompatible pointer type [-Wincompatible-pointer-types]
       4822 |   (void)(GEOSCoordSeq_setY(__pyx_v_cs, 0, __pyx_v_dy));
            |                            ^~~~~~~~~~
            |                            |
            |                            GEOSCoordSequence ** {aka struct GEOSCoordSeq_t **}
      /opt/conda/include/geos_c.h:2194:58: note: expected 'GEOSCoordSequence *' {aka 'struct GEOSCoordSeq_t *'} but argument is of type 'GEOSCoordSequence **' {aka 'struct GEOSCoordSeq_t **'}
       2194 | extern int GEOS_DLL GEOSCoordSeq_setY(GEOSCoordSequence* s,
            |                                       ~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:4831:57: warning: passing argument 1 of 'GEOSGeom_createPoint' from incompatible pointer type [-Wincompatible-pointer-types]
       4831 |   __pyx_v_self->__pyx_base._geom = GEOSGeom_createPoint(__pyx_v_cs);
            |                                                         ^~~~~~~~~~
            |                                                         |
            |                                                         GEOSCoordSequence ** {aka struct GEOSCoordSeq_t **}
      /opt/conda/include/geos_c.h:2362:71: note: expected 'GEOSCoordSequence *' {aka 'struct GEOSCoordSeq_t *'} but argument is of type 'GEOSCoordSequence **' {aka 'struct GEOSCoordSeq_t **'}
       2362 | extern GEOSGeometry GEOS_DLL *GEOSGeom_createPoint(GEOSCoordSequence* s);
            |                                                    ~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:4831:34: warning: assignment to 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'} from incompatible pointer type 'GEOSGeometry *' {aka 'struct GEOSGeom_t *'} [-Wincompatible-pointer-types]
       4831 |   __pyx_v_self->__pyx_base._geom = GEOSGeom_createPoint(__pyx_v_cs);
            |                                  ^
      src/_geoslib.c: In function '__pyx_f_8_geoslib__get_coords':
      src/_geoslib.c:5097:32: warning: passing argument 1 of 'GEOSGeomTypeId' from incompatible pointer type [-Wincompatible-pointer-types]
       5097 |   __pyx_t_1 = ((GEOSGeomTypeId(__pyx_v_geom) == GEOS_POLYGON) != 0);
            |                                ^~~~~~~~~~~~
            |                                |
            |                                GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2541:56: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2541 | extern int GEOS_DLL GEOSGeomTypeId(const GEOSGeometry* g);
            |                                    ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:5107:38: warning: passing argument 1 of 'GEOSGetExteriorRing' from incompatible pointer type [-Wincompatible-pointer-types]
       5107 |     __pyx_v_lr = GEOSGetExteriorRing(__pyx_v_geom);
            |                                      ^~~~~~~~~~~~
            |                                      |
            |                                      GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2687:25: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2687 |     const GEOSGeometry* g);
            |     ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:5107:16: warning: assignment to 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'} from incompatible pointer type 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} [-Wincompatible-pointer-types]
       5107 |     __pyx_v_lr = GEOSGetExteriorRing(__pyx_v_geom);
            |                ^
      src/_geoslib.c:5116:39: warning: passing argument 1 of 'GEOSGeom_getCoordSeq' from incompatible pointer type [-Wincompatible-pointer-types]
       5116 |     __pyx_v_cs = GEOSGeom_getCoordSeq(__pyx_v_lr);
            |                                       ^~~~~~~~~~
            |                                       |
            |                                       GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2709:25: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2709 |     const GEOSGeometry* g);
            |     ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:5116:16: warning: assignment to 'GEOSCoordSequence **' {aka 'struct GEOSCoordSeq_t **'} from incompatible pointer type 'const GEOSCoordSequence *' {aka 'const struct GEOSCoordSeq_t *'} [-Wincompatible-pointer-types]
       5116 |     __pyx_v_cs = GEOSGeom_getCoordSeq(__pyx_v_lr);
            |                ^
      src/_geoslib.c:5136:39: warning: passing argument 1 of 'GEOSGeom_getCoordSeq' from incompatible pointer type [-Wincompatible-pointer-types]
       5136 |     __pyx_v_cs = GEOSGeom_getCoordSeq(__pyx_v_geom);
            |                                       ^~~~~~~~~~~~
            |                                       |
            |                                       GEOSGeometry ** {aka struct GEOSGeom_t **}
      /opt/conda/include/geos_c.h:2709:25: note: expected 'const GEOSGeometry *' {aka 'const struct GEOSGeom_t *'} but argument is of type 'GEOSGeometry **' {aka 'struct GEOSGeom_t **'}
       2709 |     const GEOSGeometry* g);
            |     ~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:5136:16: warning: assignment to 'GEOSCoordSequence **' {aka 'struct GEOSCoordSeq_t **'} from incompatible pointer type 'const GEOSCoordSequence *' {aka 'const struct GEOSCoordSeq_t *'} [-Wincompatible-pointer-types]
       5136 |     __pyx_v_cs = GEOSGeom_getCoordSeq(__pyx_v_geom);
            |                ^
      src/_geoslib.c:5147:31: warning: passing argument 1 of 'GEOSCoordSeq_getSize' from incompatible pointer type [-Wincompatible-pointer-types]
       5147 |   (void)(GEOSCoordSeq_getSize(__pyx_v_cs, (&__pyx_v_M)));
            |                               ^~~~~~~~~~
            |                               |
            |                               GEOSCoordSequence ** {aka struct GEOSCoordSeq_t **}
      /opt/conda/include/geos_c.h:2319:30: note: expected 'const GEOSCoordSequence *' {aka 'const struct GEOSCoordSeq_t *'} but argument is of type 'GEOSCoordSequence **' {aka 'struct GEOSCoordSeq_t **'}
       2319 |     const GEOSCoordSequence* s,
            |     ~~~~~~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:5255:30: warning: passing argument 1 of 'GEOSCoordSeq_getX' from incompatible pointer type [-Wincompatible-pointer-types]
       5255 |     (void)(GEOSCoordSeq_getX(__pyx_v_cs, __pyx_v_i, (&__pyx_v_dx)));
            |                              ^~~~~~~~~~
            |                              |
            |                              GEOSCoordSequence ** {aka struct GEOSCoordSeq_t **}
      /opt/conda/include/geos_c.h:2251:64: note: expected 'const GEOSCoordSequence *' {aka 'const struct GEOSCoordSeq_t *'} but argument is of type 'GEOSCoordSequence **' {aka 'struct GEOSCoordSeq_t **'}
       2251 | extern int GEOS_DLL GEOSCoordSeq_getX(const GEOSCoordSequence* s,
            |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c:5264:30: warning: passing argument 1 of 'GEOSCoordSeq_getY' from incompatible pointer type [-Wincompatible-pointer-types]
       5264 |     (void)(GEOSCoordSeq_getY(__pyx_v_cs, __pyx_v_i, (&__pyx_v_dy)));
            |                              ^~~~~~~~~~
            |                              |
            |                              GEOSCoordSequence ** {aka struct GEOSCoordSeq_t **}
      /opt/conda/include/geos_c.h:2262:64: note: expected 'const GEOSCoordSequence *' {aka 'const struct GEOSCoordSeq_t *'} but argument is of type 'GEOSCoordSequence **' {aka 'struct GEOSCoordSeq_t **'}
       2262 | extern int GEOS_DLL GEOSCoordSeq_getY(const GEOSCoordSequence* s,
            |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~^
      src/_geoslib.c: In function '__pyx_pymod_exec__geoslib':
      src/_geoslib.c:6273:3: warning: returning 'void *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
       6273 |   import_array();
            |   ^~~~~~~~~~~~
      src/_geoslib.c:6306:12: warning: passing argument 1 of 'initGEOS' from incompatible pointer type [-Wincompatible-pointer-types]
       6306 |   initGEOS(__pyx_f_8_geoslib_notice_h, __pyx_f_8_geoslib_error_h);
            |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
            |            |
            |            void (*)(char *, char *)
      /opt/conda/include/geos_c.h:2074:24: note: expected 'GEOSMessageHandler' {aka 'void (*)(const char *, ...)'} but argument is of type 'void (*)(char *, char *)'
       2074 |     GEOSMessageHandler notice_function,
            |     ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
      src/_geoslib.c:6306:40: warning: passing argument 2 of 'initGEOS' from incompatible pointer type [-Wincompatible-pointer-types]
       6306 |   initGEOS(__pyx_f_8_geoslib_notice_h, __pyx_f_8_geoslib_error_h);
            |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~
            |                                        |
            |                                        void (*)(char *, char *)
      /opt/conda/include/geos_c.h:2075:24: note: expected 'GEOSMessageHandler' {aka 'void (*)(const char *, ...)'} but argument is of type 'void (*)(char *, char *)'
       2075 |     GEOSMessageHandler error_function);
            |     ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
      /opt/conda/bin/x86_64-conda-linux-gnu-cc -shared -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/conda/lib -Wl,-rpath-link,/opt/conda/lib -L/opt/conda/lib -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/conda/lib -Wl,-rpath-link,/opt/conda/lib -L/opt/conda/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/opt/conda/lib -Wl,-rpath-link,/opt/conda/lib -L/opt/conda/lib -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/conda/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /opt/conda/include build/temp.linux-aarch64-cpython-310/src/_geoslib.o -L/opt/conda/lib -L/opt/conda/lib64 -Wl,-R/opt/conda/lib -Wl,-R/opt/conda/lib64 -lgeos_c -o build/lib.linux-aarch64-cpython-310/_geoslib.cpython-310-aarch64-linux-gnu.so
      /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: skipping incompatible /opt/conda/lib/libgeos_c.so when searching for -lgeos_c
      /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: skipping incompatible /opt/conda/lib/libgeos_c.so when searching for -lgeos_c
      /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: skipping incompatible /opt/conda/lib/libgeos_c.so when searching for -lgeos_c
      /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: skipping incompatible /opt/conda/lib/libgeos_c.so when searching for -lgeos_c
      /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: skipping incompatible /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../lib/libgeos_c.so when searching for -lgeos_c
      /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: skipping incompatible /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../libgeos_c.so when searching for -lgeos_c
      /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find -lgeos_c: No such file or directory
      /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: skipping incompatible /opt/conda/lib/libgeos_c.so when searching for -lgeos_c
      /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: skipping incompatible /opt/conda/lib/libgeos_c.so when searching for -lgeos_c
      /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: skipping incompatible /opt/conda/lib/libgeos_c.so when searching for -lgeos_c
      /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: skipping incompatible /opt/conda/lib/libgeos_c.so when searching for -lgeos_c
      /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: skipping incompatible /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../lib/libgeos_c.so when searching for -lgeos_c
      /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: skipping incompatible /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../libgeos_c.so when searching for -lgeos_c
      /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: skipping incompatible /opt/conda/lib/libgcc_s.so.1 when searching for libgcc_s.so.1
      /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: skipping incompatible /opt/conda/lib/libgcc_s.so.1 when searching for libgcc_s.so.1
      /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: skipping incompatible /opt/conda/lib/libgcc_s.so.1 when searching for libgcc_s.so.1
      /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: skipping incompatible /opt/conda/lib/libgcc_s.so.1 when searching for libgcc_s.so.1
      /opt/conda/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: skipping incompatible /opt/conda/lib/libgcc_s.so.1 when searching for libgcc_s.so.1
      collect2: error: ld returned 1 exit status
      error: command '/opt/conda/bin/x86_64-conda-linux-gnu-cc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for basemap
Failed to build basemap
ERROR: Could not build wheels for basemap, which is required to install pyproject.toml-based projects
leonid-butenko commented 1 year ago

I thought ok, may be it's a broken geos lib coming from conda. Then I skipped geos from the list in the commands sequence above and installed it manually from source code as suggested in here https://matplotlib.org/basemap/users/installing.html. Surprisingly pip install did eventually work:

(base) root@ef3e2fe4c870:/src# wget https://download.osgeo.org/geos/geos-3.12.0.tar.bz2
(base) root@ef3e2fe4c870:/src# tar -xvf geos-3.12.0.tar.bz2  
(base) root@ef3e2fe4c870:/src/geos-3.12.0# export GEOS_DIR=/opt/geos
(base) root@ef3e2fe4c870:/src/geos-3.12.0# ./configure --prefix=$GEOS_DIR
(base) root@ef3e2fe4c870:/src/geos-3.12.0# make; make install
(base) root@ef3e2fe4c870:/src/geos-3.12.0# python -m pip install git+https://github.com/matplotlib/basemap.git@hotfix-1.3.8#subdirectory=packages/basemap
Collecting git+https://github.com/matplotlib/basemap.git@hotfix-1.3.8#subdirectory=packages/basemap
  Cloning https://github.com/matplotlib/basemap.git (to revision hotfix-1.3.8) to /tmp/pip-req-build-1oebls2l
  Running command git clone --filter=blob:none --quiet https://github.com/matplotlib/basemap.git /tmp/pip-req-build-1oebls2l
  Running command git checkout -b hotfix-1.3.8 --track origin/hotfix-1.3.8
  Switched to a new branch 'hotfix-1.3.8'
  Branch 'hotfix-1.3.8' set up to track remote branch 'hotfix-1.3.8' from 'origin'.
  Resolved https://github.com/matplotlib/basemap.git to commit 40b7ba8c63bcf7ab7ae6bee67ee2798b19b454ec
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting basemap-data<1.4,>=1.3.2 (from basemap==1.3.7)
  Downloading basemap_data-1.3.2-py2.py3-none-any.whl (30.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 30.5/30.5 MB 62.4 MB/s eta 0:00:00
Collecting pyshp<2.4,>=1.2 (from basemap==1.3.7)
  Downloading pyshp-2.3.1-py2.py3-none-any.whl (46 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.5/46.5 kB 18.1 MB/s eta 0:00:00
Requirement already satisfied: matplotlib<3.8,>=1.5 in /opt/conda/lib/python3.10/site-packages (from basemap==1.3.7) (3.7.2)
Requirement already satisfied: pyproj<3.7.0,>=1.9.3 in /opt/conda/lib/python3.10/site-packages (from basemap==1.3.7) (3.5.0)
Requirement already satisfied: numpy<1.26,>=1.21 in /opt/conda/lib/python3.10/site-packages (from basemap==1.3.7) (1.24.4)
Requirement already satisfied: contourpy>=1.0.1 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (1.1.0)
Requirement already satisfied: cycler>=0.10 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (0.11.0)
Requirement already satisfied: fonttools>=4.22.0 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (4.41.1)
Requirement already satisfied: kiwisolver>=1.0.1 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (1.4.4)
Requirement already satisfied: packaging>=20.0 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (23.1)
Requirement already satisfied: pillow>=6.2.0 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (10.0.0)
Requirement already satisfied: pyparsing<3.1,>=2.3.1 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (3.0.9)
Requirement already satisfied: python-dateutil>=2.7 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (2.8.2)
Requirement already satisfied: certifi in /opt/conda/lib/python3.10/site-packages (from pyproj<3.7.0,>=1.9.3->basemap==1.3.7) (2023.7.22)
Requirement already satisfied: six>=1.5 in /opt/conda/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib<3.8,>=1.5->basemap==1.3.7) (1.16.0)
Building wheels for collected packages: basemap
  Building wheel for basemap (pyproject.toml) ... done
  Created wheel for basemap: filename=basemap-1.3.7-cp310-cp310-linux_aarch64.whl size=110349 sha256=f0809638e1295ca252091db103489cf714cf7da29b14c5684a5e3f8ba97bbb21
  Stored in directory: /tmp/pip-ephem-wheel-cache-ftebo515/wheels/bd/5e/fa/b12b441bfc8d8313b2d02de68afe2ea564ce61c7fc0994f4b3
Successfully built basemap
Installing collected packages: pyshp, basemap-data, basemap
Successfully installed basemap-1.3.7 basemap-data-1.3.2 pyshp-2.3.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

whereas when i try to run it, i get this:

(base) root@ef3e2fe4c870:/src/geos-3.12.0# python
Python 3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:28:59) [GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from mpl_toolkits.basemap import Basemap
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/conda/lib/python3.10/site-packages/mpl_toolkits/basemap/__init__.py", line 53, in <module>
    import _geoslib
ImportError: /opt/conda/lib/python3.10/site-packages/_geoslib.cpython-310-aarch64-linux-gnu.so: cannot open shared object file: No such file or directory
>>> 

Apparently the _geoslib.cpython is not there. Any ideas?

molinav commented 1 year ago

@leonid-butenko Thanks for the feedback! Now I am a bit confused, but very likely due to lack of knowledge:

  1. Your container has platform linux/arm64. However, I see that the compiler is /opt/conda/bin/x86_64-conda-linux-gnu-cc (so x64 compiler). Is this a normal thing in conda for ARM64 and the compilation is by default cross-compilation?
  2. I would also wonder if the conda shared library libgeos_c.so is compiled for ARM64 or for x64. Non-matching architectures could be a reason why the traceback says that the shared library is incompatible.
  3. It is strange that the file _geoslib.cpython-310-aarch64-linux-gnu.so is not available at site-packages, because it gets bundled automatically into the wheel when building without having to do anything manually. You can try to rescue the built wheel file and check that the _geoslib.cpython-310-aarch64-linux-gnu.so is actually missing there.

Unfortunately I have no ARM64 machine around, so it is not easy for me to test locally. However, at least the original error opening the issue seems gone, and it was caused by Cython 3.0.0 (I have found other projects affected in the same manner). At some point I will need to update the _geoslib.pyx file to make it compliant with Cython 3.0.0.

leonid-butenko commented 12 months ago

Sorry, my fault. Thanks for spotting that. Indeed I used amd64 version of the compiler in my last experiment. Here is the right one. And it seems to work:

>docker run -it --rm --platform=linux/arm64 condaforge/miniforge3:latest
(base) root@51b25a27f243:/# conda install -y matplotlib pyproj=3.5 proj geos numpy=1.24 gcc_linux-aarch64=12.3 gxx_linux-aarch64=12.3 cmake make
(base) root@51b25a27f243:/# GEOS_DIR=$CONDA_PREFIX python -m pip install git+https://github.com/matplotlib/basemap.git@hotfix-1.3.8#subdirectory=packages/basemap                           
^[[ACollecting git+https://github.com/matplotlib/basemap.git@hotfix-1.3.8#subdirectory=packages/basemap                                                                                     
  Cloning https://github.com/matplotlib/basemap.git (to revision hotfix-1.3.8) to /tmp/pip-req-build-vmk_364z                                                                               
  Running command git clone --filter=blob:none --quiet https://github.com/matplotlib/basemap.git /tmp/pip-req-build-vmk_364z                                                                
  Running command git checkout -b hotfix-1.3.8 --track origin/hotfix-1.3.8                                                                                                                  
  Switched to a new branch 'hotfix-1.3.8'                                                                                                                                                   
  Branch 'hotfix-1.3.8' set up to track remote branch 'hotfix-1.3.8' from 'origin'.                                                                                                         
  Resolved https://github.com/matplotlib/basemap.git to commit 40b7ba8c63bcf7ab7ae6bee67ee2798b19b454ec                                                                                     
  Installing build dependencies ... done                                                                                                                                                    
  Getting requirements to build wheel ... done                                                                                                                                              
  Preparing metadata (pyproject.toml) ... done                                                                                                                                              
Collecting basemap-data<1.4,>=1.3.2 (from basemap==1.3.7)                                                                                                                                   
  Downloading basemap_data-1.3.2-py2.py3-none-any.whl (30.5 MB)                                                                                                                             
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 30.5/30.5 MB 55.9 MB/s eta 0:00:00
Collecting pyshp<2.4,>=1.2 (from basemap==1.3.7)                                                                                                                                            
  Downloading pyshp-2.3.1-py2.py3-none-any.whl (46 kB)                                                                                                                                      
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.5/46.5 kB 15.5 MB/s eta 0:00:00
Requirement already satisfied: matplotlib<3.8,>=1.5 in /opt/conda/lib/python3.10/site-packages (from basemap==1.3.7) (3.7.2)                                                                
Requirement already satisfied: pyproj<3.7.0,>=1.9.3 in /opt/conda/lib/python3.10/site-packages (from basemap==1.3.7) (3.5.0)                                                                
Requirement already satisfied: numpy<1.26,>=1.21 in /opt/conda/lib/python3.10/site-packages (from basemap==1.3.7) (1.24.4)                                                                  
Requirement already satisfied: contourpy>=1.0.1 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (1.1.0)                                              
Requirement already satisfied: cycler>=0.10 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (0.11.0)                                                 
Requirement already satisfied: fonttools>=4.22.0 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (4.41.1)                                            
Requirement already satisfied: kiwisolver>=1.0.1 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (1.4.4)                                             
Requirement already satisfied: packaging>=20.0 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (23.1)                                                
Requirement already satisfied: pillow>=6.2.0 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (10.0.0)                                                
Requirement already satisfied: pyparsing<3.1,>=2.3.1 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (3.0.9)                                         
Requirement already satisfied: python-dateutil>=2.7 in /opt/conda/lib/python3.10/site-packages (from matplotlib<3.8,>=1.5->basemap==1.3.7) (2.8.2)                                          
Requirement already satisfied: certifi in /opt/conda/lib/python3.10/site-packages (from pyproj<3.7.0,>=1.9.3->basemap==1.3.7) (2023.7.22)
Requirement already satisfied: six>=1.5 in /opt/conda/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib<3.8,>=1.5->basemap==1.3.7) (1.16.0)
Building wheels for collected packages: basemap
  Building wheel for basemap (pyproject.toml) ... done
  Created wheel for basemap: filename=basemap-1.3.7-cp310-cp310-linux_aarch64.whl size=109987 sha256=6612e015ef5014c9f055c3b2623004791c1679929b72f5e7c7beadc4b162ecff
  Stored in directory: /tmp/pip-ephem-wheel-cache-c6e3xobx/wheels/bd/5e/fa/b12b441bfc8d8313b2d02de68afe2ea564ce61c7fc0994f4b3
Successfully built basemap
Installing collected packages: pyshp, basemap-data, basemap
Successfully installed basemap-1.3.7 basemap-data-1.3.2 pyshp-2.3.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
(base) root@51b25a27f243:/# python
Python 3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:28:59) [GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from mpl_toolkits.basemap import Basemap
>>> 

btw, you can easily run mac (arm64) docker images in emulation using QEmu, they are much slower on intel but that's enough for testing. If you have qemu already installed, just run the docker command from my post.

molinav commented 12 months ago

Nice to see that it is working! If you think the problem is solved, then feel free to close the issue.

In the end your second problem here is more the lack of conda packages for linux/aarch64. This target and osx/arm64 are both missing in the basemap-feedstock. I tried a while ago to extend the recipe for osx/arm64, but I had no success due to cross-compilation issues. But of course if these conda packages were available, it would be for you as easy as doing conda install basemap, and you would not need to do the manual compilation of basemap.

Let's see if I find time in the future to play around again with the basemap-feedstock recipe.

leonid-butenko commented 12 months ago

Sure things. Thanks for your support!

molinav commented 6 months ago

@leonid-butenko Today I released basemap 1.4.0 together with the corresponding packages for conda-forge, and I took some time to migrate the feedstock so that basemap also has conda-forge packages for linux/aarch64. Feel free to try them!