All of lore.kernel.org
 help / color / mirror / Atom feed
* perf probe: Build error with missing libraries
@ 2014-01-13 18:04 Arnaldo Carvalho de Melo
  2014-01-13 18:14 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-01-13 18:04 UTC (permalink / raw)
  To: Masami Hiramatsu; +Cc: Jiri Olsa, Linux Kernel Mailing List

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.o
util/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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: perf probe: Build error with missing libraries
  2014-01-13 18:04 perf probe: Build error with missing libraries Arnaldo Carvalho de Melo
@ 2014-01-13 18:14 ` Arnaldo Carvalho de Melo
  2014-01-14  1:41   ` Masami Hiramatsu
  0 siblings, 1 reply; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-01-13 18:14 UTC (permalink / raw)
  To: Masami Hiramatsu; +Cc: Jiri Olsa, Linux Kernel Mailing List

Em Mon, Jan 13, 2014 at 03:04:00PM -0300, Arnaldo Carvalho de Melo escreveu:
> 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

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 86ed858..a4ee6b4 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -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");

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: perf probe: Build error with missing libraries
  2014-01-13 18:14 ` Arnaldo Carvalho de Melo
@ 2014-01-14  1:41   ` Masami Hiramatsu
  2014-01-14 13:09     ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 9+ messages in thread
From: Masami Hiramatsu @ 2014-01-14  1:41 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: Jiri Olsa, Linux Kernel Mailing List

(2014/01/14 3:14), Arnaldo Carvalho de Melo wrote:
> Em Mon, Jan 13, 2014 at 03:04:00PM -0300, Arnaldo Carvalho de Melo escreveu:
>> 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.

Thank you for fixing it! It looks good for me.

Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>


> 
> 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,

> 
> - Arnaldo
> 
> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> index 86ed858..a4ee6b4 100644
> --- a/tools/perf/util/probe-event.c
> +++ b/tools/perf/util/probe-event.c
> @@ -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
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: perf probe: Build error with missing libraries
  2014-01-14  1:41   ` Masami Hiramatsu
@ 2014-01-14 13:09     ` Arnaldo Carvalho de Melo
  2014-01-14 13:15       ` Jiri Olsa
  2014-01-15  1:58       ` Namhyung Kim
  0 siblings, 2 replies; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-01-14 13:09 UTC (permalink / raw)
  To: Masami Hiramatsu; +Cc: Jiri Olsa, Linux Kernel Mailing List

Em Tue, Jan 14, 2014 at 10:41:37AM +0900, Masami Hiramatsu escreveu:
> (2014/01/14 3:14), Arnaldo Carvalho de Melo wrote:
> > 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: perf probe: Build error with missing libraries
  2014-01-14 13:09     ` Arnaldo Carvalho de Melo
@ 2014-01-14 13:15       ` Jiri Olsa
  2014-01-14 14:21         ` Arnaldo Carvalho de Melo
  2014-01-15  1:58       ` Namhyung Kim
  1 sibling, 1 reply; 9+ messages in thread
From: Jiri Olsa @ 2014-01-14 13:15 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: Masami Hiramatsu, Linux Kernel Mailing List

On Tue, Jan 14, 2014 at 10:09:07AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Tue, Jan 14, 2014 at 10:41:37AM +0900, Masami Hiramatsu escreveu:
> > (2014/01/14 3:14), Arnaldo Carvalho de Melo wrote:
> > > 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.

yep, sounds good.. maybe another script setting the environment
(randomly, with some logic never to repeat any config?) and running
tests/make suite

