Nick Hainke

Results 149 comments of Nick Hainke

``` tats.c: In function 'stats_print': stats.c:110:44: error: format '%f' expects argument of type 'double', but argument 2 has type 'long unsigned int' [-Werror=format=] 110 | printf("Period of %fs ending at...

``` xdp-dump CC xdpdump xdpdump.c: In function 'capture_on_legacy_interface': xdpdump.c:647:43: error: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'time_t' {aka 'long long int'} [-Werror=format=]...

Maybe I know why this happens, OpenWrt uses another stripped libc.

I first try to compile it with glibc. ;)

https://github.com/xdp-project/xdp-tools/pull/75

Now I have the same issues in libbpf... ^^ ``` /home/nick/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-8.4.0_musl_eabi/lib/gcc/arm-openwrt-linux-muslgnueabi/8.4.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld: ../lib/libbpf/src/libbpf.a(libbpf.o): in function `bpf_program__relocate': libbpf.c:(.text+0x2110): undefined reference to `reallocarray' /home/nick/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-8.4.0_musl_eabi/lib/gcc/arm-openwrt-linux-muslgnueabi/8.4.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld: ../lib/libbpf/src/libbpf.a(libbpf.o): in function `bpf_core_reloc_field': libbpf.c:(.text+0x4964): undefined reference to `reallocarray'...

There is already a [libbpf package](https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/network/utils/bpftools/Makefile;h=e760d50c5eb573bcd9fbb4219297f59b2c0180d7;hb=HEAD#l74). ``` libbpf support: system v0.0.9 ``` But if I want to use it, I get the following error. :/ ``` touch /home/nick/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/xdp-tools-2020.11.24/.configured_68b329da9893e34099c7d8ad5cb9c940 xdp-dispatcher.c:5:10: fatal...

Yes it installs it under: `/home/nick/openwrt/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/usr/include/bpf`

Just adding `echo "CFLAGS += -I/home/nick/openwrt/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/usr/include" >$CONFIG` is fixing for now... But now I have other issues.

Now I'm stucked with a linker issues: ``` /home/nick/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-8.4.0_musl_eabi/lib/gcc/arm-openwrt-linux-muslgnueabi/8.4.0/../../../../arm-openwrt-linux-muslgnueabi/bin/ld: libxdp.c:(.text+0x2594): undefined reference to `bpf_map_lookup_elem' ``` `echo "LDFLAGS += -L/home/nick/openwrt/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/usr/lib" >$CONFIG` does not help.