From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Thomas Richter <tmricht@linux.ibm.com>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
gor@linux.ibm.com, heiko.carstens@de.ibm.com
Subject: Re: [PATCH] perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy()
Date: Mon, 14 Oct 2019 11:27:19 -0300 [thread overview]
Message-ID: <20191014142719.GK19627@kernel.org> (raw)
In-Reply-To: <20191008093841.59387-1-tmricht@linux.ibm.com>
Em Tue, Oct 08, 2019 at 11:38:41AM +0200, Thomas Richter escreveu:
> The build of file libperf-jvmti.so succeeds but the resulting
> object fails to load:
>
> # ~/linux/tools/perf/perf record -k mono -- java \
> -XX:+PreserveFramePointer \
> -agentpath:/root/linux/tools/perf/libperf-jvmti.so \
> hog 100000 123450
> Error occurred during initialization of VM
> Could not find agent library /root/linux/tools/perf/libperf-jvmti.so
> in absolute path, with error:
> /root/linux/tools/perf/libperf-jvmti.so: undefined symbol: _ctype
>
> Add the missing _ctype symbol into the build script.
>
> Fixes: c5d048240e49 ("perf jvmti: Link against tools/lib/string.h to have weak strlcpy()")
Thanks, applied.
- Arnaldo
> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
> ---
> tools/perf/jvmti/Build | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/jvmti/Build b/tools/perf/jvmti/Build
> index 1e148bbdf820..202cadaaf097 100644
> --- a/tools/perf/jvmti/Build
> +++ b/tools/perf/jvmti/Build
> @@ -2,7 +2,7 @@ jvmti-y += libjvmti.o
> jvmti-y += jvmti_agent.o
>
> # For strlcpy
> -jvmti-y += libstring.o
> +jvmti-y += libstring.o libctype.o
>
> CFLAGS_jvmti = -fPIC -DPIC -I$(JDIR)/include -I$(JDIR)/include/linux
> CFLAGS_REMOVE_jvmti = -Wmissing-declarations
> @@ -15,3 +15,7 @@ CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PE
> $(OUTPUT)jvmti/libstring.o: ../lib/string.c FORCE
> $(call rule_mkdir)
> $(call if_changed_dep,cc_o_c)
> +
> +$(OUTPUT)jvmti/libctype.o: ../lib/ctype.c FORCE
> + $(call rule_mkdir)
> + $(call if_changed_dep,cc_o_c)
> --
> 2.21.0
--
- Arnaldo
next prev parent reply other threads:[~2019-10-14 14:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-08 9:38 [PATCH] perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy() Thomas Richter
2019-10-14 14:27 ` Arnaldo Carvalho de Melo [this message]
2019-10-21 6:26 ` [tip: perf/urgent] " tip-bot2 for Thomas Richter
2019-10-21 23:19 ` [tip: perf/core] " tip-bot2 for Thomas Richter
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=20191014142719.GK19627@kernel.org \
--to=arnaldo.melo@gmail.com \
--cc=gor@linux.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=tmricht@linux.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.