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

Fix include path of libxdp for each arch #408

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

ami-GS
Copy link
Contributor

@ami-GS ami-GS commented Mar 23, 2024

Fix of #4
Doesn't need to install gcc-multilib anymore nor set sympath as ln -s /usr/include/x86_64-linux-gnu/asm /usr/include/asm

@ami-GS ami-GS force-pushed the dev/daiki/fix_arch_include_path branch from 58643f3 to 1135600 Compare March 23, 2024 00:23
@tohojo
Copy link
Member

tohojo commented Apr 2, 2024

Including arch-specific headers in a BPF program should not be needed; what error are you seeing that this fixes, exactly?

@ami-GS
Copy link
Contributor Author

ami-GS commented Apr 5, 2024

This is the error. This doesn't happen with gcc-multilib or my change

root@861ec1d9b02c:~/msquic/submodules/xdp-tools# make

lib

libbpf
CC libbpf/src/libbpf.a
INSTALL libbpf/src/libbpf.a

libxdp
CC staticobjs/libxdp.o
CC staticobjs/xsk.o
M4 xdp-dispatcher.c
CLANG xdp-dispatcher.o
In file included from xdp-dispatcher.c:3:
In file included from ../../headers/linux/bpf.h:11:
/usr/include/linux/types.h:5:10: fatal error: 'asm/types.h' file not found
#include <asm/types.h>
^~~~~~~~~~~~~
1 error generated.
make[2]: *** [Makefile:137: xdp-dispatcher.o] Error 1
make[1]: *** [Makefile:20: libxdp] Error 2
make: *** [Makefile:25: lib] Error 2

image

@tohojo
Copy link
Member

tohojo commented Apr 12, 2024

Hmm, okay, seems we do indeed use the arch includes for the uXX definitions. I wonder if that works correctly when compiling on a 32-bit arch? Anyway, I don't suppose there's anything wrong with fixing it this way, then :)

@tohojo tohojo merged commit a4d84ca into xdp-project:master Apr 12, 2024
5 checks passed
shifty91 added a commit to Linutronix/RTC-Testbench that referenced this pull request Feb 10, 2025
Fix eBPF include path for all arches by using corresponding cmake variable.

That works for all multi arch systems.

Link: xdp-project/xdp-tools#4
Link: xdp-project/xdp-tools#408
Signed-off-by: Kurt Kanzenbach <[email protected]>
Reviewed-by: Sebastian Andrzej Siewior <[email protected]>
iranzo pushed a commit to iranzo/TSN-Testbench that referenced this pull request Mar 3, 2025
Fix eBPF include path for all arches by using corresponding cmake variable.

That works for all multi arch systems.

Link: xdp-project/xdp-tools#4
Link: xdp-project/xdp-tools#408
Signed-off-by: Kurt Kanzenbach <[email protected]>
Reviewed-by: Sebastian Andrzej Siewior <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants