Linux Perf Users
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <uwe@kleine-koenig.org>
To: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	linux-perf-users@vger.kernel.org,
	Diederik de Haas <didi.debian@cknow.org>,
	Tamas Zsoldos <tamas.zsoldos@arm.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Adrian Bunk <bunk@debian.org>
Subject: Re: [PATCH] perf: Drop -lstdc++ from OPENCSDLIBS
Date: Thu, 2 Dec 2021 16:23:53 +0100	[thread overview]
Message-ID: <c92d401b-cf53-e27e-b26d-870463494df1@kleine-koenig.org> (raw)
In-Reply-To: <20211202134337.1109300-1-u.kleine-koenig@pengutronix.de>


[-- Attachment #1.1: Type: text/plain, Size: 1605 bytes --]

Hello,

I picked the wrong script so the sender address was wrong. I assume I'll 
have to fix that. Will pay more attention for v2.

On 12/2/21 14:43, Uwe Kleine-König wrote:
> From: Uwe Kleine-König <uwe@kleine-koenig.org>
> 
> When cross compiling on amd64 for arm64 the build failed on my machine with:
> 
> 	Makefile.config:493: *** Error: No libopencsd library found or the version is not up-to-date. Please install recent libopencsd to build with CORESIGHT=1.  Stop.
> 
> even though libopencsd was installed (for both amd64 and arm64). After
> some digging around I found the relevant error message in
> tools/perf/feature/test-libopencsd.make.output:
> 
> 	/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: cannot find -lstdc++
> 
> Instead of fixing the error message to also include a request to install
> libstdc++, just drop -lstdc++. With this change the build completed.
> 
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> ---
> Hello,
> 
> not sure this is a pure cross compilation problem. I think in general
> it's a bad idea to link against libstdc++ explicitly. Still more if
> there is no C++ involved.

In the meantime I was pointed to 573cf5c9a152 ("perf build: Add missing 
-lstdc++ when linking with libopencsd"), and I wonder what I'm missing. 
Maybe my patch breaks the build if libopencsd is only available as .a?

I added the people involved in that commit to Cc: and look forward to 
details. The motivation to add -lstdc++ seems to be "It does not hurt" 
which is a bit weak.

Best regards
Uwe

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-12-02 15:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02 13:43 [PATCH] perf: Drop -lstdc++ from OPENCSDLIBS Uwe Kleine-König
2021-12-02 15:23 ` Uwe Kleine-König [this message]
2021-12-02 15:36 ` James Clark
2021-12-02 16:00   ` Branislav Rankov
2021-12-02 16:07     ` Uwe Kleine-König
2021-12-03  9:22       ` James Clark
2021-12-02 16:03   ` Uwe Kleine-König

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=c92d401b-cf53-e27e-b26d-870463494df1@kleine-koenig.org \
    --to=uwe@kleine-koenig.org \
    --cc=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=bunk@debian.org \
    --cc=didi.debian@cknow.org \
    --cc=jolsa@redhat.com \
    --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=tamas.zsoldos@arm.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