From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0076C43387 for ; Thu, 10 Jan 2019 14:01:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6947620660 for ; Thu, 10 Jan 2019 14:01:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547128912; bh=9ue6JofEh2qFXgTFJ1KHEneMhjRJUr1VylcZc8IJf9M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=FeYK7EZ5cbVnVBajB7G29IUGuo+UZ0qK14iPo5Q9HWvfPJavIwNeLvlgfeLnGldL7 8zpXL41fSMM1QthHCX+VEAeBg1kHUOSt3KLkVIMbFG3pByAt+GZevacu10WRo61v1+ U3QzevUJQu2wdmdhaMi+gjyp/uEP7spVEQkaSecw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728499AbfAJOBv (ORCPT ); Thu, 10 Jan 2019 09:01:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:55282 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728181AbfAJOBv (ORCPT ); Thu, 10 Jan 2019 09:01:51 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9171A20660; Thu, 10 Jan 2019 14:01:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547128910; bh=9ue6JofEh2qFXgTFJ1KHEneMhjRJUr1VylcZc8IJf9M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=1DxFVDCvMgptdvbz/Zcir+VwmvbjdE8tNKcKAIwb/bKXughksCAhb/6j9Lhldjqml v1IzSyjgX2sOroH4+mS2EVZoQ7xCoT/QdRIXrvxE/xhN92UU6XlECCBT9dBQo+6DUt Gmn21nTZf9wwovLAUhlArM32IHNFmVuoh3FIjLIE= Date: Thu, 10 Jan 2019 15:01:48 +0100 From: Greg KH To: Ignat Korchagin Cc: stable@vger.kernel.org, Ivan Babrou , Daniel Dao , Alex Forster Subject: Re: Cross-compiling libbpf from Linux 4.14 tree Message-ID: <20190110140148.GC10140@kroah.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.2 (2019-01-07) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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 /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