All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Ignat Korchagin <ignat@cloudflare.com>
Cc: stable@vger.kernel.org, Ivan Babrou <ivan@cloudflare.com>,
	Daniel Dao <dqminh@cloudflare.com>,
	Alex Forster <aforster@cloudflare.com>
Subject: Re: Cross-compiling libbpf from Linux 4.14 tree
Date: Thu, 10 Jan 2019 15:01:48 +0100	[thread overview]
Message-ID: <20190110140148.GC10140@kroah.com> (raw)
In-Reply-To: <CALrw=nE9qbFtb3O7tp8dDr+b6TDAUMstUy-5i=yv4+Lo_Yq+Dw@mail.gmail.com>

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

  reply	other threads:[~2019-01-10 14:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-08 18:52 Cross-compiling libbpf from Linux 4.14 tree Ignat Korchagin
2019-01-10 14:01 ` Greg KH [this message]
2019-01-10 14:12   ` Ignat Korchagin
2019-01-10 16:03     ` Ivan Babrou
2019-01-10 16:13       ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190110140148.GC10140@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=aforster@cloudflare.com \
    --cc=dqminh@cloudflare.com \
    --cc=ignat@cloudflare.com \
    --cc=ivan@cloudflare.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.