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?
Regards, Ignat
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
Thank you!
But really, you all should be using 4.19 at this point in time :)
We're trying, but it crashes for us in netfilter code :(. Currently we're applying a series of patches from the net-dev tree to the nf_conncount code to see if it fixes the issues. Will definitely make sure they go to stable, when confirming the issue is fixed.
Regards, Ignat
On Thu, Jan 10, 2019 at 2:01 PM Greg KH gregkh@linuxfoundation.org wrote:
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
We've also seen issues with Mellanox hardware on 4.19, like this one:
* https://www.mail-archive.com/netdev@vger.kernel.org/msg253346.html
On Thu, Jan 10, 2019 at 6:12 AM Ignat Korchagin ignat@cloudflare.com wrote:
Thank you!
But really, you all should be using 4.19 at this point in time :)
We're trying, but it crashes for us in netfilter code :(. Currently we're applying a series of patches from the net-dev tree to the nf_conncount code to see if it fixes the issues. Will definitely make sure they go to stable, when confirming the issue is fixed.
Regards, Ignat
On Thu, Jan 10, 2019 at 2:01 PM Greg KH gregkh@linuxfoundation.org wrote:
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
On Thu, Jan 10, 2019 at 08:03:53AM -0800, Ivan Babrou wrote:
We've also seen issues with Mellanox hardware on 4.19, like this one:
Ugh, ok, thanks for testing and letting people know about this type of thing. Sorry it's causing problems. I wonder why the "normal" netfilter testing didn't catch your issues, that might be good to add to the test suite after it's all done...
thanks,
greg k-h
linux-stable-mirror@lists.linaro.org