Skip to content

Linux Python bindings can load foreign libHalide.so. #8866

@allemangD

Description

@allemangD

See #8864 for context and details.

Minimal example: Create an invalid libHalide.so somewhere on the library path, and observe that any Halide Python bindings fail to load:

$ echo '' > ~/.local/lib/libHalide.so
$ pip install halide
$ python -c 'import halide'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import halide
  File ".venv/lib/python3.13/site-packages/halide/__init__.py", line 15, in <module>
    from .halide_ import *  # noqa: E402, F403
    ^^^^^^^^^^^^^^^^^^^^^^
ImportError: ~/.local/lib/libHalide.so: file too short

Metadata

Metadata

Assignees

Labels

pythonIssues related to Halide/Python interop

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions