Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1293603
| From | Josh Poimboeuf <jpoimboe@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 7/9] perf: Finalize subcmd independence |
| Date | 2015-12-17 05:20 +0100 |
| Message-ID | <qGycN-2NA-3@gated-at.bofh.it> (permalink) |
| References | <qG01r-68o-3@gated-at.bofh.it> <qG01s-68o-19@gated-at.bofh.it> <qGv5g-DM-3@gated-at.bofh.it> <qGvoB-108-9@gated-at.bofh.it> <qGvyi-13b-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Dec 16, 2015 at 10:27:11PM -0300, Arnaldo Carvalho de Melo wrote: > Em Wed, Dec 16, 2015 at 07:09:53PM -0600, Josh Poimboeuf escreveu: > > On Wed, Dec 16, 2015 at 09:57:41PM -0300, Arnaldo Carvalho de Melo wrote: > > > Em Tue, Dec 15, 2015 at 09:39:38AM -0600, Josh Poimboeuf escreveu: > > > > For the files that will be moved to the subcmd library, remove all their > > > > perf-specific includes and duplicate any needed functionality. > > > > > > Breaks rhel6.7 building: > > > > > > > > > > > +typedef uint64_t u64; > > > > + > > > > > > > > > [acme@sandy linux]$ cat /etc/redhat-release > > > Red Hat Enterprise Linux Server release 6.7 (Santiago) > > > > > > CC /tmp/build/perf/parse-options.o > > > parse-options.c:15: error: redefinition of typedef ‘u64’ > > > /home/acme/git/linux/tools/include/linux/types.h:28: note: previous > > > declaration of ‘u64’ was here > > > mv: cannot stat `/tmp/build/perf/.parse-options.o.tmp': No such file or > > > directory > > > make[3]: *** [/tmp/build/perf/parse-options.o] Error 1 > > > make[2]: *** [/tmp/build/perf/libsubcmd-in.o] Error 2 > > > make[1]: *** [/tmp/build/perf/libsubcmd.a] Error 2 > > > make[1]: *** Waiting for unfinished jobs.... > > > MKDIR /tmp/build/perf/util/ > > > > Does this fix it? > > Yes, and it continues to build on fedora 21. > > - Arnaldo > > > ---8<--- > > > > diff --git a/tools/lib/subcmd/parse-options.c b/tools/lib/subcmd/parse-options.c > > index f424027..981bb44 100644 > > --- a/tools/lib/subcmd/parse-options.c > > +++ b/tools/lib/subcmd/parse-options.c > > @@ -1,4 +1,5 @@ > > #include <linux/compiler.h> > > +#include <linux/types.h> > > #include <stdio.h> > > #include <stdlib.h> > > #include <stdint.h> > > @@ -12,8 +13,6 @@ > > #define OPT_SHORT 1 > > #define OPT_UNSET 2 > > > > -typedef uint64_t u64; > > - > > char *error_buf; > > > > static int opterror(const struct option *opt, const char *reason, int flags) Here's the same patch but without the unnecessary addition of the <linux/types.h> include. Ideally it would be folded into "perf tools: Finalize subcmd independence" but in case it's too late for that, I added a changelog. ---8<--- Subject: [PATCH] tools subcmd: Fix 'u64' build error with older compilers Arnaldo reported the following error when building perf on RHEL 6.7: parse-options.c:15: error: redefinition of typedef ‘u64’ /home/acme/git/linux/tools/include/linux/types.h:28: note: previous declaration of ‘u64’ was here The parse-options.c file includes <linux/compiler.h>, which includes <linux/types.h>, which has a u64 typedef. So the u64 typedef in parse-options.c is unnecessary (and seems to trigger the above error on compilers which don't allow duplicate typedefs). Reported-by: Arnaldo Carvalho de Melo <acme@kernel.org> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> --- tools/lib/subcmd/parse-options.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/lib/subcmd/parse-options.c b/tools/lib/subcmd/parse-options.c index f424027..c0c911a 100644 --- a/tools/lib/subcmd/parse-options.c +++ b/tools/lib/subcmd/parse-options.c @@ -12,8 +12,6 @@ #define OPT_SHORT 1 #define OPT_UNSET 2 -typedef uint64_t u64; - char *error_buf; static int opterror(const struct option *opt, const char *reason, int flags) -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 7/9] perf: Finalize subcmd independence Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-15 16:50 +0100
Re: [PATCH v4 7/9] perf: Finalize subcmd independence Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 02:00 +0100
Re: [PATCH v4 7/9] perf: Finalize subcmd independence Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-17 02:20 +0100
Re: [PATCH v4 7/9] perf: Finalize subcmd independence Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-17 02:30 +0100
Re: [PATCH v4 7/9] perf: Finalize subcmd independence Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-17 05:20 +0100
[tip:perf/core] perf tools: Finalize subcmd independence tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2015-12-18 10:00 +0100
csiph-web