-
Notifications
You must be signed in to change notification settings - Fork 144
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
Comments
If you build against the libbpf library in lib/, libxdp will be
statically linked against that library version, and you won't have to
copy it anywhere.
I would recommend linking against the system libbpf version instead of
messing around with hacking the Makefile to copy the libbpf library.
|
So you are suggesting me to build my program against the libbpf from the system and libxdp library from the xdp-tools/lib/libxdp?. |
Jsingh ***@***.***> writes:
So you are suggesting me to build my program against the libbpf from
the system and libxdp library from the xdp-tools/lib/libxdp?.
Yes, as long as you are also linking libxdp against the system libbpf
(which the configure file should do by default), this will work just fine.
|
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/ ?. |
Jsingh ***@***.***> writes:
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/ ?.
I don't know if that is possible, but in general samples/bpf in the
kernel tree is unmaintained and slowly bitrotting. So I would not
suggest using it, really. What utility from there are you trying to use?
|
Basically, I want to use the libbpf and libxdp libraries from the xdp-tools/ in the samples/bpf/Makefile file. |
Jsingh ***@***.***> writes:
Basically, I want to use the libbpf and libxdp libraries from the
xdp-tools/ in the samples/bpf/Makefile file.
Yes, but why? Which files from samples/bpf do you want to make use of?
|
Sorry for the late reply. |
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.
The text was updated successfully, but these errors were encountered: