Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lxml should require specific icu version #10

Closed
QuLogic opened this issue Feb 12, 2017 · 2 comments
Closed

lxml should require specific icu version #10

QuLogic opened this issue Feb 12, 2017 · 2 comments

Comments

@QuLogic
Copy link
Member

QuLogic commented Feb 12, 2017

The lxml package does not appear to depend on any specific version of icu. It is required for both the shared library extensions, and it needs to follow the same soversion.

For example, if creating an environment with lxml and icu 56, lxml fails to work:

$ conda create -n lxml-test python=3 lxml icu=56
Fetching package metadata ...........
Solving package specifications: .

Package plan for installation in environment .../conda/envs/lxml-test:

The following NEW packages will be INSTALLED:

    ca-certificates: 2017.1.23-0      conda-forge
    certifi:         2017.1.23-py36_0 conda-forge
    icu:             56.1-4           conda-forge
    libiconv:        1.14-4           conda-forge
    libxml2:         2.9.4-3          conda-forge
    libxslt:         1.1.29-3         conda-forge
    lxml:            3.7.2-py36_1     conda-forge
    ncurses:         5.9-10           conda-forge
    openssl:         1.0.2h-3         conda-forge
    pip:             9.0.1-py36_0     conda-forge
    python:          3.6.0-2          conda-forge
    readline:        6.2-0            conda-forge
    setuptools:      33.1.0-py36_0    conda-forge
    sqlite:          3.13.0-1         conda-forge
    tk:              8.5.19-1         conda-forge
    wheel:           0.29.0-py36_0    conda-forge
    xz:              5.2.2-0          conda-forge
    zlib:            1.2.11-0         conda-forge

...

$ activate lxml-test

$ python
Python 3.6.0 | packaged by conda-forge | (default, Feb  9 2017, 14:36:55) 
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from lxml import etree
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: libicui18n.so.58: cannot open shared object file: No such file or directory

$ cd .../conda/envs/lxml-test/lib/python3.6/site-packages/lxml

$ ldd etree.cpython-36m-x86_64-linux-gnu.so 
	linux-vdso.so.1 (0x00007ffcb1573000)
	libxslt.so.1 => .../conda/envs/lxml-test/lib/python3.6/site-packages/lxml/./../../../libxslt.so.1 (0x00007f9bd3029000)
	libexslt.so.0 => .../conda/envs/lxml-test/lib/python3.6/site-packages/lxml/./../../../libexslt.so.0 (0x00007f9bd2e16000)
	libxml2.so.2 => .../conda/envs/lxml-test/lib/python3.6/site-packages/lxml/./../../../libxml2.so.2 (0x00007f9bd2aae000)
	librt.so.1 => /lib64/librt.so.1 (0x00007f9bd287f000)
	libz.so.1 => .../conda/envs/lxml-test/lib/python3.6/site-packages/lxml/./../../../libz.so.1 (0x00007f9bd2660000)
	libm.so.6 => /lib64/libm.so.6 (0x00007f9bd2357000)
	libpython3.6m.so.1.0 => .../conda/envs/lxml-test/lib/python3.6/site-packages/lxml/./../../../libpython3.6m.so.1.0 (0x00007f9bd1e20000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f9bd1c02000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f9bd183c000)
	liblzma.so.5 => .../conda/envs/lxml-test/lib/python3.6/site-packages/lxml/./../../.././liblzma.so.5 (0x00007f9bd1617000)
	libiconv.so.2 => .../conda/envs/lxml-test/lib/python3.6/site-packages/lxml/./../../.././libiconv.so.2 (0x00007f9bd1327000)
	libicui18n.so.58 => not found
	libicuuc.so.58 => not found
	libicudata.so.58 => not found
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f9bd1123000)
	libicui18n.so.58 => not found
	libicuuc.so.58 => not found
	libicudata.so.58 => not found
	libicui18n.so.56 => .../conda/envs/lxml-test/lib/python3.6/site-packages/lxml/./../../.././libicui18n.so.56 (0x00007f9bd0c25000)
	libicuuc.so.56 => .../conda/envs/lxml-test/lib/python3.6/site-packages/lxml/./../../.././libicuuc.so.56 (0x00007f9bd0840000)
	libicudata.so.56 => .../conda/envs/lxml-test/lib/python3.6/site-packages/lxml/./../../.././libicudata.so.56 (0x00007f9bcee5d000)
	/lib64/ld-linux-x86-64.so.2 (0x00005557139fc000)
	libutil.so.1 => /lib64/libutil.so.1 (0x00007f9bcec58000)
	libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f9bce8d0000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f9bce6b9000)

$ ldd objectify.cpython-36m-x86_64-linux-gnu.so 
	linux-vdso.so.1 (0x00007ffd51363000)
	libxslt.so.1 => .../conda/envs/lxml-test/lib/python3.6/site-packages/lxml/./../../../libxslt.so.1 (0x00007f368d490000)
	libexslt.so.0 => .../conda/envs/lxml-test/lib/python3.6/site-packages/lxml/./../../../libexslt.so.0 (0x00007f368d27d000)
	libxml2.so.2 => .../conda/envs/lxml-test/lib/python3.6/site-packages/lxml/./../../../libxml2.so.2 (0x00007f368cf15000)
	librt.so.1 => /lib64/librt.so.1 (0x00007f368cce6000)
	libz.so.1 => .../conda/envs/lxml-test/lib/python3.6/site-packages/lxml/./../../../libz.so.1 (0x00007f368cac7000)
	libm.so.6 => /lib64/libm.so.6 (0x00007f368c7be000)
	libpython3.6m.so.1.0 => .../conda/envs/lxml-test/lib/python3.6/site-packages/lxml/./../../../libpython3.6m.so.1.0 (0x00007f368c287000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f368c069000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f368bca3000)
	liblzma.so.5 => .../conda/envs/lxml-test/lib/python3.6/site-packages/lxml/./../../.././liblzma.so.5 (0x00007f368ba7e000)
	libiconv.so.2 => .../conda/envs/lxml-test/lib/python3.6/site-packages/lxml/./../../.././libiconv.so.2 (0x00007f368b78e000)
	libicui18n.so.58 => not found
	libicuuc.so.58 => not found
	libicudata.so.58 => not found
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f368b58a000)
	libicui18n.so.58 => not found
	libicuuc.so.58 => not found
	libicudata.so.58 => not found
	libicui18n.so.56 => .../conda/envs/lxml-test/lib/python3.6/site-packages/lxml/./../../.././libicui18n.so.56 (0x00007f368b08c000)
	libicuuc.so.56 => .../conda/envs/lxml-test/lib/python3.6/site-packages/lxml/./../../.././libicuuc.so.56 (0x00007f368aca7000)
	libicudata.so.56 => .../conda/envs/lxml-test/lib/python3.6/site-packages/lxml/./../../.././libicudata.so.56 (0x00007f36892c4000)
	/lib64/ld-linux-x86-64.so.2 (0x000055fb9d8f7000)
	libutil.so.1 => /lib64/libutil.so.1 (0x00007f36890bf000)
	libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f3688d37000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f3688b20000)

Of course, this can be fixed by updating icu to 58, but the icu 56 comes from some other package, though I've not figured out which one yet. If lxml had had a dependency on icu, conda would have notified me of the conflict or downgraded something to make it work (I'd hope.)

@QuLogic
Copy link
Member Author

QuLogic commented Feb 12, 2017

Wait, I didn't look at that ldd output closely enough; those extensions are linked to both libicui18n.so.56 and libicui18n.so.58, so something weird is definitely going on here.

@QuLogic
Copy link
Member Author

QuLogic commented Feb 12, 2017

OK, it turns out that ldd led me astray as it seems to be recursive. Using objdump -p etree.cpython-36m-x86_64-linux-gnu.so | grep NEEDED, I can see that this does not directly depend on icu, and it's actually libxslt that is missing the dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant