Fix broken novendor feature#47
Conversation
jirutka
commented
Oct 14, 2022
|
Hmm. This feature was added in this commit by @danobi, and apparently broken by me in this commit when I removed I have a few questions:
|
When
Statically.
The former when
This would require more changes than just adding |
Right, I get how it works without
Oh right, maybe that's the answer to my confusion: this feature never worked to begin with?
Well, guess if this feature was always broken, then we weren't linking at all :)
To clarify: do we care about supporting the case where the system-provided But, if we don't care about the case where there's a static system-provided |
$ cargo test --features novendor
= note: /usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: target/debug/deps/tests-81d77a8d8e24cc4f.v49whvrqu4l5awr.rcgu.o: in function `tests::tests::test':
tests/tests.rs:19: undefined reference to `libbpf_set_print'
collect2: error: ld returned 1 exit status
= help: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the `-l` flag to specify native libraries to link
= note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
I think so.
Ah, I understand what you mean now, I overlooked |
This would actually require more changes. And I would start by rewriting it to use pkg-config. However, to be honest, I’ve already spent too much time on this. |
|
I think it worked at one point. pkgs.org reports a novendor version being shipped in fedora: https://pkgs.org/search/?q=libbpf-sys I also seem to recall dynamic linking with libbpf working at some point (at least when I developed the patch). |