perf probe: Build error with missing libraries
On a Ubuntu system just installed (13.10, x86_64), I'm installing the devel libs one by one to check if there are problems with the automatic disabling of features that requires libraries not installed.
Stumbled at this:
CC /tmp/build/perf/util/probe-event.outil/probe-event.c: In function ‘try_to_find_probe_trace_events’:util/probe-event.c:753:46: error: unused parameter ‘target’ [-Werror=unused-parameter]
int max_tevs __maybe_unused, const char *target)
^util/probe-event.c: At top level:util/probe-event.c:193:12: error: ‘get_text_start_address’ defined but not used [-Werror=unused-function]
static int get_text_start_address(const char *exec, unsigned long
*address)
^
cc1: all warnings being treated as errors make[1]: *** [/tmp/build/perf/util/probe-event.o] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [install] Error 2
make: Leaving directory `/home/acme/git/linux/tools/perf' acme@ubuntu13:~/git/linux$
Investigating...
- Arnaldo
Em Mon, Jan 13, 2014 at 03:04:00PM -0300, Arnaldo Carvalho de Melo escreveu:
Quoted 11 lines
On a Ubuntu system just installed (13.10,
x86_64), I'm installing the devel libs one by one to check if there are problems with the automatic disabling of features that requires libraries not installed.Stumbled at this:
util/probe-event.c: At top level:util/probe-event.c:193:12: error: ‘get_text_start_address’ defined but not used [-Werror=unused-function]Investigating...
This patch below fixes it, applying.
Jiri, this is something else for the give-me-more-ponies list for tests/make: build it on freshly provisioned systems with multiple mixes of devel packages installed ;-)
- Arnaldo
tools/perf/util/probe-event.c +4 -1
@@ -172,6 +172,7 @@ const char *kernel_get_module_path(const char *module)return (dso) ? dso->long_name :NULL ; } +#ifdef HAVE_DWARF_SUPPORT /* Copied from unwind.c */ static Elf_Scn *elf_section_by_name (Elf *elf,GElf_Ehdr *ep,GElf_Shdr *shp,const char *name)
@@ -217,6 +218,7 @@ out:elf_end (elf); return ret; } +#endif static int init_user_exec (void ) {
@@ -750,7 +752,8 @@ static int kprobe_convert_to_perf_probe(struct probe_trace_point *tp,static int try_to_find_probe_trace_events (struct perf_probe_event *pev,struct probe_trace_event **tevs__maybe_unused , -int max_tevs__maybe_unused ,const char *target) +int max_tevs__maybe_unused , +const char *target__maybe_unused ) {if (perf_probe_event_need_dwarf (pev)) {pr_warning ("Debuginfo-analysis is not supported.\n" );
Masami Hiramatsu
Acked-byQuoted 7 lines · Arnaldo Carvalho de Melo
Em Mon, Jan 13, 2014 at 03:04:00PM -0300, Arnaldo Carvalho de Melo escreveu:
Quoted 5 lines
On a Ubuntu system just installed (13.10,
x86_64), I'm installing the devel libs one by one to check if there are problems with the automatic disabling of features that requires libraries not installed.Stumbled at this:
Quoted 7 lines
Quoted 5 lines
util/probe-event.c: At top level:util/probe-event.c:193:12: error: ‘get_text_start_address’ defined but not used [-Werror=unused-function]Investigating...
This patch below fixes it, applying.
Thank you for fixing it! It looks good for me.
Quoted 4 lines
Jiri, this is something else for the give-me-more-ponies list for tests/make: build it on freshly provisioned systems with multiple mixes of devel packages installed ;-)
I think we can change makefile to get some combinations of config options when building perf tools.
Thank you,
Quoted 34 lines
- Arnaldo
tools/perf/util/probe-event.c +4
-1@@ -172,6 +172,7 @@ const char *kernel_get_module_path(const char *module)return (dso) ? dso->long_name :NULL ; } +#ifdef HAVE_DWARF_SUPPORT /* Copied from unwind.c */ static Elf_Scn *elf_section_by_name (Elf *elf,GElf_Ehdr *ep,GElf_Shdr *shp,const char *name)@@ -217,6 +218,7 @@ out:elf_end (elf); return ret; } +#endif static int init_user_exec (void ) {@@ -750,7 +752,8 @@ static int kprobe_convert_to_perf_probe(struct probe_trace_point *tp,static int try_to_find_probe_trace_events (struct perf_probe_event *pev,struct probe_trace_event **tevs__maybe_unused , -int max_tevs__maybe_unused ,const char *target) +int max_tevs__maybe_unused , +const char *target__maybe_unused ) {if (perf_probe_event_need_dwarf (pev)) {pr_warning ("Debuginfo-analysis is not supported.\n" );
Signature · 4 lines
Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: [email protected]
Em Tue, Jan 14, 2014 at 10:41:37AM +0900, Masami Hiramatsu escreveu:
Quoted 7 lines
Quoted 3 lines · Arnaldo Carvalho de Melo
Jiri, this is something else for the give-me-more-ponies list for tests/make: build it on freshly provisioned systems with multiple mixes of devel packages installed ;-)
I think we can change makefile to get some combinations of config options when building perf tools.
This is what:
make -C tools/perf -f tests/make
does, and we use it already, many config combos are tested, but that kinda expects that all optional devel libs be installed.
What I'm talking about is to, in addition, install the devel packages iteratively, testing those config options combos with and without installed devel packages combos.
- Arnaldo
Quoted 11 lines · Arnaldo Carvalho de Melo
Em Tue, Jan 14, 2014 at 10:41:37AM +0900, Masami Hiramatsu escreveu:
Quoted 7 lines
Quoted 3 lines · Arnaldo Carvalho de Melo
Jiri, this is something else for the give-me-more-ponies list for tests/make: build it on freshly provisioned systems with multiple mixes of devel packages installed ;-)
I think we can change makefile to get some combinations of config options when building perf tools.
This is what:
Quoted 8 lines
make -C
tools/perf-f tests/makedoes, and we use it already, many config combos are tested, but that kinda expects that all optional devel libs be installed.
What I'm talking about is to, in addition, install the devel packages iteratively, testing those config options combos with and without installed devel packages combos.
yep, sounds good.. maybe another script setting the environment (randomly, with some logic never to repeat any config?) and running tests/make suite
jirka
Em Tue, Jan 14, 2014 at 02:15:40PM +0100, Jiri Olsa escreveu:
Quoted 17 lines · Arnaldo Carvalho de Melo
Quoted 15 lines
Em Tue, Jan 14, 2014 at 10:41:37AM +0900, Masami Hiramatsu escreveu:
Quoted 7 lines
Quoted 3 lines · Arnaldo Carvalho de Melo
Jiri, this is something else for the give-me-more-ponies list for tests/make: build it on freshly provisioned systems with multiple mixes of devel packages installed ;-)
I think we can change makefile to get some combinations of config options when building perf tools.
This is what:
make -C
tools/perf-f tests/makedoes, and we use it already, many config combos are tested, but that kinda expects that all optional devel libs be installed.
Quoted 7 lines
Quoted 3 lines
What I'm talking about is to, in addition, install the devel packages iteratively, testing those config options combos with and without installed devel packages combos.
yep, sounds good.. maybe another script setting the environment (randomly, with some logic never to repeat any config?) and running tests/make suite
What I'm usually doing, from time to time, when people report problems building on some specific distro, is to install a VM with the default set of packages, then try to build perf and go on installing the strict requirements, then add the suggested libraries for features marked as OFF by the automatic feature detection mechanism.
Something that kinda replicated that, perhaps using 'mock'
(https://fedoraproject.org/wiki/Using_Mock_to_test_package_builds) or something similar, could help testing that.
- Arnaldo
Namhyung Kim
maintainerHi Arnaldo,
Quoted 9 lines · Arnaldo Carvalho de Melo
Em Tue, Jan 14, 2014 at 10:41:37AM +0900, Masami Hiramatsu escreveu:
Quoted 7 lines
Quoted 3 lines · Arnaldo Carvalho de Melo
Jiri, this is something else for the give-me-more-ponies list for tests/make: build it on freshly provisioned systems with multiple mixes of devel packages installed ;-)
I think we can change makefile to get some combinations of config options when building perf tools.
Quoted 6 lines
This is what:
make -C
tools/perf-f tests/makedoes, and we use it already, many config combos are tested, but that kinda expects that all optional devel libs be installed.
I've been thinking that the above should look like below.
make build-test (-C tools/perf)
Maybe something like this?
tools/perf/Makefile +6 -0
@@ -75,6 +75,12 @@ clean: $(make) # +# The build-test target is not really parallel, don't print the jobs info: +# +build-test: + @$(MAKE) -f tests/make --no-print-directory + +# # All other targets get passed through: # %:
Signature · 2 lines
Thanks, Namhyung
Em Wed, Jan 15, 2014 at 10:58:58AM +0900, Namhyung Kim escreveu:
Quoted 19 lines
Hi Arnaldo,
Quoted 9 lines · Arnaldo Carvalho de Melo
Em Tue, Jan 14, 2014 at 10:41:37AM +0900, Masami Hiramatsu escreveu:
Quoted 7 lines
Quoted 3 lines · Arnaldo Carvalho de Melo
Jiri, this is something else for the give-me-more-ponies list for tests/make: build it on freshly provisioned systems with multiple mixes of devel packages installed ;-)
I think we can change makefile to get some combinations of config options when building perf tools.
Quoted 6 lines
This is what:
make -C
tools/perf-f tests/makedoes, and we use it already, many config combos are tested, but that kinda expects that all optional devel libs be installed.
Quoted 6 lines
I've been thinking that the above should look like below.
make build-test (-C
tools/perf)Maybe something like this?
Haven't tested, but I think it is worth to make this a shortcut, care to test (if not yet) and resubmit with proper S-O-B, etc?
- Arnaldo
Quoted 22 lines
tools/perf/Makefile +6
-0@@ -75,6 +75,12 @@ clean: $(make) # +# The build-test target is not really parallel, don't print the jobs info: +# +build-test: + @$(MAKE) -f tests/make --no-print-directory + +# # All other targets get passed through: # %:Signature · 3 lines
-- Thanks, Namhyung
Namhyung Kim
maintainerQuoted 22 lines · Arnaldo Carvalho de Melo
Em Wed, Jan 15, 2014 at 10:58:58AM +0900, Namhyung Kim escreveu:
Quoted 21 lines
Hi Arnaldo,
Quoted 9 lines · Arnaldo Carvalho de Melo
Em Tue, Jan 14, 2014 at 10:41:37AM +0900, Masami Hiramatsu escreveu:
Quoted 7 lines
Quoted 3 lines · Arnaldo Carvalho de Melo
Jiri, this is something else for the give-me-more-ponies list for tests/make: build it on freshly provisioned systems with multiple mixes of devel packages installed ;-)
I think we can change makefile to get some combinations of config options when building perf tools.
Quoted 6 lines
This is what:
make -C
tools/perf-f tests/makedoes, and we use it already, many config combos are tested, but that kinda expects that all optional devel libs be installed.
I've been thinking that the above should look like below.
Quoted 7 lines
Quoted 4 lines
make build-test (-C
tools/perf)Maybe something like this?
Haven't tested, but I think it is worth to make this a shortcut, care to test (if not yet) and resubmit with proper S-O-B, etc?
OK, will do!
Thanks,
Namhyung