jirka

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: perf probe: Build error with missing libraries
  2014-01-14 13:15       ` Jiri Olsa
@ 2014-01-14 14:21         ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-01-14 14:21 UTC (permalink / raw)
  To: Jiri Olsa; +Cc: Masami Hiramatsu, Linux Kernel Mailing List

Em Tue, Jan 14, 2014 at 02:15:40PM +0100, Jiri Olsa escreveu:
> On Tue, Jan 14, 2014 at 10:09:07AM -0300, Arnaldo Carvalho de Melo wrote:
> > Em Tue, Jan 14, 2014 at 10:41:37AM +0900, Masami Hiramatsu escreveu:
> > > (2014/01/14 3:14), Arnaldo Carvalho de Melo wrote:
> > > > 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.

> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: perf probe: Build error with missing libraries
  2014-01-14 13:09     ` Arnaldo Carvalho de Melo
  2014-01-14 13:15       ` Jiri Olsa
@ 2014-01-15  1:58       ` Namhyung Kim
  2014-01-15 18:38         ` Arnaldo Carvalho de Melo
  1 sibling, 1 reply; 9+ messages in thread
From: Namhyung Kim @ 2014-01-15  1:58 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Masami Hiramatsu, Jiri Olsa, Linux Kernel Mailing List

Hi Arnaldo,

On Tue, 14 Jan 2014 10:09:07 -0300, Arnaldo Carvalho de Melo wrote:
> Em Tue, Jan 14, 2014 at 10:41:37AM +0900, Masami Hiramatsu escreveu:
>> (2014/01/14 3:14), Arnaldo Carvalho de Melo wrote:
>> > 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.

I've been thinking that the above should look like below.

  make build-test (-C tools/perf)


Maybe something like this?


diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index eefb9fb0c02f..e110c2a2ade1 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -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:
 #
 %:

-- 
Thanks,
Namhyung

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: perf probe: Build error with missing libraries
  2014-01-15  1:58       ` Namhyung Kim
@ 2014-01-15 18:38         ` Arnaldo Carvalho de Melo
  2014-01-16  1:26           ` Namhyung Kim
  0 siblings, 1 reply; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-01-15 18:38 UTC (permalink / raw)
  To: Namhyung Kim; +Cc: Masami Hiramatsu, Jiri Olsa, Linux Kernel Mailing List

Em Wed, Jan 15, 2014 at 10:58:58AM +0900, Namhyung Kim escreveu:
> Hi Arnaldo,
> 
> On Tue, 14 Jan 2014 10:09:07 -0300, Arnaldo Carvalho de Melo wrote:
> > Em Tue, Jan 14, 2014 at 10:41:37AM +0900, Masami Hiramatsu escreveu:
> >> (2014/01/14 3:14), Arnaldo Carvalho de Melo wrote:
> >> > 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.
> 
> 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
 
> 
> diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> index eefb9fb0c02f..e110c2a2ade1 100644
> --- a/tools/perf/Makefile
> +++ b/tools/perf/Makefile
> @@ -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:
>  #
>  %:
> 
> -- 
> Thanks,
> Namhyung

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: perf probe: Build error with missing libraries
  2014-01-15 18:38         ` Arnaldo Carvalho de Melo
@ 2014-01-16  1:26           ` Namhyung Kim
  0 siblings, 0 replies; 9+ messages in thread
From: Namhyung Kim @ 2014-01-16  1:26 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Masami Hiramatsu, Jiri Olsa, Linux Kernel Mailing List

On Wed, 15 Jan 2014 15:38:56 -0300, Arnaldo Carvalho de Melo wrote:
> Em Wed, Jan 15, 2014 at 10:58:58AM +0900, Namhyung Kim escreveu:
>> Hi Arnaldo,
>> 
>> On Tue, 14 Jan 2014 10:09:07 -0300, Arnaldo Carvalho de Melo wrote:
>> > Em Tue, Jan 14, 2014 at 10:41:37AM +0900, Masami Hiramatsu escreveu:
>> >> (2014/01/14 3:14), Arnaldo Carvalho de Melo wrote:
>> >> > 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.
>> 
>> 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?

OK, will do!

Thanks,
Namhyung

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-01-16  1:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-13 18:04 perf probe: Build error with missing libraries Arnaldo Carvalho de Melo
2014-01-13 18:14 ` Arnaldo Carvalho de Melo
2014-01-14  1:41   ` Masami Hiramatsu
2014-01-14 13:09     ` Arnaldo Carvalho de Melo
2014-01-14 13:15       ` Jiri Olsa
2014-01-14 14:21         ` Arnaldo Carvalho de Melo
2014-01-15  1:58       ` Namhyung Kim
2014-01-15 18:38         ` Arnaldo Carvalho de Melo
2014-01-16  1:26           ` Namhyung Kim

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.