Bug#1014452: pyresample: Test failures with rasterio 1.3.0

Sebastiaan Couwenberg sebastic at xs4all.nl
Fri Jul 8 09:52:49 BST 2022


Control: tags -1 - ftbfs

On 7/8/22 09:03, Antonio Valentino wrote:
> I'm not able to reproduce the issue in sid.

I cannot reproduce the FTBFS anymore either, tagging accordingly.

> Both the package build and autopkgtest seem to work with rasterionv1.3.0

I can reproduce it in bookworm chroot with python3-rasterio from 
unstable like the debci environment.

Start with an uptodate bookworm chroot and login to it:

  sudo cowbuilder --update \
                  --basepath /var/cache/pbuilder/base-bookworm.cow/
  sudo cowbuilder --login \
                  --basepath /var/cache/pbuilder/base-bookworm.cow/

Get the source package and install dependencies:

  cd /tmp/buildd
  sed -i 's/^#deb/deb/g' /etc/apt/sources.list
  apt update && apt source pyresample
  cd pyresample-1.23.0/
  apt build-dep pyresample
  apt install python3-pyresample python-pyresample-test python3-all

Install autopkgtest packages:

  apt install autopkgtest newpid

Run autopkgtest with only testing versions of packages:

  newpid autopkgtest --no-built-binaries \
                     --output-dir ../autopkgtest.out \
                     --summary ../autopkgtest.summary \
                     -- autopkgtest-virt-null

This autopkgtest run succeeds.

Now add python3-rasterio from unstable:

  echo "deb http://ftp.nl.debian.org/debian/ unstable main" \
  >> /etc/apt/sources.list
  apt update && apt install python3-rasterio

Run autopkgtest again:

  rm -rfv ../autopkgtest.*
  newpid autopkgtest --no-built-binaries \
                     --output-dir ../autopkgtest.out \
                     --summary ../autopkgtest.summary \
                     -- autopkgtest-virt-null

This run fails like the one on debci.

Just importing rasterio fails:

  python3
  >>> import rasterio
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/lib/python3/dist-packages/rasterio/__init__.py", line 14, 
in <module>
      from rasterio.crs import CRS
    File "rasterio/crs.pyx", line 1, in init rasterio.crs
    File "rasterio/_base.pyx", line 22, in init rasterio._base
    File "/usr/lib/python3/dist-packages/rasterio/dtypes.py", line 10, 
in <module>
      from rasterio.env import GDALVersion
    File "/usr/lib/python3/dist-packages/rasterio/env.py", line 16, in 
<module>
      from rasterio._env import (
    File "rasterio/_env.pyx", line 1, in init rasterio._env
  ImportError: 
/usr/lib/python3/dist-packages/rasterio/_filepath.cpython-310-x86_64-linux-gnu.so: 
undefined symbol: VSIAllocFilesystemPluginCallbacksStruct

But it succeeds once libgdal31 from unstable is also used:

  apt install libgdal31
  python3
  >>> import rasterio
  >>> rasterio._show_versions.show_versions()
  rasterio info:
    rasterio: 1.3.0
        GDAL: 3.5.1
        PROJ: 9.0.1
        GEOS: 3.11.0
   PROJ DATA: /root/.local/share/proj:/usr/share/proj
   GDAL DATA: None

  System:
      python: 3.10.5 (main, Jun  8 2022, 09:26:22) [GCC 11.3.0]
  executable: /usr/bin/python3
     machine: Linux-5.10.0-15-amd64-x86_64-with-glibc2.33

  Python deps:
      affine: 2.3.1
       attrs: None
     certifi: 2020.06.20
       click: 8.0.3
       cligj: 0.7.2
      cython: 0.29.30
       numpy: 1.21.5
      snuggs: 1.4.7
  click-plugins: None
  setuptools: 59.6.0

>  >  E   ImportError: 
> /usr/lib/python3/dist-packages/rasterio/_filepath.cpython-39-x86_64-linux-gnu.so: 
> undefined symbol: VSIAllocFilesystemPluginCallbacksStruct
> 
> could it be a problem related to a mismatch with the GDAL version?

That's possible, the undefined symbols issue has been reported upstream:

  https://github.com/rasterio/rasterio/issues/2507

> Any idea on how to proceed?

Rebuilding rasterio with GDAL 3.5.1 seems to fix the symbol issue, let's 
start there.

Kind Regards,

Bas

-- 
  GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1



More information about the Pkg-grass-devel mailing list