Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile does not install libbpf libraries into local machine. #407

Open
WildbeestSingh opened this issue Mar 20, 2024 · 8 comments
Open

Comments

@WildbeestSingh
Copy link

WildbeestSingh commented Mar 20, 2024

Problem statement:
The xdp-tools/Makefile does not install libbpf libraries into local machine.

However, it does install the libxdp libraries into the local machine.

Steps:
cd ../../../samples/bpf/xdp-tools/
$ FORCE_SUBDIR_LIBBPF=1 ./configure
$ make
$ sudo make install

I modified the Makefile in ..samples/bpf/ to incorporate the libbpf library from xdp-tools/lib/libbpf/src.

While I successfully built my program using the libbpf library generated under xdp-tools/lib/libbpf/src, I encountered runtime failures due to the program's dependence on the same library during runtime.

Consequently, I manually transferred all the libbpf libraries from the xdp-tools/lib/libbpf/src directory to the local machine, enabling my program to locate them at runtime.

@WildbeestSingh WildbeestSingh changed the title Makefile does not install libbpf libraries into local system. Makefile does not install libbpf libraries into local machine. Mar 20, 2024
@tohojo
Copy link
Member

tohojo commented Mar 20, 2024 via email

@WildbeestSingh
Copy link
Author

So you are suggesting me to build my program against the libbpf from the system and libxdp library from the xdp-tools/lib/libxdp?.

@tohojo
Copy link
Member

tohojo commented Mar 21, 2024 via email

@WildbeestSingh
Copy link
Author

Alright, btw, do you have any references for the samples/bpf/Makefile to use libbpf from xdp-tools/ instead from (kernel-sources)/tools/lib/bpf/ ?.

@tohojo
Copy link
Member

tohojo commented Mar 21, 2024 via email

@WildbeestSingh
Copy link
Author

Basically, I want to use the libbpf and libxdp libraries from the xdp-tools/ in the samples/bpf/Makefile file.

@tohojo
Copy link
Member

tohojo commented Mar 21, 2024 via email

@WildbeestSingh
Copy link
Author

Sorry for the late reply.
I'm not using any files from samples/bpf/ in my xdp application(under samples/bpf/).
As my xdp application requires the libbpf and libxdp libraries and I want to utilize the existing Makefile(samples/bpf/).
But now as I'm using the above two libraries from the xdp-tools/ thus no longer dependent on system/kernel tree libraries.
Therefore, now I can move my application to any other path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants