oracle / bpftune

bpftune uses BPF to auto-tune Linux systems
Other
659 stars 56 forks source link

Parallel make errors #33

Closed srcshelton closed 1 year ago

srcshelton commented 1 year ago

When running make with multiple jobs, the build process reliably fails as follows:

$ make -j6 
cd src; make
cd docs; make man
make[1]: Entering directory '/var/tmp/portage/sys-apps/bpftune-0.1.3_p20230712/work/bpftune-0825b48a7f600b8105c0ac7767641ea2c7c0a458/src'
make[1]: Entering directory '/var/tmp/portage/sys-apps/bpftune-0.1.3_p20230712/work/bpftune-0825b48a7f600b8105c0ac7767641ea2c7c0a458/docs'
( cat bpftune.rst ; printf "%b"  "\nSEE ALSO\n========\n\t**bpf**\ (2), **bpftune**\ (8),\n" ) | rst2man.py --verbose > bpftune.8
( cat bpftune-sysctl.rst ; printf "%b"  "\nSEE ALSO\n========\n\t**bpf**\ (2), **bpftune**\ (8),\n" ) | rst2man.py --verbose > bpftune-sysctl.8
( cat bpftune-tcp-cong.rst ; printf "%b"  "\nSEE ALSO\n========\n\t**bpf**\ (2), **bpftune**\ (8),\n" ) | rst2man.py --verbose > bpftune-tcp-cong.8
( cat bpftune-neigh.rst ; printf "%b"  "\nSEE ALSO\n========\n\t**bpf**\ (2), **bpftune**\ (8),\n" ) | rst2man.py --verbose > bpftune-neigh.8
( cat bpftune-tcp-buffer.rst ; printf "%b"  "\nSEE ALSO\n========\n\t**bpf**\ (2), **bpftune**\ (8),\n" ) | rst2man.py --verbose > bpftune-tcp-buffer.8
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -O2 -target bpf                 \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c tcp_buffer_tuner.bpf.c -o tcp_buffer_tuner.bpf.o;
( cat bpftune-netns.rst ; printf "%b"  "\nSEE ALSO\n========\n\t**bpf**\ (2), **bpftune**\ (8),\n" ) | rst2man.py --verbose > bpftune-netns.8
( cat bpftune-net-buffer.rst ; printf "%b"  "\nSEE ALSO\n========\n\t**bpf**\ (2), **bpftune**\ (8),\n" ) | rst2man.py --verbose > bpftune-net-buffer.8
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -O2 -target bpf                 \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c route_table_tuner.bpf.c -o route_table_tuner.bpf.o;
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -O2 -target bpf                 \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c neigh_table_tuner.bpf.c -o neigh_table_tuner.bpf.o;
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -O2 -target bpf                 \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c sysctl_tuner.bpf.c -o sysctl_tuner.bpf.o;
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -O2 -target bpf                 \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c tcp_cong_tuner.bpf.c -o tcp_cong_tuner.bpf.o;
make[1]: Leaving directory '/var/tmp/portage/sys-apps/bpftune-0.1.3_p20230712/work/bpftune-0825b48a7f600b8105c0ac7767641ea2c7c0a458/docs'
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -O2 -target bpf                 \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c netns_tuner.bpf.c -o netns_tuner.bpf.o;
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -DBPFTUNE_LEGACY -O2 -target bpf \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c route_table_tuner.bpf.c \
        -o route_table_tuner.bpf.legacy.o
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -DBPFTUNE_LEGACY -O2 -target bpf \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c tcp_cong_tuner.bpf.c \
        -o tcp_cong_tuner.bpf.legacy.o
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -DBPFTUNE_LEGACY -O2 -target bpf \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c neigh_table_tuner.bpf.c \
        -o neigh_table_tuner.bpf.legacy.o
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -DBPFTUNE_LEGACY -O2 -target bpf \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c sysctl_tuner.bpf.c \
        -o sysctl_tuner.bpf.legacy.o
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -DBPFTUNE_LEGACY -O2 -target bpf \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c tcp_buffer_tuner.bpf.c \
        -o tcp_buffer_tuner.bpf.legacy.o
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -DBPFTUNE_LEGACY -O2 -target bpf \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c netns_tuner.bpf.c \
        -o netns_tuner.bpf.legacy.o
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -O2 -target bpf                 \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c net_buffer_tuner.bpf.c -o net_buffer_tuner.bpf.o;
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -O2 -target bpf                 \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c probe.bpf.c -o probe.bpf.o;
make[1]: *** No rule to make target 'probe.skel.legacy.h', needed by 'libbpftune.o'.  Stop.
make[1]: *** Waiting for unfinished jobs....
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -DBPFTUNE_LEGACY -O2 -target bpf \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c net_buffer_tuner.bpf.c \
        -o net_buffer_tuner.bpf.legacy.o
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -DBPFTUNE_LEGACY -O2 -target bpf \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c probe.bpf.c \
        -o probe.bpf.legacy.o
make[1]: Leaving directory '/var/tmp/portage/sys-apps/bpftune-0.1.3_p20230712/work/bpftune-0825b48a7f600b8105c0ac7767641ea2c7c0a458/src'
make: *** [Makefile:41: srcdir] Error 2

