Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp232467pxk; Thu, 17 Sep 2020 01:13:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeBtM0npOWIB+DJSTARzBNxNI1XGoFUof93svyGdbqY8g0KcCDpSxvJ+D6Rb0y8UPZZexn X-Received: by 2002:a17:906:8258:: with SMTP id f24mr28644692ejx.551.1600330438437; Thu, 17 Sep 2020 01:13:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600330438; cv=none; d=google.com; s=arc-20160816; b=KIpLlmv0NwKqrFkfENhwlANjhH6YUW2CI9PQoLkmgQlzv9GAJce+kTkJUHcrEOCenT JZvGsRfI9yySv/ukHeK5T2d5KrnBHiIPjkPyuKGIx0W796O2HWv3yHrHPhxK9c2Jio9p kgQ3nWc8AJrilPeuoAIz0Ds73vKSMsEtMH4kpaRVG82saYuAQsPW7sEmIZz5cHthXoj+ 2uBrILNzT2Wb7czB9hCMtcLWQgphZ5RS6wr/xDNDReX2MD/TcpGPS2HhS0J6F9ESxn6D vTm0A4+SW24LomJc+30eJvudx+fRqaoWQg1Twn1GLyChKvCO7/cgjSse3gtM6NYdDFpJ 4okA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=cBI8f1/R2C8gGei3me+pMyZKfvONcZONLHWJofQzyXM=; b=aG/l4PMDK05Puj2XZ0zFh6UD9n48akNwN2DDPyUKkysHvh0t+gMUF+VTzm9LSZsI00 K7LSPMZwKtEOk1Nm2Hyjxxb4SMN2lrJ7ixKJ1H1iTSEZfArWbe5FMgmqp01d4iBhu5Oa WRgWdienN9V732N3XNCUjLUK/BgiL5oQlY6JZKMOp2iaWBs9K4dXlIEDPUG4mkTO4cXu ckijUUM5xy71d+xYSQA0v+opo3ipqn6B67wHetnMmsLP4ttyZKTtk9Dm5Ipn6mUGUZIY KcmwR0fsBEL0DZqr0VbhNEfV+/estVr5VXNYYRm3pCLoKsERs8F8PEPjPfoyWg5O0C59 nQXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="W9uIpS/P"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a3si13626830ejt.659.2020.09.17.01.13.35; Thu, 17 Sep 2020 01:13:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="W9uIpS/P"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726262AbgIQIM3 (ORCPT + 99 others); Thu, 17 Sep 2020 04:12:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:32442 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726397AbgIQIMO (ORCPT ); Thu, 17 Sep 2020 04:12:14 -0400 X-Greylist: delayed 359 seconds by postgrey-1.27 at vger.kernel.org; Thu, 17 Sep 2020 04:12:14 EDT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600330332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cBI8f1/R2C8gGei3me+pMyZKfvONcZONLHWJofQzyXM=; b=W9uIpS/P8QocwiPUld8fry6/G8olyILp5dCitPa8nkxIGXoFT+92eY3Kfns0/JbeFouUQv b4SGejwEm6wHm1Aubpdn/z7FC9aHl8AlzSMr8dpSmKOZ8xo+eQWp7gyfJ+mefC1+wYqWBM yBuTaGFgTNSsei8MikUMsLXYr3r8HgY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-420-YfU2mhUcN_Cr4TOEz-iS8g-1; Thu, 17 Sep 2020 04:04:56 -0400 X-MC-Unique: YfU2mhUcN_Cr4TOEz-iS8g-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 05A841018722; Thu, 17 Sep 2020 08:04:55 +0000 (UTC) Received: from krava (ovpn-114-176.ams2.redhat.com [10.36.114.176]) by smtp.corp.redhat.com (Postfix) with SMTP id 4E6941002D69; Thu, 17 Sep 2020 08:04:53 +0000 (UTC) Date: Thu, 17 Sep 2020 10:04:52 +0200 From: Jiri Olsa To: Seth Forshee Cc: Jiri Olsa , Alexei Starovoitov , Daniel Borkmann , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: resolve_btfids breaks kernel cross-compilation Message-ID: <20200917080452.GB2411168@krava> References: <20200916194733.GA4820@ubuntu-x1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200916194733.GA4820@ubuntu-x1> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 16, 2020 at 02:47:33PM -0500, Seth Forshee wrote: > The requirement to build resolve_btfids whenever CONFIG_DEBUG_INFO_BTF > is enabled breaks some cross builds. For example, when building a 64-bit > powerpc kernel on amd64 I get: > > Auto-detecting system features: > ... libelf: [ [32mon[m ] > ... zlib: [ [32mon[m ] > ... bpf: [ [31mOFF[m ] > > BPF API too old > make[6]: *** [Makefile:295: bpfdep] Error 1 > > The contents of tools/bpf/resolve_btfids/feature/test-bpf.make.output: > > In file included from /home/sforshee/src/u-k/unstable/tools/arch/powerpc/include/uapi/asm/bitsperlong.h:11, > from /usr/include/asm-generic/int-ll64.h:12, > from /usr/include/asm-generic/types.h:7, > from /usr/include/x86_64-linux-gnu/asm/types.h:1, > from /home/sforshee/src/u-k/unstable/tools/include/linux/types.h:10, > from /home/sforshee/src/u-k/unstable/tools/include/uapi/linux/bpf.h:11, > from test-bpf.c:3: > /home/sforshee/src/u-k/unstable/tools/include/asm-generic/bitsperlong.h:14:2: error: #error Inconsistent word size. Check asm/bitsperlong.h > 14 | #error Inconsistent word size. Check asm/bitsperlong.h > | ^~~~~ > > This is because tools/arch/powerpc/include/uapi/asm/bitsperlong.h sets > __BITS_PER_LONG based on the predefinied compiler macro __powerpc64__, > which is not defined by the host compiler. What can we do to get cross > builds working again? could you please share the command line and setup? thanks, jirka