pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lang/rust still looks in /usr/pkg/



> This problem still exists because rust is looking in /usr/pkg/:
>
> running: /usr/pkgsrc/lang/rust/work/rust-bootstrap/bin/cargo build
> --manifest-path
> /usr/pkgsrc/lang/rust/work/rustc-1.47.0-src/src/bootstrap/Cargo.toml
> --frozen
> /usr/pkgsrc/lang/rust/work/rust-bootstrap/bin/cargo: Shared object
> "libcurl.so.4" not found

Yes.  cargo depends on the libcurl.so.4 library from the curl
package, and it's a run-time dependency.  Since curl lives in the
package installation, its library directory isn't part of the
default search path, so it depends on embedding an rpath in the
executable.

I'm guessing you're using a PREFIX other than /usr/pkg?

> What's the proper fix for this?

Frankly, I don't quite know.

I do know that patchelf from pkgsrc can be used to change the
rpath in an elf executable, a'la

patchelf --force-rpath --set-rpath $RPATH $executable

However, that can at best be characterized as a workaround and
not a "proper fix".  I welcome suggestions for how this should be
done properly.

Regards,

- Håvard


Home | Main Index | Thread Index | Old Index