Closed akrherz closed 2 years ago
Looks like libnsl
should be in glibc
and that is expected to be in the user system. However, I just found: https://github.com/AppImage/pkg2appimage/issues/336
We need an strategy for this. Thanks for reporting it.
Ping? This is an issue on CentOS 8. Just built the environment with all the latest packages last week.
Appears to still be the case for me, fiona==1.8.13 py38h033e0f6_1
ldd ./envs/prod/lib/python3.8/site-packages/fiona/ogrext.cpython-38-x86_64-linux-gnu.so | grep nsl
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007fdfed6a2000)
On CentOS 8, looks like a sufficient work-around is to sudo yum install libnsl
, which will install the legacy compatibility library.
Just to denote that this issue still appears to be valid fiona==1.8.18 py38h37fbd03_0
$ ldd ./envs/prod/lib/python3.8/site-packages/fiona/ogrext.cpython-38-x86_64-linux-gnu.so | grep nsl
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007fc55c73a000)
Any temporary solution for this?
Any temporary solution for this?
If you are on RHEL/Centos8, dnf install libnsl
Also, libnsl
was just added as a conda package. So you can conda install -c conda-forge libnsl
now too. I'm on the fence if we should make it a fiona/rasterio dependency b/c it sounds like an overkill.
Also,
libnsl
was just added as a conda package. So you canconda install -c conda-forge libnsl
now too. I'm on the fence if we should make it a fiona/rasterio dependency b/c it sounds like an overkill.
I did try that, and it didn't work, not sure why:
(fiona) [mgarcia@xps ibis-omniscidb]$ conda install -c conda-forge libnsl
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /home/mgarcia/miniconda3/envs/fiona
added / updated specs:
- libnsl
The following NEW packages will be INSTALLED:
libnsl conda-forge/linux-64::libnsl-2.0.0-h7f98852_0
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(fiona) [mgarcia@xps]$ python
Python 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 19:20:46)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import fiona
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/mgarcia/miniconda3/envs/fiona/lib/python3.9/site-packages/fiona/__init__.py", line 86, in <module>
from fiona.collection import BytesCollection, Collection
File "/home/mgarcia/miniconda3/envs/fiona/lib/python3.9/site-packages/fiona/collection.py", line 11, in <module>
from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
ImportError: libnsl.so.1: cannot open shared object file: No such file or directory
fiona would need to be "built against" conda's version of libnsl. By default, the libraries installed in conda are not usually found by the OS for dynamic linking (this is actually a good thing and helps segregate the conda environment from the rest of the system).
On Fri, Oct 1, 2021 at 3:44 PM Marc Garcia @.***> wrote:
Also, libnsl was just added as a conda package. So you can conda install -c conda-forge libnsl now too. I'm on the fence if we should make it a fiona/rasterio dependency b/c it sounds like an overkill.
I did try that, and it didn't work, not sure why:
(fiona) @.*** ibis-omniscidb]$ conda install -c conda-forge libnsl Collecting package metadata (current_repodata.json): done Solving environment: done
Package Plan
environment location: /home/mgarcia/miniconda3/envs/fiona
added / updated specs:
- libnsl
The following NEW packages will be INSTALLED:
libnsl conda-forge/linux-64::libnsl-2.0.0-h7f98852_0
Proceed ([y]/n)? y
Preparing transaction: done Verifying transaction: done Executing transaction: done (fiona) @.***$ python Python 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 19:20:46) [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" for more information.
import fiona Traceback (most recent call last): File "
", line 1, in File "/home/mgarcia/miniconda3/envs/fiona/lib/python3.9/site-packages/fiona/init.py", line 86, in from fiona.collection import BytesCollection, Collection File "/home/mgarcia/miniconda3/envs/fiona/lib/python3.9/site-packages/fiona/collection.py", line 11, in from fiona.ogrext import Iterator, ItemsIterator, KeysIterator ImportError: libnsl.so.1: cannot open shared object file: No such file or directory — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/conda-forge/fiona-feedstock/issues/138#issuecomment-932504595, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACHF6APQA4YOCTIO3BJ2ETUEYFSVANCNFSM4ITUWYLA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
On Fedora, there is this fiona package, which has no libnsl.so.1
dependency. Still, once installed, you can import fiona
without issue with the system python3... but inside a conda environment it doesn't work. I'm a bit confused.
I would be curious to know what the Fedora maintainers did to completely cut libnsl out of the dependency tree in many packages. For a long time, libnsl was just simply a part of the mainline glibc, so many packages just linked it just because it was there and available. I don't think fiona and other conda packages explicitly depended on libnsl, but rather depended upon another library that had a dependency (whether it was needed or not) to it.
On Fri, Oct 1, 2021 at 4:09 PM Philippe Miron, Ph. D. < @.***> wrote:
On Fedora, there is this fiona package https://fedora.pkgs.org/34/fedora-x86_64/python3-fiona-1.8.13-5.fc33.x86_64.rpm.html, which has no libnsl.so.1 dependency. Still, once installed, you can import fiona without issue with the system python3... but inside a conda environment it doesn't work. I'm a bit confused.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/conda-forge/fiona-feedstock/issues/138#issuecomment-932518837, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACHF6F2VNKXE6HHHIKP3BDUEYIQLANCNFSM4ITUWYLA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
@ocefpaf, since python will bring in libnsl
anyways, it's good if fiona
added libnsl
to host
dependencies so that fiona links to libnsl.so.2
from the conda package instead of the glibc one.
I cannot reproduce this issue in a fedora docker with a newly created environment pulling in the most recent python build. @datapythonista @akrherz can you still reproduce it with any of the most recent conda-forge python builds?
can you still reproduce it with any of the most recent conda-forge python builds?
My centos 8 stream linux64 env has 1.8.20=py38hbb147eb_1
and
$ ldd ./lib/python3.8/site-packages/fiona/ogrext.cpython-38-x86_64-linux-gnu.so| grep nsl
libnsl.so.3 => /opt/miniconda3/envs/prod/./lib/python3.8/site-packages/fiona/../../../././libnsl.so.3 (0x00007f6f42251000)
On Fedora, there is this fiona package, which has no
libnsl.so.1
dependency. Still, once installed, you canimport fiona
without issue with the system python3... but inside a conda environment it doesn't work. I'm a bit confused.
On Fedora 33 python
itself depends on libnsl
. Since 2021-10-12 conda-forge python
also depends on libnsl
. AFAIK this now works in conda-forge exactly as it does in Fedora. @philippemiron can you still reproduce any problem with the most recent conda-forge python builds?
can you still reproduce it with any of the most recent conda-forge python builds?
My centos 8 stream linux64 env has
1.8.20=py38hbb147eb_1
and$ ldd ./lib/python3.8/site-packages/fiona/ogrext.cpython-38-x86_64-linux-gnu.so| grep nsl libnsl.so.3 => /opt/miniconda3/envs/prod/./lib/python3.8/site-packages/fiona/../../../././libnsl.so.3 (0x00007f6f42251000)
So all good right?
So all good right?
For me yes and oh my, I see that I am the reporter here :)
@ocefpaf, since python will bring in
libnsl
anyways, it's good iffiona
addedlibnsl
tohost
dependencies so that fiona links tolibnsl.so.2
from the conda package instead of the glibc one.
That should happen probably in gdal but I guess we are covered now, right?
I believe there is no direct gdal dependency on nsl; gdal depends on xerces-c which depends on nsl. We have already built xerces-c against conda-forge libnsl in https://github.com/conda-forge/xerces-c-feedstock/pull/30 so I do not believe anything further is needed.
Hi @izahn and everyone, I just reinstalled (and it did install libsnl this time), so everything is now working as expected on my side.
Issue: ldd inspecting ogrext.cpython-36m-x86_64-linux-gnu.so shows a libnsl.so.1 requirement not provided by conda-forge?
I am unsure if this is a valid problem or not, but figured I would post it. I have found that fiona needs the
libnsl
RPM installed on RHEL8 to properly run. It is unclear to me if conda-forge should be providing this library or some other infrastructure in conda-forge should see this missing library:Thank you, as always, for the help and wonderful work on this project.
Environment (
conda list
):Details about
conda
and system (conda info
):