* [PATCH] perf tool: build fix, remove duplicate declarations
@ 2012-05-30 4:41 David Ahern
2012-06-01 5:22 ` David Ahern
0 siblings, 1 reply; 5+ messages in thread
From: David Ahern @ 2012-05-30 4:41 UTC (permalink / raw)
To: acme, linux-kernel; +Cc: mingo, peterz, fweisbec, paulus, tglx, David Ahern
I'm sure I have some gremlins running around today, but I am
consistently hitting this compile failure on Fedora 14 and 16:
In file included from util/sort.h:12:0,
from builtin-diff.c:15:
util/string.h:7:5: error: redundant redeclaration of ‘hex2u64’ [-Werror=redundant-decls]
util/symbol.h:32:5: note: previous declaration of ‘hex2u64’ was here
util/string.h:8:7: error: redundant redeclaration of ‘strxfrchar’ [-Werror=redundant-decls]
util/symbol.h:33:7: note: previous declaration of ‘strxfrchar’ was here
util/string.h:9:5: error: redundant redeclaration of ‘perf_atoll’ [-Werror=redundant-decls]
util/util.h:238:5: note: previous declaration of ‘perf_atoll’ was here
util/string.h:10:8: error: redundant redeclaration of ‘argv_split’ [-Werror=redundant-decls]
util/util.h:239:8: note: previous declaration of ‘argv_split’ was here
util/string.h:11:6: error: redundant redeclaration of ‘argv_free’ [-Werror=redundant-decls]
util/util.h:240:6: note: previous declaration of ‘argv_free’ was here
util/string.h:12:6: error: redundant redeclaration of ‘strglobmatch’ [-Werror=redundant-decls]
util/util.h:241:6: note: previous declaration of ‘strglobmatch’ was here
util/string.h:13:6: error: redundant redeclaration of ‘strlazymatch’ [-Werror=redundant-decls]
util/util.h:242:6: note: previous declaration of ‘strlazymatch’ was here
cc1: all warnings being treated as errors
make: *** [/tmp/pbuild/builtin-diff.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/opt/sw/ahern/perf.git/tools/perf'
Fix it by removing duplicates.
Signed-off-by: David Ahern <dsahern@gmail.com>
---
tools/perf/util/symbol.h | 4 +---
tools/perf/util/util.h | 6 +-----
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index 1f00388..4ba5206 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -9,6 +9,7 @@
#include <linux/list.h>
#include <linux/rbtree.h>
#include <stdio.h>
+#include "string.h"
#ifdef HAVE_CPLUS_DEMANGLE
extern char *cplus_demangle(const char *, int);
@@ -29,9 +30,6 @@ static inline char *bfd_demangle(void __used *v, const char __used *c,
#endif
#endif
-int hex2u64(const char *ptr, u64 *val);
-char *strxfrchar(char *s, char from, char to);
-
/*
* libelf 0.8.x and earlier do not support ELF_C_READ_MMAP;
* for newer versions we can use mmap to reduce memory usage:
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 2daaedb..5152592 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -78,6 +78,7 @@
#include "../../../include/linux/magic.h"
#include "types.h"
#include <sys/ttydefaults.h>
+#include "string.h"
extern const char *graph_line;
extern const char *graph_dotted_line;
@@ -235,11 +236,6 @@ static inline int sane_case(int x, int high)
int mkdir_p(char *path, mode_t mode);
int copyfile(const char *from, const char *to);
-s64 perf_atoll(const char *str);
-char **argv_split(const char *str, int *argcp);
-void argv_free(char **argv);
-bool strglobmatch(const char *str, const char *pat);
-bool strlazymatch(const char *str, const char *pat);
int strtailcmp(const char *s1, const char *s2);
unsigned long convert_unit(unsigned long value, char *unit);
int readn(int fd, void *buf, size_t size);
--
1.7.10.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] perf tool: build fix, remove duplicate declarations
2012-05-30 4:41 [PATCH] perf tool: build fix, remove duplicate declarations David Ahern
@ 2012-06-01 5:22 ` David Ahern
2012-06-01 13:50 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 5+ messages in thread
From: David Ahern @ 2012-06-01 5:22 UTC (permalink / raw)
To: acme; +Cc: linux-kernel, mingo, peterz, fweisbec, paulus, tglx
Arnaldo:
On 5/29/12 10:41 PM, David Ahern wrote:
> I'm sure I have some gremlins running around today, but I am
> consistently hitting this compile failure on Fedora 14 and 16:
>
> In file included from util/sort.h:12:0,
> from builtin-diff.c:15:
> util/string.h:7:5: error: redundant redeclaration of ‘hex2u64’ [-Werror=redundant-decls]
> util/symbol.h:32:5: note: previous declaration of ‘hex2u64’ was here
> util/string.h:8:7: error: redundant redeclaration of ‘strxfrchar’ [-Werror=redundant-decls]
> util/symbol.h:33:7: note: previous declaration of ‘strxfrchar’ was here
> util/string.h:9:5: error: redundant redeclaration of ‘perf_atoll’ [-Werror=redundant-decls]
> util/util.h:238:5: note: previous declaration of ‘perf_atoll’ was here
> util/string.h:10:8: error: redundant redeclaration of ‘argv_split’ [-Werror=redundant-decls]
> util/util.h:239:8: note: previous declaration of ‘argv_split’ was here
> util/string.h:11:6: error: redundant redeclaration of ‘argv_free’ [-Werror=redundant-decls]
> util/util.h:240:6: note: previous declaration of ‘argv_free’ was here
> util/string.h:12:6: error: redundant redeclaration of ‘strglobmatch’ [-Werror=redundant-decls]
> util/util.h:241:6: note: previous declaration of ‘strglobmatch’ was here
> util/string.h:13:6: error: redundant redeclaration of ‘strlazymatch’ [-Werror=redundant-decls]
> util/util.h:242:6: note: previous declaration of ‘strlazymatch’ was here
> cc1: all warnings being treated as errors
> make: *** [/tmp/pbuild/builtin-diff.o] Error 1
> make: *** Waiting for unfinished jobs....
> make: Leaving directory `/opt/sw/ahern/perf.git/tools/perf'
You are probably not hitting this compile problem, and I have no idea
why I am suddenly hitting it on F14 and F16 (my usual test servers; i
have always hit this on older systems), but nonetheless there are
duplicate declarations between util.h and symbol.h which should be fixed.
David
>
> Fix it by removing duplicates.
>
> Signed-off-by: David Ahern<dsahern@gmail.com>
> ---
> tools/perf/util/symbol.h | 4 +---
> tools/perf/util/util.h | 6 +-----
> 2 files changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
> index 1f00388..4ba5206 100644
> --- a/tools/perf/util/symbol.h
> +++ b/tools/perf/util/symbol.h
> @@ -9,6 +9,7 @@
> #include<linux/list.h>
> #include<linux/rbtree.h>
> #include<stdio.h>
> +#include "string.h"
>
> #ifdef HAVE_CPLUS_DEMANGLE
> extern char *cplus_demangle(const char *, int);
> @@ -29,9 +30,6 @@ static inline char *bfd_demangle(void __used *v, const char __used *c,
> #endif
> #endif
>
> -int hex2u64(const char *ptr, u64 *val);
> -char *strxfrchar(char *s, char from, char to);
> -
> /*
> * libelf 0.8.x and earlier do not support ELF_C_READ_MMAP;
> * for newer versions we can use mmap to reduce memory usage:
> diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
> index 2daaedb..5152592 100644
> --- a/tools/perf/util/util.h
> +++ b/tools/perf/util/util.h
> @@ -78,6 +78,7 @@
> #include "../../../include/linux/magic.h"
> #include "types.h"
> #include<sys/ttydefaults.h>
> +#include "string.h"
>
> extern const char *graph_line;
> extern const char *graph_dotted_line;
> @@ -235,11 +236,6 @@ static inline int sane_case(int x, int high)
> int mkdir_p(char *path, mode_t mode);
> int copyfile(const char *from, const char *to);
>
> -s64 perf_atoll(const char *str);
> -char **argv_split(const char *str, int *argcp);
> -void argv_free(char **argv);
> -bool strglobmatch(const char *str, const char *pat);
> -bool strlazymatch(const char *str, const char *pat);
> int strtailcmp(const char *s1, const char *s2);
> unsigned long convert_unit(unsigned long value, char *unit);
> int readn(int fd, void *buf, size_t size);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] perf tool: build fix, remove duplicate declarations
2012-06-01 5:22 ` David Ahern
@ 2012-06-01 13:50 ` Arnaldo Carvalho de Melo
2012-06-01 14:48 ` David Ahern
0 siblings, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-06-01 13:50 UTC (permalink / raw)
To: David Ahern; +Cc: linux-kernel, mingo, peterz, fweisbec, paulus, tglx
Em Thu, May 31, 2012 at 11:22:51PM -0600, David Ahern escreveu:
> Arnaldo:
>
> On 5/29/12 10:41 PM, David Ahern wrote:
> >I'm sure I have some gremlins running around today, but I am
> >consistently hitting this compile failure on Fedora 14 and 16:
> >
> >In file included from util/sort.h:12:0,
> > from builtin-diff.c:15:
> >util/string.h:7:5: error: redundant redeclaration of ‘hex2u64’ [-Werror=redundant-decls]
> >util/symbol.h:32:5: note: previous declaration of ‘hex2u64’ was here
> >util/string.h:8:7: error: redundant redeclaration of ‘strxfrchar’ [-Werror=redundant-decls]
> >util/symbol.h:33:7: note: previous declaration of ‘strxfrchar’ was here
> >util/string.h:9:5: error: redundant redeclaration of ‘perf_atoll’ [-Werror=redundant-decls]
> >util/util.h:238:5: note: previous declaration of ‘perf_atoll’ was here
> >util/string.h:10:8: error: redundant redeclaration of ‘argv_split’ [-Werror=redundant-decls]
> >util/util.h:239:8: note: previous declaration of ‘argv_split’ was here
> >util/string.h:11:6: error: redundant redeclaration of ‘argv_free’ [-Werror=redundant-decls]
> >util/util.h:240:6: note: previous declaration of ‘argv_free’ was here
> >util/string.h:12:6: error: redundant redeclaration of ‘strglobmatch’ [-Werror=redundant-decls]
> >util/util.h:241:6: note: previous declaration of ‘strglobmatch’ was here
> >util/string.h:13:6: error: redundant redeclaration of ‘strlazymatch’ [-Werror=redundant-decls]
> >util/util.h:242:6: note: previous declaration of ‘strlazymatch’ was here
> >cc1: all warnings being treated as errors
> >make: *** [/tmp/pbuild/builtin-diff.o] Error 1
> >make: *** Waiting for unfinished jobs....
> >make: Leaving directory `/opt/sw/ahern/perf.git/tools/perf'
>
> You are probably not hitting this compile problem, and I have no
Strange, I just tested on f14 x86_64 and i386, in addition to RHEL6.2,
no problems :-\
> idea why I am suddenly hitting it on F14 and F16 (my usual test
> servers; i have always hit this on older systems), but nonetheless
> there are duplicate declarations between util.h and symbol.h which
> should be fixed.
Yeah, but the patch is not applying on my perf/urgent branch, can you
take a look?
> David
>
>
> >
> >Fix it by removing duplicates.
> >
> >Signed-off-by: David Ahern<dsahern@gmail.com>
> >---
> > tools/perf/util/symbol.h | 4 +---
> > tools/perf/util/util.h | 6 +-----
> > 2 files changed, 2 insertions(+), 8 deletions(-)
> >
> >diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
> >index 1f00388..4ba5206 100644
> >--- a/tools/perf/util/symbol.h
> >+++ b/tools/perf/util/symbol.h
> >@@ -9,6 +9,7 @@
> > #include<linux/list.h>
> > #include<linux/rbtree.h>
> > #include<stdio.h>
> >+#include "string.h"
> >
> > #ifdef HAVE_CPLUS_DEMANGLE
> > extern char *cplus_demangle(const char *, int);
> >@@ -29,9 +30,6 @@ static inline char *bfd_demangle(void __used *v, const char __used *c,
> > #endif
> > #endif
> >
> >-int hex2u64(const char *ptr, u64 *val);
> >-char *strxfrchar(char *s, char from, char to);
> >-
> > /*
> > * libelf 0.8.x and earlier do not support ELF_C_READ_MMAP;
> > * for newer versions we can use mmap to reduce memory usage:
> >diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
> >index 2daaedb..5152592 100644
> >--- a/tools/perf/util/util.h
> >+++ b/tools/perf/util/util.h
> >@@ -78,6 +78,7 @@
> > #include "../../../include/linux/magic.h"
> > #include "types.h"
> > #include<sys/ttydefaults.h>
> >+#include "string.h"
> >
> > extern const char *graph_line;
> > extern const char *graph_dotted_line;
> >@@ -235,11 +236,6 @@ static inline int sane_case(int x, int high)
> > int mkdir_p(char *path, mode_t mode);
> > int copyfile(const char *from, const char *to);
> >
> >-s64 perf_atoll(const char *str);
> >-char **argv_split(const char *str, int *argcp);
> >-void argv_free(char **argv);
> >-bool strglobmatch(const char *str, const char *pat);
> >-bool strlazymatch(const char *str, const char *pat);
> > int strtailcmp(const char *s1, const char *s2);
> > unsigned long convert_unit(unsigned long value, char *unit);
> > int readn(int fd, void *buf, size_t size);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] perf tool: build fix, remove duplicate declarations
2012-06-01 13:50 ` Arnaldo Carvalho de Melo
@ 2012-06-01 14:48 ` David Ahern
0 siblings, 0 replies; 5+ messages in thread
From: David Ahern @ 2012-06-01 14:48 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, mingo, peterz, fweisbec, paulus, tglx
On 6/1/12 7:50 AM, Arnaldo Carvalho de Melo wrote:
> Strange, I just tested on f14 x86_64 and i386, in addition to RHEL6.2,
> no problems :-\
Very strange. I thought I had chased away all of the local gremlins, but
a freshly created and fully updated F16-32bit VM and an older F14-64-bit
are both hitting this.
>
>> idea why I am suddenly hitting it on F14 and F16 (my usual test
>> servers; i have always hit this on older systems), but nonetheless
>> there are duplicate declarations between util.h and symbol.h which
>> should be fixed.
>
> Yeah, but the patch is not applying on my perf/urgent branch, can you
> take a look?
the recent byteswap include. I'll re-spin.
David
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] perf tool: build fix, remove duplicate declarations
@ 2012-06-01 15:03 David Ahern
0 siblings, 0 replies; 5+ messages in thread
From: David Ahern @ 2012-06-01 15:03 UTC (permalink / raw)
To: acme, linux-kernel; +Cc: mingo, peterz, fweisbec, paulus, tglx, David Ahern
I'm sure I have some gremlins running around today, but I am
consistently hitting this compile failure on Fedora 14 and 16:
In file included from util/sort.h:12:0,
from builtin-diff.c:15:
util/string.h:7:5: error: redundant redeclaration of ‘hex2u64’ [-Werror=redundant-decls]
util/symbol.h:32:5: note: previous declaration of ‘hex2u64’ was here
util/string.h:8:7: error: redundant redeclaration of ‘strxfrchar’ [-Werror=redundant-decls]
util/symbol.h:33:7: note: previous declaration of ‘strxfrchar’ was here
util/string.h:9:5: error: redundant redeclaration of ‘perf_atoll’ [-Werror=redundant-decls]
util/util.h:238:5: note: previous declaration of ‘perf_atoll’ was here
util/string.h:10:8: error: redundant redeclaration of ‘argv_split’ [-Werror=redundant-decls]
util/util.h:239:8: note: previous declaration of ‘argv_split’ was here
util/string.h:11:6: error: redundant redeclaration of ‘argv_free’ [-Werror=redundant-decls]
util/util.h:240:6: note: previous declaration of ‘argv_free’ was here
util/string.h:12:6: error: redundant redeclaration of ‘strglobmatch’ [-Werror=redundant-decls]
util/util.h:241:6: note: previous declaration of ‘strglobmatch’ was here
util/string.h:13:6: error: redundant redeclaration of ‘strlazymatch’ [-Werror=redundant-decls]
util/util.h:242:6: note: previous declaration of ‘strlazymatch’ was here
cc1: all warnings being treated as errors
make: *** [/tmp/pbuild/builtin-diff.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/opt/sw/ahern/perf.git/tools/perf'
Fix it by removing duplicates.
Signed-off-by: David Ahern <dsahern@gmail.com>
---
tools/perf/util/symbol.h | 4 +---
tools/perf/util/util.h | 6 +-----
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index af0752b..bf4b679 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -10,6 +10,7 @@
#include <linux/rbtree.h>
#include <stdio.h>
#include <byteswap.h>
+#include "string.h"
#ifdef HAVE_CPLUS_DEMANGLE
extern char *cplus_demangle(const char *, int);
@@ -30,9 +31,6 @@ static inline char *bfd_demangle(void __used *v, const char __used *c,
#endif
#endif
-int hex2u64(const char *ptr, u64 *val);
-char *strxfrchar(char *s, char from, char to);
-
/*
* libelf 0.8.x and earlier do not support ELF_C_READ_MMAP;
* for newer versions we can use mmap to reduce memory usage:
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 2daaedb..5152592 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -78,6 +78,7 @@
#include "../../../include/linux/magic.h"
#include "types.h"
#include <sys/ttydefaults.h>
+#include "string.h"
extern const char *graph_line;
extern const char *graph_dotted_line;
@@ -235,11 +236,6 @@ static inline int sane_case(int x, int high)
int mkdir_p(char *path, mode_t mode);
int copyfile(const char *from, const char *to);
-s64 perf_atoll(const char *str);
-char **argv_split(const char *str, int *argcp);
-void argv_free(char **argv);
-bool strglobmatch(const char *str, const char *pat);
-bool strlazymatch(const char *str, const char *pat);
int strtailcmp(const char *s1, const char *s2);
unsigned long convert_unit(unsigned long value, char *unit);
int readn(int fd, void *buf, size_t size);
--
1.7.10.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-06-01 15:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-30 4:41 [PATCH] perf tool: build fix, remove duplicate declarations David Ahern
2012-06-01 5:22 ` David Ahern
2012-06-01 13:50 ` Arnaldo Carvalho de Melo
2012-06-01 14:48 ` David Ahern
-- strict thread matches above, loose matches on Subject: below --
2012-06-01 15:03 David Ahern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox