Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp390338rdb; Thu, 1 Feb 2024 11:21:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IGZvue5Y5fZrHlTlSfIygGD6bEqKG2eUzDAokoXchkEBAOVpOdCbn4Tyyvm9mdKWbkoESKW X-Received: by 2002:a17:902:dac4:b0:1d9:5b4d:7004 with SMTP id q4-20020a170902dac400b001d95b4d7004mr2062396plx.29.1706815284819; Thu, 01 Feb 2024 11:21:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706815284; cv=pass; d=google.com; s=arc-20160816; b=eZsdgVuT87r0/tFXRO4l3iIH0SDug/EbDPHcma+dc2lNHyDn5yxcZpnncGDrJbfTEP NxyPsXZUeSyAn1Bp2cB6H27tBg5sRP63XkNYnuZrJA2+KOMuq3kLqsy/8PRASG59REUB wOhvO+/xQ30P/amfp5AiF27F1bf0PcXxa1pJPblwc5K4XmkRKDZ3BTBNx7BZl7L2dvcF suG/dSvBYpbCqDm7glIp8dloMkAeDu1KjgMy97HfuobF8TuaAGmDVsvG4M97BF5i++yt jGK+bgWJani6s65fnTVgTWB1EBCcL4rNcix2YAF/lhH05/JhBkNVxMhBKWee+eH0jlql RgQA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1aqpLIMMbxmmCRegpxRkvx5iY17mlzMfRcS3Uael76I=; fh=cWhVXThoj2nA7f9TC5YqkqswhPkktbYB49WMlPpxarE=; b=a6tZHALkHoxDgoRFY+7DLBeXf0/V/G4PykRhh09bIY1LqcvlRGCqIP+tcVTo2uAb0/ wYynd4NfS7jAv0snMur7Q1WdwKs2PbwAdCApgBcNxwtLDFRMz6GcPRY46/wer+BX4CIh uTu+dHa56c/Y2/WIIGRZ3HFeZEr+aRCHt0ItbttQEatVwTWGH/8Z/JIfMcBLBwKaP5kv f4lnPMhGu0S9u59yubg14VLdGtKQCa3YV8RsfrwL+oJX3b8SyqKU+7Wh+YTUEtM+IHNN 3dX7nr8Un3J16P0VRiRJ5nTYsD7DVjk/s2Sp4WMGht5mVw+AEV2WkXaagc4Fg6gW+nyr K5HQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gzOTlHxm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48757-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48757-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCVEwTheNeAvYYszA2/l7ksRwoaEupAbJ4dPcxYhfxCGBBqr9wf9iaruZGr3bUktJYenOD7q72Mctc8UtiRlFr9iYls3uhHM1P2VYSTFWA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u9-20020a170903124900b001d939a413d1si343853plh.53.2024.02.01.11.21.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 11:21:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48757-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gzOTlHxm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48757-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48757-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7B30F28AEEA for ; Thu, 1 Feb 2024 19:21:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1348F85641; Thu, 1 Feb 2024 19:20:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gzOTlHxm" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 374E385631; Thu, 1 Feb 2024 19:20:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706815255; cv=none; b=l0cR3j85vHqnmwSsZObmIBR5ThTNiuDmA3de38nvhXX25mu+BcowdtvsrXncy667izPxQlC/e3zD+z/TLahEH3nptOHeTdohlfgpaad5ZXgeTlFbm1f0cxkHuiZ2gIqR8jW074A2oAyeDZqN0Mq76WdurAoCH94oCeHt3rj0fN8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706815255; c=relaxed/simple; bh=8ByGpw4Ub5BR+JBxRpGU9i868XZCdYzjzStzYSpZcaQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bsUPpHUtbFsu/Ed5QV2N2czMWI5dFaJNmKrdSztkUNWjPmrxC9sl9F7OTL3YxUSSUDdHaPXEKFwZKFH9f/RZjSvdGxwFc8GAOfP0z+CAvQ3ZreSeoy1disB4PPPTo1f4n/EKPE5VKPC8p/RF3Aui95zMH7NIgGVwgrU8Q/1Oiqk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gzOTlHxm; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 633ADC43390; Thu, 1 Feb 2024 19:20:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706815254; bh=8ByGpw4Ub5BR+JBxRpGU9i868XZCdYzjzStzYSpZcaQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gzOTlHxm42AJzkNvcYod5FnctsxVUpkGYpyxL9dB/i5vickaagyGDQy88hFm6bvWd ym2Or4Z3hANT+/xKff/LMtVY7gByIg1NEQV6iwKx+p2if0vrq3QYo3cTcDTFFcShEv lP6eBu7rbxfcWW9OhOo8goiC+3ojDDate/8Xs8mv0JROO0tSumWzZzVpnPcn8q14sl xr3llIpr0hWmFH+2nI/I+gGbBFaNpYeXgJNSNBmWJcqo+bgBOATo01kTtH5naD1sXr KjLYcXCO7Di2+O/qd0iSDZRNo2khimWLVX7voXP+nM9u48FJ+BwemSnndvvUUa5lTd T92SMb2YjNJzQ== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 14D5C40441; Thu, 1 Feb 2024 16:20:52 -0300 (-03) Date: Thu, 1 Feb 2024 16:20:52 -0300 From: Arnaldo Carvalho de Melo To: Anders Roxell Cc: linux-perf-users@vger.kernel.org, Linux Kernel Mailing List , james.clark@arm.com, Arnd Bergmann , Mark Brown Subject: Re: Perf not able to cross compile Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Url: http://acmel.wordpress.com Em Thu, Feb 01, 2024 at 12:32:09PM +0100, Anders Roxell escreveu: > Hey, > > I'm trying to cross compile perf ARCH=arm64 on my x86_64 host from > linus tree [1], branch master. > > > This is the failue I see, full log [2]: > > ... > CC /home/tuxbuild/.cache/tuxmake/builds/1/build/libbpf/staticobjs/elf.o > CC /home/tuxbuild/.cache/tuxmake/builds/1/build/libbpf/staticobjs/features.o > cc1: error: ‘-fcf-protection=full’ is not supported for this target > error: command '/usr/local/bin/sccache' failed with exit code 1 We have some checks to deal with unknown options that came from python, perl config, but it seems in your case there is something that is not being covered, worth of further investigation. Can you simply first try disabling python support? Look at tools/perf/Makefile.perf, first trying with NO_LIBPYTHON=1 to your make command line? - Arnaldo > cp: cannot stat > '/home/tuxbuild/.cache/tuxmake/builds/1/build/python_ext_build/lib/perf*.so': > No such file or directory > make[2]: *** [Makefile.perf:678: > /home/tuxbuild/.cache/tuxmake/builds/1/build/python/perf.cpython-311-x86_64-linux-gnu.so] > Error 1 > make[2]: *** Waiting for unfinished jobs.... > LD /home/tuxbuild/.cache/tuxmake/builds/1/build/libbpf/staticobjs/libbpf-in.o > LINK /home/tuxbuild/.cache/tuxmake/builds/1/build/libbpf/libbpf.a > make[1]: *** [Makefile.perf:261: sub-make] Error 2 > make: *** [Makefile:70: all] Error 2 > > Running 'x86_64-linux-gnu-python3-config --cflags' I see > '-fcf-protection' in the output and this happens when I'm building > cross compile arm64 on my x86_64 host machine. Building on an arm64 > host works. cross compile x86_64 on my x86_64 host works too. > > I have 'aarch64-linux-gnu-python3-config' installed but that isn't used. > > $ x86_64-linux-gnu-python3-config --cflags > -I/usr/include/python3.11 -I/usr/include/python3.11 -Wsign-compare -g > -fstack-protector-strong -fstack-clash-protection -Wformat > -Werror=format-security -fcf-protection -DNDEBUG -g -fwrapv -O2 -Wall > $ aarch64-linux-gnu-python3-config --cflags > -I/usr/include/python3.11 -I/usr/include/python3.11 -Wsign-compare -g > -fstack-protector-strong -fstack-clash-protection -Wformat > -Werror=format-security -mbranch-protection=standard -DNDEBUG -g > -fwrapv -O2 -Wall > > I tried to set PYTHON and PYTHON_CONFIG too, but didn't work. > > It doesn't try to use $(CROSS_COMPILE)python3-config, any idea how to > use the correct config? > > Cheers, > Anders > [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > [2] https://storage.tuxsuite.com/public/linaro/lkft/builds/2bc6x6cISHzG9Jgo0oAVv2OgLOG/build.log -- - Arnaldo