libbpf / libbpf-sys

Rust bindings to libbpf from the Linux kernel
https://crates.io/crates/libbpf-sys/
BSD 2-Clause "Simplified" License
200 stars 48 forks source link

Stop abusing LD_LIBRARY_PATH #96

Closed kxxt closed 3 months ago

kxxt commented 3 months ago

LD_LIBRARY_PATH is meant for the dynamic linker to search for shared libraries at runtime. Previously libbpf-sys abused this variable to provide pathes for the linker(invoked by rustc) to find libraries at build time. And this is not documented at all.

This commit proposes to use a dedicated enviroment variable for this purpose and documents it in README.md

Fix #50