From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Anders Roxell <anders.roxell@linaro.org>
Cc: linux-perf-users@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
james.clark@arm.com, Arnd Bergmann <arnd@arndb.de>,
Mark Brown <broonie@kernel.org>
Subject: Re: Perf not able to cross compile
Date: Thu, 1 Feb 2024 16:20:52 -0300 [thread overview]
Message-ID: <ZbvvFLN32si2fhGD@kernel.org> (raw)
In-Reply-To: <CADYN=9+DUzu6xEThaWQKp0udCsPs7h3XijyE5zmn-UYG8oM+AA@mail.gmail.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
prev parent reply other threads:[~2024-02-01 19:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 11:32 Perf not able to cross compile Anders Roxell
2024-02-01 11:52 ` James Clark
2024-02-01 19:21 ` Arnaldo Carvalho de Melo
2024-02-01 19:20 ` Arnaldo Carvalho de Melo [this message]
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=ZbvvFLN32si2fhGD@kernel.org \
--to=acme@kernel.org \
--cc=anders.roxell@linaro.org \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=james.clark@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).