[gdal-dev] Conflict between scipy/pypocketfft and GDAL/ECW

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] Conflict between scipy/pypocketfft and GDAL/ECW

Sean Gillies-3
Hi all,

I've run into an apparent conflict between pypocketfft, the basis for scipy.fft introduced in scipy 1.4.0, and GDAL 3.1.0 built with the ECWJP2 SDK version 5.5. I'm wondering if anyone has seen this and found a solution other than downgrading scipy to 1.3.2?

$ pip install scipy
...
Successfully installed scipy-1.4.1
$ python
Python 3.6.6 (default, Sep 12 2018, 18:26:19)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import rasterio
>>> import scipy
free(): invalid pointer
Aborted (core dumped)

I've looked at the above more closely using gdb and the crash occurs on import of one of pypocketfft's C extension modules (an .so file).

Downgrading scipy sidesteps the problem.

$ pip uninstall scipy
...
Successfully uninstalled scipy-1.4.1
$ pip install scipy==1.3.2
...
Successfully installed scipy-1.3.2
$ python
Python 3.6.6 (default, Sep 12 2018, 18:26:19)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import rasterio
>>> import scipy
>>> 

--
Sean Gillies

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Conflict between scipy/pypocketfft and GDAL/ECW

Even Rouault-2

Sean,

 

> I've run into an apparent conflict between pypocketfft, the basis for

> scipy.fft introduced in scipy 1.4.0, and GDAL 3.1.0 built with the ECWJP2

> SDK version 5.5. I'm wondering if anyone has seen this and found a solution

> other than downgrading scipy to 1.3.2?

 

I suspect this is another manifestation of the issue raised in

https://github.com/OSGeo/gdal/issues/2394 , that is that the ECW SDK 5.5 on Linux is statically linked against a libstdc++ implementation, incompatible of the one of the system, that other libraries may use. However it is not obvious to me that scipy contains C++ code.

 

Even

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Conflict between scipy/pypocketfft and GDAL/ECW

Even Rouault-2

> However it is not obvious to me that scipy contains C++ code.

 

... but pypocketfft does:

https://gitlab.mpcdf.mpg.de/mtr/pypocketfft/-/blob/master/pypocketfft.cc

 

Mystery solve !

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Conflict between scipy/pypocketfft and GDAL/ECW

Sean Gillies-3
Hi Even,

On Thu, May 21, 2020 at 12:03 PM Even Rouault <[hidden email]> wrote:

> However it is not obvious to me that scipy contains C++ code.

 

... but pypocketfft does:

https://gitlab.mpcdf.mpg.de/mtr/pypocketfft/-/blob/master/pypocketfft.cc

 

Mystery solve !


Yes, I was just about to point out

$ ldd ~/.virtualenvs/dev-rasterio/lib/python3.6/site-packages/scipy/fft/_pocketfft/pypocketfft.cpython-36m-x86_64-linux-gnu.so
        linux-vdso.so.1 (0x00007ffe423e1000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f1a4e03c000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1a4dc9e000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1a4da86000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1a4d867000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1a4d476000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f1a4e67d000)

--
Sean Gillies

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev