Skip to content

_torchaudio.so isn't linked with PyTorch's libc10.so properly #4047

@yurivict

Description

@yurivict

🐛 Describe the bug

ldd shows that libc10.so isn't found:

$ ldd /usr/local/lib/python3.11/site-packages/torchaudio/lib/_torchaudio.so
...
        libc10.so => not found (0)
...

libc10.so is provided by pytorch:

$ pkg info -l py311-pytorch | grep c10.so
        /usr/local/lib/python3.11/site-packages/torch/lib/libc10.so

but its path needs to be set during the link of the _torchaudio.so library.
torchaudio needs this flag:
-Wl,-rpath=/usr/local/lib/python3.11/site-packages/torch/lib

Versions

2.8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions