linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ma Xinjian <xinjianx.ma@intel.com>
To: irogers@google.com
Cc: acme@kernel.org, alexander.shishkin@linux.intel.com,
	daniel@iogearbox.net, jolsa@redhat.com, leo.yan@linaro.org,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	llvm@lists.linux.dev, mark.rutland@arm.com, mingo@redhat.com,
	mpetlan@redhat.com, namhyung@kernel.org, nathan@kernel.org,
	ndesaulniers@google.com, peterz@infradead.org,
	sedat.dilek@gmail.com, philip.li@intel.com
Subject: Re: [PATCH 2/2] perf clang: Fixes for more recent LLVM/clang
Date: Fri, 12 Nov 2021 18:24:44 +0800	[thread overview]
Message-ID: <1fcb636d-71ab-12e8-aa7f-c7ca4f89a5ed@intel.com> (raw)

Hi

We build perf with clang also recently, but unlucky that failed with 
following errors:


```
In file included from /usr/lib/llvm-7/include/llvm/ADT/STLExtras.h:21,
                  from /usr/lib/llvm-7/include/llvm/ADT/StringRef.h:13,
                  from /usr/lib/llvm-7/include/clang/Basic/Version.h:20,
                  from test-clang.cpp:2:
/usr/lib/llvm-7/include/llvm/ADT/SmallVector.h: In instantiation of 
'void llvm::SmallVectorTemplateBase<T, true>::push_back(const T&) [with 
T = clang::driver::OffloadUnbundlingJobAction::DependentActionInfo]':
/usr/lib/llvm-7/include/clang/Driver/Action.h:579:61:   required from here
/usr/lib/llvm-7/include/llvm/ADT/SmallVector.h:313:11: error: 'void* 
memcpy(void*, const void*, size_t)' writing to an object of type 'struct 
clang::driver::OffloadUnbundlingJobAction::DependentActionInfo' with no 
trivial copy-assignment; use copy-initialization instead 
[-Werror=class-memaccess]
      memcpy(this->end(), &Elt, sizeof(T));
      ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/llvm-7/include/clang/Driver/Driver.h:15,
                  from test-clang.cpp:6:
/usr/lib/llvm-7/include/clang/Driver/Action.h:549:10: note: 'struct 
clang::driver::OffloadUnbundlingJobAction::DependentActionInfo' declared 
here
    struct DependentActionInfo final {
           ^~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
```

llvm version: 7
rootfs: Debian10
kernel: v5.8 v5.11 v5.15
reproduce:
$ cd linux/tools/perf
$ make LIBCLANGLLVM=1 ARCH= EXTRA_CFLAGS='-fno-omit-frame-pointer 
-fsanitize=undefined -fsanitize=address'

Would you please kindly point out what's wrong with our steps? Or can 
you give us your command to make perf with clang?


Thanks
Ma Xinjian

             reply	other threads:[~2021-11-12 10:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-12 10:24 Ma Xinjian [this message]
2021-11-12 15:35 ` [PATCH 2/2] perf clang: Fixes for more recent LLVM/clang Ian Rogers
2021-11-12 18:43 ` Arnaldo Carvalho de Melo
  -- strict thread matches above, loose matches on Subject: below --
2021-10-11 23:24 [PATCH 1/2] tools: Bump minimum LLVM C++ std to GNU++14 Ian Rogers
2021-10-11 23:24 ` [PATCH 2/2] perf clang: Fixes for more recent LLVM/clang Ian Rogers
2021-10-11 23:35   ` Ian Rogers
2021-10-11 23:49     ` Fāng-ruì Sòng
2021-10-12  2:17       ` Ian Rogers

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=1fcb636d-71ab-12e8-aa7f-c7ca4f89a5ed@intel.com \
    --to=xinjianx.ma@intel.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=daniel@iogearbox.net \
    --cc=irogers@google.com \
    --cc=jolsa@redhat.com \
    --cc=leo.yan@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=mpetlan@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=peterz@infradead.org \
    --cc=philip.li@intel.com \
    --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;
as well as URLs for NNTP newsgroup(s).