> -----Original Message-----
> From: Stephen Hemminger <step...@networkplumber.org>
> Sent: Saturday, February 8, 2020 4:05 AM
> To: Ananyev, Konstantin <konstantin.anan...@intel.com>
> Cc: dev@dpdk.org
> Subject: BUG BPF examples broken
>
> The BPF examples do not compile on Debian.
>
> The issue is that ret_mbuf_core.h includes rte_atomic which include rte_common
> which pulls in errno.h and bits/errno.h. And then asm/errno.h
>
> /usr/include/linux/errno.h:1:10: fatal error: 'asm/errno.h' file not found
> #include <asm/errno.h>
> ^~~~~~~~~~~~~
> 1 error generated.
>
> asm/errno.h is architecture specific and BPF is an architecture.
AFAIK, installing gcc-multilib package will generate a symlink for
/usr/include/asm:
On my ubuntu box:
ls -ld /usr/include/asm
lrwxrwxrwx 1 root root 20 May 20 2019 /usr/include/asm -> x86_64-linux-gnu/asm
As another possible way: -I/usr/include/x86_64-linux-gnu manually.
clang -O2 -U __GNUC__ -I/usr/include/x86_64-linux-gnu
-I${RTE_SDK}/${RTE_TARGET}/include -target bpf -Wno-int-to-void-pointer-cast -c
t3.c