#1014452 pyresample: Test failures with rasterio 1.3.0

Package:
src:pyresample
Source:
pyresample
Submitter:
Bas Couwenberg
Date:
2022-07-08 15:57:06 UTC
Severity:
normal
Tags:
#1014452#5
Date:
2022-07-06 11:04:41 UTC
From:
To:
Dear Maintainer,

Your package FTBFS with rasterio 1.3.0 due to test failures which also affect the autopkgtests:

#1014452#10
Date:
2022-07-08 07:03:57 UTC
From:
To:
Dear Bas,

I'm not able to reproduce the issue in sid.
Both the package build and autopkgtest seem to work with rasterionv1.3.0

Also rasterio seems to properly load the '_loading' module:

$ python3

Python 3.10.5 (main, Jun  8 2022, 09:26:22) [GCC 11.3.0] on linux

Type "help", "copyright", "credits" or "license" for more information.

 >>> import rasterio

 >>> rasterio.__version__

'1.3.0'

 >>> rasterio._loading

<module 'rasterio._loading' from
'/usr/lib/python3/dist-packages/rasterio/_loading.py'>



I see

 >  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?

Any idea on how to proceed?


kind regards

#1014452#15
Date:
2022-07-08 08:52:49 UTC
From:
To:
Control: tags -1 - ftbfs

I cannot reproduce the FTBFS anymore either, tagging accordingly.

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

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

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

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

Kind Regards,

Bas

#1014452#26
Date:
2022-07-08 15:53:02 UTC
From:
To:
notfound 1014452 pyresample/1.23.0-1
severity 1014452 normal
thanks

With rasterio (1.3.0-2) from unstable the autopkgtest no longer fails.

The CMake build did not include port/cpl_vsil_plugin.cpp which caused
the symbols to become unavailable. This was fixed in GDAL 3.5.1:


https://github.com/OSGeo/gdal/commit/c48fe91bf70eb73816a17da76c331eae119f65a1

Kind Regards,

Bas