All the mail mirrored from lore.kernel.org
 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

* Re: Cross-compiling libbpf from Linux 4.14 tree
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2019-01-10 14:01 UTC (permalink / raw
  To: Ignat Korchagin; +Cc: stable, Ivan Babrou, Daniel Dao, Alex Forster

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

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

* Re: Cross-compiling libbpf from Linux 4.14 tree
  2019-01-10 14:01 ` Greg KH
@ 2019-01-10 14:12   ` Ignat Korchagin
  2019-01-10 16:03     ` Ivan Babrou
  0 siblings, 1 reply; 5+ messages in thread
From: Ignat Korchagin @ 2019-01-10 14:12 UTC (permalink / raw
  To: Greg KH; +Cc: stable, Ivan Babrou, Daniel Dao, Alex Forster

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

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

* Re: Cross-compiling libbpf from Linux 4.14 tree
  2019-01-10 14:12   ` Ignat Korchagin
@ 2019-01-10 16:03     ` Ivan Babrou
  2019-01-10 16:13       ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Ivan Babrou @ 2019-01-10 16:03 UTC (permalink / raw
  To: Ignat Korchagin; +Cc: Greg KH, stable, Daniel Dao, Alex Forster

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

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

* Re: Cross-compiling libbpf from Linux 4.14 tree
  2019-01-10 16:03     ` Ivan Babrou
@ 2019-01-10 16:13       ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2019-01-10 16:13 UTC (permalink / raw
  To: Ivan Babrou; +Cc: Ignat Korchagin, stable, Daniel Dao, Alex Forster

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:
> 
> * https://www.mail-archive.com/netdev@vger.kernel.org/msg253346.html

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

^ 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.