-
Notifications
You must be signed in to change notification settings - Fork 138
cargo install cargo-bpf fails at bpf-sys dependency #285
Comments
@taladar I'm trying to reproduce this problem but I am encountered another problem in gentoo.. I made a docker image from FROM gentoo/stage3
RUN emerge --sync \
&& emerge -v sys-devel/llvm \
sys-devel/clang \
dev-libs/libelf
RUN curl https://sh.rustup.rs -sSf > rustup.sh \
&& sh rustup.sh -y \
--default-toolchain stable \
--profile minimal \
--no-modify-path \
&& rm -f rustup.sh \
&& rustup component add rustfmt \
&& rustup --version \
&& cargo -vV \
&& rustc -vV And I executed
|
I got that one when I tried to compile the source from the repository. I haven't solved it yet, no. It looks to me like it is missing some linker option to include the LLVM library or possibly the directory where that is installed. Gentoo installs LLVM to version-specific directories so it might be necessary to include the llvm-config provided --ldflags? |
Thanks, Could you try installing cargo-bpf using the source of fix-gentoo branch? cargo install --path ./cargo-bpf cargo-bpf |
@taladar |
Gentoo doesn't really use defaults since you can decide what to use at install time yourself. Personally I just use a kernel configured and compiled manually from the kernel git repositories (cloned to /usr/src/linux if paths are relevant). |
Seems to work fine with other BPF stuff like the bcc and bpftrace tools. |
I am trying to install cargo-bpf (on Gentoo) but it seems to fail when trying to install the bpf-sys 2.3.0 dependency because it can not find a libbpf.pc file in the bundled source code
The contents of the ~/.cargo/registry/src/github.com-1ecc6299db9ec823/bpf-sys-2.3.0 directory is
The libbpf.pc file is mentioned in the Makefile and if I just run Make in that directory it is generated (among other files) without errors.
The text was updated successfully, but these errors were encountered: