conda-forge / libarchive-feedstock

A conda-smithy repository for libarchive.
BSD 3-Clause "New" or "Revised" License
2 stars 26 forks source link

Libarchive is broken for toolchain linux #20

Closed mariusvniekerk closed 5 years ago

mariusvniekerk commented 5 years ago

https://anaconda.org/conda-forge/libarchive/3.3.3/download/linux-64/libarchive-3.3.3-h40d5236_1.tar.bz2

#!/bin/bash -eo pipefail
cd cf-graph
conda-forge-tick --run 4
Traceback (most recent call last):
  File "/opt/conda/bin/conda-forge-tick", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/root/repo/cf-scripts/scripts/conda-forge-tick", line 2, in <module>
    from conda_forge_tick.cli import main
  File "/root/repo/cf-scripts/conda_forge_tick/cli.xsh", line 9, in <module>
    from .auto_tick import main as main3
  File "/root/repo/cf-scripts/conda_forge_tick/auto_tick.xsh", line 23, in <module>
    from .migrators import *
  File "/root/repo/cf-scripts/conda_forge_tick/migrators.xsh", line 14, in <module>
    from conda_smithy.configure_feedstock import get_cfp_file_path
  File "/opt/conda/lib/python3.6/site-packages/conda_smithy/configure_feedstock.py", line 13, in <module>
    import conda_build.api
  File "/opt/conda/lib/python3.6/site-packages/conda_build/api.py", line 22, in <module>
    from conda_build.config import Config, get_or_merge_config, DEFAULT_PREFIX_LENGTH as _prefix_length
  File "/opt/conda/lib/python3.6/site-packages/conda_build/config.py", line 17, in <module>
    from .variants import get_default_variant
  File "/opt/conda/lib/python3.6/site-packages/conda_build/variants.py", line 15, in <module>
    from conda_build.utils import ensure_list, trim_empty_keys, get_logger
  File "/opt/conda/lib/python3.6/site-packages/conda_build/utils.py", line 10, in <module>
    import libarchive
  File "/opt/conda/lib/python3.6/site-packages/libarchive/__init__.py", line 1, in <module>
    from .entry import ArchiveEntry
  File "/opt/conda/lib/python3.6/site-packages/libarchive/entry.py", line 6, in <module>
    from . import ffi
  File "/opt/conda/lib/python3.6/site-packages/libarchive/ffi.py", line 108, in <module>
    errno = ffi('errno', [c_archive_p], c_int)
  File "/opt/conda/lib/python3.6/site-packages/libarchive/ffi.py", line 95, in ffi
    f = getattr(libarchive, 'archive_'+name)
  File "/opt/conda/lib/python3.6/ctypes/__init__.py", line 361, in __getattr__
    func = self.__getitem__(name)
  File "/opt/conda/lib/python3.6/ctypes/__init__.py", line 366, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /opt/conda/bin/python: undefined symbol: archive_errno
Exited with code 1
mariusvniekerk commented 5 years ago

Marked linux64 and osx64 as broken

ocefpaf commented 5 years ago

Argh :-/

I'll pull the package until we figure out what is going on. Thanks for reporting.

ocefpaf commented 5 years ago

Marked linux64 and osx64 as broken

You were faster :smile:

mingwandroid commented 5 years ago

Could it maybe be an incompatibility between python-libarchive-c built against an older libarchive? Were they build in the right order (I believe at build-time python-libarchive-c might detect the symbols it finds in libarchive).

Are we pinning to 3.3.3 anywhere?

ocefpaf commented 5 years ago

That could be it. I don't think those are pinned.

mariusvniekerk commented 5 years ago

seems to be python-libarchive-c doing bad find_library_things

mingwandroid commented 5 years ago

Does your python 3.6 build include https://github.com/conda-forge/python-feedstock/blob/3.6/recipe/0015-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch ?

mariusvniekerk commented 5 years ago

yes

mariusvniekerk commented 5 years ago

Issue seems to be

>>> _findLib_prefix('archive')
'/opt/conda/lib/libarchive.so'
>>> _get_soname(_findLib_prefix('archive'))
None

After that it just returns None

mariusvniekerk commented 5 years ago

in _get_soname we make the assumption that

            objdump = shutil.which('objdump')
            if not objdump:
                # objdump is not available, give up
                return None

In a simple miniconda case this fails there.

mariusvniekerk commented 5 years ago

This is provided by binutils

mingwandroid commented 5 years ago

Why do we need a separate binutils (we already got one)? I can fix this in Python rather than forcing this heavy dependency. Though technically this is an upstream issue with Python itself.

mingwandroid commented 5 years ago

OK, I have something that'll address this in a minimal way, the breakage is my fault. I guess I never run on computers without objdump!

jakirkham commented 5 years ago

Should this be closed? Looks like most of the discussion is about python-libarchive-c, which this is not.

ocefpaf commented 5 years ago

@mariusvniekerk I don't think we care about this anymore, right? Please re-open if I'm mistaken.