Skip to content

libtorch_cpu.dylib not found #487

@robinpaul85

Description

@robinpaul85

I am trying to compile the sentence embedding example locally. It compiles, but the resulting binary gives the error:

dyld[32110]: Library not loaded: @rpath/libtorch_cpu.dylib Referenced from: <64A42FED-1ACF-3448-B0A1-FC382B5454DE> /Users/rpaul1/Documents/test/rust_bert2/target/release/rust_bert2 Reason: no LC_RPATH's found

I have passed the path of the dylib binary but it still does not work. export INSTALL_RPATH=rust_bert2/target/release/build/torch-sys-87156a8d82f3a58d/out/libtorch/libtorch/lib, export BUILD_RPATH=rust_bert2/target/release/build/torch-sys-87156a8d82f3a58d/out/libtorch/libtorch and export LC_RPATH=${BUILD_RPATH}/lib:$LC_RPATH. I tried defining the variable LC_RPATH but it still does not work.

Can somebody suggest how to pass the path of the dylib to the rust binary?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions