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

linux-64 package has undeclaired dependency on libiconv #35

Closed
jjhelmus opened this issue Jun 28, 2019 · 1 comment · Fixed by #36
Closed

linux-64 package has undeclaired dependency on libiconv #35

jjhelmus opened this issue Jun 28, 2019 · 1 comment · Fixed by #36

Comments

@jjhelmus
Copy link
Contributor

The linux-64 libarchive packages have a direct dependency on libiconv that is not declared. This can cause problems if the package is installed with a version of libxml2 that does not require libiconv (such as the packages in defaults) as the library will not be available at run time.

This has the potential to break conda itself if installed in the base environment, conda/conda#8838.

Example:

[root@chi9 build_scripts]# conda create -n test_libarchive -c defaults -c conda-forge conda-forge::libarchive
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /opt/conda/envs/test_libarchive

  added / updated specs:
    - conda-forge::libarchive


The following NEW packages will be INSTALLED:

  bzip2              pkgs/main/linux-64::bzip2-1.0.6-h14c3975_5
  ca-certificates    pkgs/main/linux-64::ca-certificates-2019.5.15-0
  libarchive         conda-forge/linux-64::libarchive-3.3.3-hb44662c_1005
  libgcc-ng          pkgs/main/linux-64::libgcc-ng-9.1.0-hdf63c60_0
  libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-9.1.0-hdf63c60_0
  libxml2            pkgs/main/linux-64::libxml2-2.9.9-hea5a465_1
  lz4-c              conda-forge/linux-64::lz4-c-1.8.3-he1b5a44_1001
  lzo                pkgs/main/linux-64::lzo-2.10-h49e0be7_2
  openssl            pkgs/main/linux-64::openssl-1.1.1c-h7b6447c_1
  xz                 pkgs/main/linux-64::xz-5.2.4-h14c3975_4
  zlib               pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3
  zstd               conda-forge/linux-64::zstd-1.4.0-h3b9ef0a_0


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate test_libarchive
#
# To deactivate an active environment, use
#
#     $ conda deactivate

[root@chi9 build_scripts]# conda activate test_libarchive
(test_libarchive) [root@chi9 build_scripts]# bsdcat --help
bsdcat: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
(test_libarchive) [root@chi9 build_scripts]# readelf -d /opt/conda/envs/test_libarchive/lib/libarchive.so

Dynamic section at offset 0xb7a78 contains 34 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libiconv.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libcrypto.so.1.1]
 0x0000000000000001 (NEEDED)             Shared library: [liblzo2.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [liblzma.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libzstd.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [liblz4.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libbz2.so.1.0]
 0x0000000000000001 (NEEDED)             Shared library: [libz.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libxml2.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000e (SONAME)             Library soname: [libarchive.so.13]
 0x000000000000000f (RPATH)              Library rpath: [$ORIGIN/.]
 0x000000000000000c (INIT)               0x15000
...

The build logs did contain a warning about this missing dependency:

WARNING (libarchive,bin/bsdcat): Needed DSO lib/libiconv.so.2 found in ['libiconv']
WARNING (libarchive,bin/bsdcat): .. but ['libiconv'] not in reqs/run, (i.e. it is overlinking) (likely) or a missing dependency (less likely)
jjhelmus added a commit to jjhelmus/libarchive-feedstock that referenced this issue Jun 28, 2019
Include libiconv in the host requirements on linux.

Alternatively the libiconv implementation included with glibc could be
used but getting ./configure to ignore the stand alone version pulled in
by libxml2 seems difficult.  It seem as if --without-libiconv-prefix could
be used but in tests that argument did not work.

closes conda-forge#35
jjhelmus added a commit to jjhelmus/libarchive-feedstock that referenced this issue Jun 28, 2019
Include libiconv in the host requirements on linux.

Alternatively the libiconv implementation included with glibc could be
used but getting ./configure to ignore the stand alone version pulled in
by libxml2 seems difficult.  It seem as if --without-libiconv-prefix could
be used but in tests that argument did not work.

closes conda-forge#35
@jjhelmus jjhelmus mentioned this issue Jun 28, 2019
5 tasks
@mingwandroid
Copy link
Contributor

Can we make these warnings into errors?

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

Successfully merging a pull request may close this issue.

2 participants