From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Wang Nan <wangnan0@huawei.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Zefan Li <lizefan@huawei.com>,
pi3orama@163.com, Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 05/12] perf tools: Add -lutil in python lib list for broken python-config
Date: Mon, 11 Jan 2016 20:31:54 -0300 [thread overview]
Message-ID: <1452555121-21739-6-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1452555121-21739-1-git-send-email-acme@kernel.org>
From: Wang Nan <wangnan0@huawei.com>
On some system the perf-config is broken, causes link failure like this:
/usr/lib64/python2.7/config/libpython2.7.a(posixmodule.o): In function `posix_forkpty':
/opt/wangnan/yocto-build/tmp-eglibc/work/x86_64-oe-linux/python/2.7.3-r0.3.1/Python-2.7.3/./Modules/posixmodule.c:3816: undefined reference to `forkpty'
/usr/lib64/python2.7/config/libpython2.7.a(posixmodule.o): In function `posix_openpty':
/opt/wangnan/yocto-build/tmp-eglibc/work/x86_64-oe-linux/python/2.7.3-r0.3.1/Python-2.7.3/./Modules/posixmodule.c:3756: undefined reference to `openpty'
collect2: error: ld returned 1 exit status
make[1]: *** [/home/wangnan/kernel-hydrogen/tools/perf/out/perf] Error 1
make: *** [all] Error 2
$ python-config --libs
-lpthread -ldl -lpthread -lutil -lm -lpython2.7
In this case a '-lutil' should be appended to -lpython2.7.
(I know we have --start-group and --end-group. I can see them in command
line of collect2 by strace. However it doesn't work. Seems I have a
broken environment?)
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1452520124-2073-2-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/config/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 254d06e39bea..0793c7654858 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -493,7 +493,7 @@ else
PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
- PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS))
+ PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) -lutil
PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
--
2.1.0
next prev parent reply other threads:[~2016-01-11 23:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-11 23:31 [GIT PULL 00/12] perf/core fixes Arnaldo Carvalho de Melo
2016-01-11 23:31 ` [PATCH 01/12] tools: Add clean targets for tools directory Arnaldo Carvalho de Melo
2016-01-11 23:31 ` [PATCH 02/12] tools bpf: Add *.cmd files clean up Arnaldo Carvalho de Melo
2016-01-11 23:31 ` [PATCH 03/12] tools lockdep: " Arnaldo Carvalho de Melo
2016-01-11 23:31 ` [PATCH 04/12] perf tools: Add missing sources to perf's MANIFEST Arnaldo Carvalho de Melo
2016-01-11 23:31 ` Arnaldo Carvalho de Melo [this message]
2016-01-11 23:31 ` [PATCH 06/12] perf tools: Fix phony build target for build-test Arnaldo Carvalho de Melo
2016-01-11 23:31 ` [PATCH 07/12] perf tools: Fix PowerPC native building Arnaldo Carvalho de Melo
2016-01-11 23:31 ` [PATCH 08/12] tools: Move Makefile.arch from perf/config to tools/scripts Arnaldo Carvalho de Melo
2016-01-11 23:31 ` [PATCH 09/12] perf bpf: Fix build breakage due to libbpf Arnaldo Carvalho de Melo
2016-01-11 23:31 ` [PATCH 10/12] tools build: Add BPF feature check to test-all Arnaldo Carvalho de Melo
2016-01-11 23:32 ` [PATCH 11/12] perf test: Fix false TEST_OK result for 'perf test hist' Arnaldo Carvalho de Melo
2016-01-11 23:32 ` [PATCH 12/12] perf test: Reset err after using it hold errcode in hist testcases Arnaldo Carvalho de Melo
2016-01-12 10:04 ` [GIT PULL 00/12] perf/core fixes 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=1452555121-21739-6-git-send-email-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=pi3orama@163.com \
--cc=wangnan0@huawei.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