linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>, Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Clark Williams <williams@redhat.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Thomas Richter <tmricht@linux.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 01/11] perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy()
Date: Thu, 17 Oct 2019 13:02:51 -0300	[thread overview]
Message-ID: <20191017160301.20888-2-acme@kernel.org> (raw)
In-Reply-To: <20191017160301.20888-1-acme@kernel.org>

From: Thomas Richter <tmricht@linux.ibm.com>

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: 79743bc927f6 ("perf jvmti: Link against tools/lib/string.o to have weak strlcpy()")
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Link: http://lore.kernel.org/lkml/20191008093841.59387-1-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.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


  reply	other threads:[~2019-10-17 16:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17 16:02 [GIT PULL] perf/urgent fixes Arnaldo Carvalho de Melo
2019-10-17 16:02 ` Arnaldo Carvalho de Melo [this message]
2019-10-17 16:02 ` [PATCH 02/11] perf evlist: Fix fix for freed id arrays Arnaldo Carvalho de Melo
2019-10-17 16:02 ` [PATCH 03/11] perf tools: Fix resource leak of closedir() on the error paths Arnaldo Carvalho de Melo
2019-10-17 16:02 ` [PATCH 04/11] perf annotate: Fix multiple memory and file descriptor leaks Arnaldo Carvalho de Melo
2019-10-17 16:02 ` [PATCH 05/11] perf tools: Fix mode setting in copyfile_mode_ns() Arnaldo Carvalho de Melo
2019-10-17 16:02 ` [PATCH 06/11] perf c2c: Fix memory leak in build_cl_output() Arnaldo Carvalho de Melo
2019-10-17 16:02 ` [PATCH 07/11] tools headers kvm: Sync kvm headers with the kernel sources Arnaldo Carvalho de Melo
2019-10-17 16:02 ` [PATCH 08/11] " Arnaldo Carvalho de Melo
2019-10-17 16:02 ` [PATCH 09/11] tools headers kvm: Sync kvm.h " Arnaldo Carvalho de Melo
2019-10-17 16:03 ` [PATCH 10/11] tools headers UAPI: Sync sched.h with the kernel Arnaldo Carvalho de Melo
2019-10-17 16:03 ` [PATCH 11/11] perf kmem: Fix memory leak in compact_gfp_flags() Arnaldo Carvalho de Melo
2019-10-21  6:23 ` [GIT PULL] perf/urgent fixes Ingo Molnar
2019-10-21 12:20   ` Arnaldo Carvalho de Melo
2019-11-06 19:10   ` Arnaldo Carvalho de Melo
2019-11-07  7:02     ` Ingo Molnar

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=20191017160301.20888-2-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=gor@linux.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tmricht@linux.ibm.com \
    --cc=williams@redhat.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).