vs.:

$ make -j1 
cd src; make
make[1]: Entering directory '/var/tmp/portage/sys-apps/bpftune-0.1.3_p20230712/work/bpftune-0825b48a7f600b8105c0ac7767641ea2c7c0a458/src'
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -O2 -target bpf                 \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c tcp_buffer_tuner.bpf.c -o tcp_buffer_tuner.bpf.o;
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -DBPFTUNE_LEGACY -O2 -target bpf \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c tcp_buffer_tuner.bpf.c \
        -o tcp_buffer_tuner.bpf.legacy.o
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -O2 -target bpf                 \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c route_table_tuner.bpf.c -o route_table_tuner.bpf.o;
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -DBPFTUNE_LEGACY -O2 -target bpf \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c route_table_tuner.bpf.c \
        -o route_table_tuner.bpf.legacy.o
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -O2 -target bpf                 \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c neigh_table_tuner.bpf.c -o neigh_table_tuner.bpf.o;
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -DBPFTUNE_LEGACY -O2 -target bpf \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c neigh_table_tuner.bpf.c \
        -o neigh_table_tuner.bpf.legacy.o
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -O2 -target bpf                 \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c sysctl_tuner.bpf.c -o sysctl_tuner.bpf.o;
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -DBPFTUNE_LEGACY -O2 -target bpf \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c sysctl_tuner.bpf.c \
        -o sysctl_tuner.bpf.legacy.o
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -O2 -target bpf                 \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c tcp_cong_tuner.bpf.c -o tcp_cong_tuner.bpf.o;
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -DBPFTUNE_LEGACY -O2 -target bpf \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c tcp_cong_tuner.bpf.c \
        -o tcp_cong_tuner.bpf.legacy.o
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -O2 -target bpf                 \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c netns_tuner.bpf.c -o netns_tuner.bpf.o;
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -DBPFTUNE_LEGACY -O2 -target bpf \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c netns_tuner.bpf.c \
        -o netns_tuner.bpf.legacy.o
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -O2 -target bpf                 \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c net_buffer_tuner.bpf.c -o net_buffer_tuner.bpf.o;
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -DBPFTUNE_LEGACY -O2 -target bpf \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c net_buffer_tuner.bpf.c \
        -o net_buffer_tuner.bpf.legacy.o
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -O2 -target bpf                 \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c probe.bpf.c -o probe.bpf.o;
clang -g -fno-stack-protector -Wall -D__TARGET_ARCH_x86 -DBPFTUNE_LEGACY -O2 -target bpf \
        -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi -c probe.bpf.c \
        -o probe.bpf.legacy.o
bpftool gen skeleton tcp_buffer_tuner.bpf.o > tcp_buffer_tuner.skel.h ;\
bpftool gen skeleton tcp_buffer_tuner.bpf.legacy.o > tcp_buffer_tuner.skel.legacy.h
bpftool gen skeleton route_table_tuner.bpf.o > route_table_tuner.skel.h ;\
bpftool gen skeleton route_table_tuner.bpf.legacy.o > route_table_tuner.skel.legacy.h
bpftool gen skeleton neigh_table_tuner.bpf.o > neigh_table_tuner.skel.h ;\
bpftool gen skeleton neigh_table_tuner.bpf.legacy.o > neigh_table_tuner.skel.legacy.h
bpftool gen skeleton sysctl_tuner.bpf.o > sysctl_tuner.skel.h ;\
bpftool gen skeleton sysctl_tuner.bpf.legacy.o > sysctl_tuner.skel.legacy.h
bpftool gen skeleton tcp_cong_tuner.bpf.o > tcp_cong_tuner.skel.h ;\
bpftool gen skeleton tcp_cong_tuner.bpf.legacy.o > tcp_cong_tuner.skel.legacy.h
bpftool gen skeleton netns_tuner.bpf.o > netns_tuner.skel.h ;\
bpftool gen skeleton netns_tuner.bpf.legacy.o > netns_tuner.skel.legacy.h
bpftool gen skeleton net_buffer_tuner.bpf.o > net_buffer_tuner.skel.h ;\
bpftool gen skeleton net_buffer_tuner.bpf.legacy.o > net_buffer_tuner.skel.legacy.h
bpftool gen skeleton probe.bpf.o > probe.skel.h ;\
bpftool gen skeleton probe.bpf.legacy.o > probe.skel.legacy.h
clang --analyze -I../include -I/usr/include -I/usr/include/libnl3 -I../include/uapi libbpftune.c bpftune.c tcp_buffer_tuner.c route_table_tuner.c neigh_table_tuner.c sysctl_tuner.c tcp_cong_tuner.c netns_tuner.c net_buffer_tuner.c
...
alan-maguire commented 1 year ago

thanks for reporting! #34 resolves this for me; can you check if it fixes the issue for you? thanks!

srcshelton commented 1 year ago

Thanks! Checking now...

srcshelton commented 1 year ago

… sorry for the delay - that works, many thanks ☺️