stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Cross-compiling libbpf from Linux 4.14 tree
@ 2019-01-08 18:52 Ignat Korchagin
  2019-01-10 14:01 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Ignat Korchagin @ 2019-01-08 18:52 UTC (permalink / raw)
  To: stable; +Cc: Ivan Babrou, Daniel Dao, Alex Forster

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-01-10 16:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-08 18:52 Cross-compiling libbpf from Linux 4.14 tree Ignat Korchagin
2019-01-10 14:01 ` Greg KH
2019-01-10 14:12   ` Ignat Korchagin
2019-01-10 16:03     ` Ivan Babrou
2019-01-10 16:13       ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).