On Tue, Jan 08, 2019 at 06:52:35PM +0000, Ignat Korchagin wrote: > Good day, > > We have started to compile libbpf as part of our Linux compilation > build plan, however libbpf fails to cross-compile for arm64 on Linux > 4.14, but succeeds on Linux 4.19 tree. > > We compile libbpf with the following command: > make -C <whatever>/linux-4.14.91/tools/lib/bpf ARCH=arm64 > CROSS_COMPILE=aarch64-linux-gnu- install > > And get the below output on 4.14 tree: > Auto-detecting system features: > ... libelf: [ on ] > ... bpf: [ on ] > > CC /cfsetup_build/build/arm64/libbpf/libbpf.o > CC /cfsetup_build/build/arm64/libbpf/bpf.o > LD /cfsetup_build/build/arm64/libbpf/libbpf-in.o > ld: /cfsetup_build/build/arm64/libbpf/libbpf.o: Relocations in generic > ELF (EM: 183) > ld: /cfsetup_build/build/arm64/libbpf/libbpf.o: Relocations in generic > ELF (EM: 183) > ld: /cfsetup_build/build/arm64/libbpf/libbpf.o: Relocations in generic > ELF (EM: 183) > ld: /cfsetup_build/build/arm64/libbpf/libbpf.o: Relocations in generic > ELF (EM: 183) > ld: /cfsetup_build/build/arm64/libbpf/libbpf.o: Relocations in generic > ELF (EM: 183) > ld: /cfsetup_build/build/arm64/libbpf/libbpf.o: Relocations in generic > ELF (EM: 183) > /cfsetup_build/build/arm64/libbpf/libbpf.o: error adding symbols: File > in wrong format > /cfsetup_build/build/linux-4.14.91/tools/build/Makefile.build:144: > recipe for target '/cfsetup_build/build/arm64/libbpf/libbpf-in.o' > failed > make[2]: *** [/cfsetup_build/build/arm64/libbpf/libbpf-in.o] Error 1 > Makefile:158: recipe for target > '/cfsetup_build/build/arm64/libbpf/libbpf-in.o' failed > make[1]: *** [/cfsetup_build/build/arm64/libbpf/libbpf-in.o] Error 2 > > Backporting the following commit fixed the build: > 7ed1c1901fe52e6c5828deb155920b44b0adabb1: tools: fix cross-compile var > clobbering > > Can we have it officially applied to the Linux 4.14 tree, please? Now queued up, thanks. But really, you all should be using 4.19 at this point in time :) thanks, greg k-h