From: Jiri Olsa <olsajiri@gmail.com>
To: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [Linux-v5.17-rc6] Building tools/perf with perl v5.34
Date: Sun, 6 Mar 2022 16:42:14 +0100 [thread overview]
Message-ID: <YiTWVjKwOO/bMNz/@krava> (raw)
In-Reply-To: <CA+icZUW0XyDHFTYF_j1QECpqP4kmTXqCqX_HfEVvQ4aWZecW5Q@mail.gmail.com>
On Sun, Mar 06, 2022 at 03:28:09AM +0100, Sedat Dilek wrote:
> On Sat, Mar 5, 2022 at 9:09 PM Jiri Olsa <olsajiri@gmail.com> wrote:
> >
> > On Sat, Mar 05, 2022 at 08:52:18AM +0100, Sedat Dilek wrote:
> > > Hi,
> > >
> > > I am here on Debian/unstable AMD64 which switched over to perl v5.34
> > > in February 2022.
> > >
> > > Unfortunately, my perf does not build with this (lib)perl version:
> > >
> > > $ ~/bin/perf -vv
> > > perf version 5.17-rc6
> > > dwarf: [ on ] # HAVE_DWARF_SUPPORT
> > > dwarf_getlocations: [ on ] # HAVE_DWARF_GETLOCATIONS_SUPPORT
> > > glibc: [ on ] # HAVE_GLIBC_SUPPORT
> > > syscall_table: [ on ] # HAVE_SYSCALL_TABLE_SUPPORT
> > > libbfd: [ on ] # HAVE_LIBBFD_SUPPORT
> > > libelf: [ on ] # HAVE_LIBELF_SUPPORT
> > > libnuma: [ on ] # HAVE_LIBNUMA_SUPPORT
> > > numa_num_possible_cpus: [ on ] # HAVE_LIBNUMA_SUPPORT
> > > libperl: [ OFF ] # HAVE_LIBPERL_SUPPORT
> > > libpython: [ on ] # HAVE_LIBPYTHON_SUPPORT
> > > libslang: [ on ] # HAVE_SLANG_SUPPORT
> > > libcrypto: [ on ] # HAVE_LIBCRYPTO_SUPPORT
> > > libunwind: [ on ] # HAVE_LIBUNWIND_SUPPORT
> > > libdw-dwarf-unwind: [ on ] # HAVE_DWARF_SUPPORT
> > > zlib: [ on ] # HAVE_ZLIB_SUPPORT
> > > lzma: [ on ] # HAVE_LZMA_SUPPORT
> > > get_cpuid: [ on ] # HAVE_AUXTRACE_SUPPORT
> > > bpf: [ on ] # HAVE_LIBBPF_SUPPORT
> > > aio: [ on ] # HAVE_AIO_SUPPORT
> > > zstd: [ on ] # HAVE_ZSTD_SUPPORT
> > > libpfm4: [ OFF ] # HAVE_LIBPFM
> > >
> > > $ grep libperl ../make-log_perf-python3.10-install_bin.txt
> > > 9:Makefile.config:788: Missing perl devel files. Disabling perl
> > > scripting support, please install perl-ExtUtils-Embed/libperl-dev
> > > 22:... libperl: [ OFF ]
> > >
> > > Checking for these requirements:
> > >
> > > # dpkg -l | grep perl | grep 5.34 | awk '/^ii/ {print $1 " " $2 " "
> > > $3}' | column -t
> > > ii libperl-dev:amd64 5.34.0-3
> > > ii libperl5.34:amd64 5.34.0-3
> > > ii perl 5.34.0-3
> > > ii perl-base 5.34.0-3
> > > ii perl-modules-5.34 5.34.0-3
> > >
> > > # dpkg -L perl-modules-5.34 | grep -i ExtUtils | grep -i Embed
> > > /usr/share/perl/5.34.0/ExtUtils/Embed.pm
> > >
> > > Can you please comment on this?
> >
> > hi,
> > is there something in tools/build/feature/test-libperl.make.output ?
> >
>
> Hey jirka!
>
> Indeed there is such a file.
>
> $ LC_ALL=C ll tools/build/feature/test-libperl.make.output
> -rw-r--r-- 1 dileks dileks 24K Mar 6 03:22
> tools/build/feature/test-libperl.make.output
>
> Reproducer:
>
> make distclean
> make -C tools/perf clean
>
> MAKE="make"
> MAKE_OPTS="HOSTCC=clang-13 HOSTCXX=clang++-13 HOSTLD=ld.lld-13
> HOSTAR=llvm-ar-13 CC=clang-13 LD=ld.lld-13 AR=llvm-ar-13 NM=llvm-nm-13
> OBJCOPY=llvm-objcopy-13 OBJDUMP=llvm-objdump-13 OBJSIZE=llvm-size-13
> READELF=llvm-readelf-13 STRIP=llvm-strip-13 LLVM_IAS=1"
>
> LC_ALL=C $MAKE V=1 $MAKE_OPTS -C tools/perf PYTHON=python3 install-bin
yea, looks like we can't compile perl devel includes with clang,
we use simple perl test program:
$ cd tools/build/feature/
$ cat test-libperl.c
// SPDX-License-Identifier: GPL-2.0
#include <EXTERN.h>
#include <perl.h>
int main(void)
{
perl_alloc();
return 0;
}
and if I compile it with:
$ CC=clang make test-libperl.bin
clang -MD -Wall -Werror -o test-libperl.bin test-libperl.c > test-libperl.make.output 2>&1 `perl -MExtUtils::Embed -e ccopts 2>/dev/null` -Wl,--enable-new-dtags -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fstack-protector-strong -L/usr/local/lib -L/usr/lib64/perl5/CORE -lperl -lpthread -lresolv -ldl -lm -lcrypt -lutil -lc
make: *** [Makefile:224: test-libperl.bin] Error 1
I'm getting some other lto related error:
$ cat test-libperl.make.output
clang-13: error: optimization flag '-ffat-lto-objects' is not supported [-Werror,-Wignored-optimization-argument]
with my clang version:
$ clang --version
clang version 13.0.0 (Fedora 13.0.0-3.fc35)
Target: x86_64-redhat-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
so you need to figure out how to compile the test program
above first with clang
jirka
next prev parent reply other threads:[~2022-03-06 15:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-05 7:52 [Linux-v5.17-rc6] Building tools/perf with perl v5.34 Sedat Dilek
2022-03-05 7:57 ` Sedat Dilek
2022-03-05 8:26 ` Sedat Dilek
2022-03-05 11:11 ` Sedat Dilek
2022-03-05 20:09 ` Jiri Olsa
2022-03-06 2:28 ` Sedat Dilek
2022-03-06 3:18 ` Sedat Dilek
2022-03-06 15:42 ` Jiri Olsa [this message]
2022-03-06 16:00 ` Sedat Dilek
2022-03-07 16:35 ` Arnaldo Carvalho de Melo
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=YiTWVjKwOO/bMNz/@krava \
--to=olsajiri@gmail.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=sedat.dilek@gmail.com \
/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