public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [tip:perf/urgent] perf tools: Fix the NO_64BIT build on pure 64-bit systems
       [not found] <tip-55621ccf2b7a8afe39df8c80f55b28424fd07d13@git.kernel.org>
@ 2009-10-13 21:09 ` Randy Dunlap
  2009-10-14  6:20   ` Ingo Molnar
  0 siblings, 1 reply; 8+ messages in thread
From: Randy Dunlap @ 2009-10-13 21:09 UTC (permalink / raw)
  To: linux-kernel, mingo, hpa, paulus, acme, a.p.zijlstra, efault,
	randy.dunlap, fweisbec, tglx, mingo
  Cc: tip-bot for Ingo Molnar, linux-tip-commits, acme, paulus, hpa,
	mingo, a.p.zijlstra, efault, fweisbec, tglx

On Mon, 12 Oct 2009 08:34:16 GMT tip-bot for Ingo Molnar wrote:

> Commit-ID:  55621ccf2b7a8afe39df8c80f55b28424fd07d13
> Gitweb:     http://git.kernel.org/tip/55621ccf2b7a8afe39df8c80f55b28424fd07d13
> Author:     Ingo Molnar <mingo@elte.hu>
> AuthorDate: Mon, 12 Oct 2009 09:57:25 +0200
> Committer:  Ingo Molnar <mingo@elte.hu>
> CommitDate: Mon, 12 Oct 2009 10:00:27 +0200
> 
> perf tools: Fix the NO_64BIT build on pure 64-bit systems
> 
> Randy Dunlap reported that 'make NO_64BIT=1' fails to build
> a pure 32-b it binary on 64-bit/64-bit x86 systems.
> 
> The reason is that we dont pass in the -m32 and GCC defaults
> to -m64.
> 
> So pass it in - and also extend the warning message about libelf
> dependencies - glibc-dev[el] is needed as well beyond the libelf
> library.

Ingo, thanks, I finally got this working, after installing more 32-bit
libs etc., like Kyle said that I would need to do.

The error message is still a little misleading/confusing:
Makefile:426: *** No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el].  Stop.

when elfutils-libelf-devel.i586 is installed but glibc-devel.i[56]86 is not
installed.  gcc failed with:
In file included from /usr/include/features.h:376,
                 from /usr/include/sys/types.h:27,
                 from /usr/include/libelf.h:53,
                 from elfdeveltest.c:1:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory


> Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Mike Galbraith <efault@gmx.de>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> LKML-Reference: Message-Id: <20091005131729.78444bfb.randy.dunlap@oracle.com>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
>  tools/perf/Makefile |   21 ++++++++++++++-------
>  1 files changed, 14 insertions(+), 7 deletions(-)
> 
> diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> index 5881943..742a32e 100644
> --- a/tools/perf/Makefile
> +++ b/tools/perf/Makefile
> @@ -157,11 +157,18 @@ uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
>  uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
>  uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
>  
> -# If we're on a 64-bit kernel, use -m64
> -ifndef NO_64BIT
> -	ifneq ($(patsubst %64,%,$(uname_M)),$(uname_M))
> -	  M64 := -m64
> -	endif
> +#
> +# Add -m32 for cross-builds:
> +#
> +ifdef NO_64BIT
> +  MBITS := -m32
> +else
> +  #
> +  # If we're on a 64-bit kernel, use -m64:
> +  #
> +  ifneq ($(patsubst %64,%,$(uname_M)),$(uname_M))
> +    MBITS := -m64
> +  endif
>  endif
>  
>  # CFLAGS and LDFLAGS are for the users to override from the command line.
> @@ -194,7 +201,7 @@ EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wold-style-definition
>  EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wstrict-prototypes
>  EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wdeclaration-after-statement
>  
> -CFLAGS = $(M64) -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -fstack-protector-all -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS)
> +CFLAGS = $(MBITS) -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -fstack-protector-all -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS)
>  LDFLAGS = -lpthread -lrt -lelf -lm
>  ALL_CFLAGS = $(CFLAGS)
>  ALL_LDFLAGS = $(LDFLAGS)
> @@ -416,7 +423,7 @@ ifeq ($(uname_S),Darwin)
>  endif
>  
>  ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y)
> -	msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel);
> +	msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el]);
>  endif
>  
>  ifdef NO_DEMANGLE


---
~Randy

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

* Re: [tip:perf/urgent] perf tools: Fix the NO_64BIT build on pure 64-bit systems
  2009-10-13 21:09 ` [tip:perf/urgent] perf tools: Fix the NO_64BIT build on pure 64-bit systems Randy Dunlap
@ 2009-10-14  6:20   ` Ingo Molnar
  2009-10-14 14:44     ` Randy Dunlap
  0 siblings, 1 reply; 8+ messages in thread
From: Ingo Molnar @ 2009-10-14  6:20 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, mingo, hpa, paulus, acme, a.p.zijlstra, efault,
	fweisbec, tglx, linux-tip-commits


* Randy Dunlap <randy.dunlap@ORACLE.COM> wrote:

> On Mon, 12 Oct 2009 08:34:16 GMT tip-bot for Ingo Molnar wrote:
> 
> > Commit-ID:  55621ccf2b7a8afe39df8c80f55b28424fd07d13
> > Gitweb:     http://git.kernel.org/tip/55621ccf2b7a8afe39df8c80f55b28424fd07d13
> > Author:     Ingo Molnar <mingo@elte.hu>
> > AuthorDate: Mon, 12 Oct 2009 09:57:25 +0200
> > Committer:  Ingo Molnar <mingo@elte.hu>
> > CommitDate: Mon, 12 Oct 2009 10:00:27 +0200
> > 
> > perf tools: Fix the NO_64BIT build on pure 64-bit systems
> > 
> > Randy Dunlap reported that 'make NO_64BIT=1' fails to build
> > a pure 32-b it binary on 64-bit/64-bit x86 systems.
> > 
> > The reason is that we dont pass in the -m32 and GCC defaults
> > to -m64.
> > 
> > So pass it in - and also extend the warning message about libelf
> > dependencies - glibc-dev[el] is needed as well beyond the libelf
> > library.
> 
> Ingo, thanks, I finally got this working, after installing more 32-bit
> libs etc., like Kyle said that I would need to do.
> 
> The error message is still a little misleading/confusing:
> Makefile:426: *** No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el].  Stop.
> 
> when elfutils-libelf-devel.i586 is installed but glibc-devel.i[56]86 is not
> installed.  gcc failed with:
> In file included from /usr/include/features.h:376,
>                  from /usr/include/sys/types.h:27,
>                  from /usr/include/libelf.h:53,
>                  from elfdeveltest.c:1:
> /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory

Why is it misleading? It says it very clearly that you need to install 
both:

  please install libelf-dev/elfutils-libelf-devel and glibc-dev[el].  Stop.

	Ingo

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

* Re: [tip:perf/urgent] perf tools: Fix the NO_64BIT build on pure 64-bit systems
  2009-10-14  6:20   ` Ingo Molnar
@ 2009-10-14 14:44     ` Randy Dunlap
  2009-10-14 15:58       ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 8+ messages in thread
From: Randy Dunlap @ 2009-10-14 14:44 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Randy Dunlap, linux-kernel, mingo, hpa, paulus, acme,
	a.p.zijlstra, efault, fweisbec, tglx, linux-tip-commits

On Wed, 14 Oct 2009 08:20:52 +0200 Ingo Molnar wrote:

> 
> * Randy Dunlap <randy.dunlap@ORACLE.COM> wrote:
> 
> > On Mon, 12 Oct 2009 08:34:16 GMT tip-bot for Ingo Molnar wrote:
> > 
> > > Commit-ID:  55621ccf2b7a8afe39df8c80f55b28424fd07d13
> > > Gitweb:     http://git.kernel.org/tip/55621ccf2b7a8afe39df8c80f55b28424fd07d13
> > > Author:     Ingo Molnar <mingo@elte.hu>
> > > AuthorDate: Mon, 12 Oct 2009 09:57:25 +0200
> > > Committer:  Ingo Molnar <mingo@elte.hu>
> > > CommitDate: Mon, 12 Oct 2009 10:00:27 +0200
> > > 
> > > perf tools: Fix the NO_64BIT build on pure 64-bit systems
> > > 
> > > Randy Dunlap reported that 'make NO_64BIT=1' fails to build
> > > a pure 32-b it binary on 64-bit/64-bit x86 systems.
> > > 
> > > The reason is that we dont pass in the -m32 and GCC defaults
> > > to -m64.
> > > 
> > > So pass it in - and also extend the warning message about libelf
> > > dependencies - glibc-dev[el] is needed as well beyond the libelf
> > > library.
> > 
> > Ingo, thanks, I finally got this working, after installing more 32-bit
> > libs etc., like Kyle said that I would need to do.
> > 
> > The error message is still a little misleading/confusing:
> > Makefile:426: *** No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el].  Stop.
> > 
> > when elfutils-libelf-devel.i586 is installed but glibc-devel.i[56]86 is not
> > installed.  gcc failed with:
> > In file included from /usr/include/features.h:376,
> >                  from /usr/include/sys/types.h:27,
> >                  from /usr/include/libelf.h:53,
> >                  from elfdeveltest.c:1:
> > /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
> 
> Why is it misleading? It says it very clearly that you need to install 
> both:
> 
>   please install libelf-dev/elfutils-libelf-devel and glibc-dev[el].  Stop.

It also says very clearly:

Makefile:426: *** No libelf.h/libelf found

which is not correct.

---
~Randy

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

* Re: [tip:perf/urgent] perf tools: Fix the NO_64BIT build on pure 64-bit systems
  2009-10-14 14:44     ` Randy Dunlap
@ 2009-10-14 15:58       ` Arnaldo Carvalho de Melo
  2009-10-14 16:01         ` Ingo Molnar
                           ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Arnaldo Carvalho de Melo @ 2009-10-14 15:58 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Ingo Molnar, linux-kernel, mingo, hpa, paulus, a.p.zijlstra,
	efault, fweisbec, tglx, linux-tip-commits

Em Wed, Oct 14, 2009 at 07:44:04AM -0700, Randy Dunlap escreveu:
> On Wed, 14 Oct 2009 08:20:52 +0200 Ingo Molnar wrote:
> 
> > 
> > * Randy Dunlap <randy.dunlap@ORACLE.COM> wrote:
> > 
> > > On Mon, 12 Oct 2009 08:34:16 GMT tip-bot for Ingo Molnar wrote:
> > > 
> > > > Commit-ID:  55621ccf2b7a8afe39df8c80f55b28424fd07d13
> > > > Gitweb:     http://git.kernel.org/tip/55621ccf2b7a8afe39df8c80f55b28424fd07d13
> > > > Author:     Ingo Molnar <mingo@elte.hu>
> > > > AuthorDate: Mon, 12 Oct 2009 09:57:25 +0200
> > > > Committer:  Ingo Molnar <mingo@elte.hu>
> > > > CommitDate: Mon, 12 Oct 2009 10:00:27 +0200
> > > > 
> > > > perf tools: Fix the NO_64BIT build on pure 64-bit systems
> > > > 
> > > > Randy Dunlap reported that 'make NO_64BIT=1' fails to build
> > > > a pure 32-b it binary on 64-bit/64-bit x86 systems.
> > > > 
> > > > The reason is that we dont pass in the -m32 and GCC defaults
> > > > to -m64.
> > > > 
> > > > So pass it in - and also extend the warning message about libelf
> > > > dependencies - glibc-dev[el] is needed as well beyond the libelf
> > > > library.
> > > 
> > > Ingo, thanks, I finally got this working, after installing more 32-bit
> > > libs etc., like Kyle said that I would need to do.
> > > 
> > > The error message is still a little misleading/confusing:
> > > Makefile:426: *** No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el].  Stop.
> > > 
> > > when elfutils-libelf-devel.i586 is installed but glibc-devel.i[56]86 is not
> > > installed.  gcc failed with:
> > > In file included from /usr/include/features.h:376,
> > >                  from /usr/include/sys/types.h:27,
> > >                  from /usr/include/libelf.h:53,
> > >                  from elfdeveltest.c:1:
> > > /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
> > 
> > Why is it misleading? It says it very clearly that you need to install 
> > both:
> > 
> >   please install libelf-dev/elfutils-libelf-devel and glibc-dev[el].  Stop.
> 
> It also says very clearly:
> 
> Makefile:426: *** No libelf.h/libelf found
> 
> which is not correct.

So the correct way is to first look for the presence of glibc-devel,
barf if its not present, then after that, do what is done now and test
for the presence of libelf.h :-\

But if one just follows the suggestion, and installs the suggested
packages, it should work, no?

- Arnaldo

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

* Re: [tip:perf/urgent] perf tools: Fix the NO_64BIT build on pure 64-bit systems
  2009-10-14 15:58       ` Arnaldo Carvalho de Melo
@ 2009-10-14 16:01         ` Ingo Molnar
  2009-10-14 16:02         ` Randy Dunlap
  2009-10-19  2:20         ` [PATCH] perf tools: better error messages on missing packages Randy Dunlap
  2 siblings, 0 replies; 8+ messages in thread
From: Ingo Molnar @ 2009-10-14 16:01 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Randy Dunlap, linux-kernel, mingo, hpa, paulus, a.p.zijlstra,
	efault, fweisbec, tglx, linux-tip-commits


* Arnaldo Carvalho de Melo <acme@redhat.com> wrote:

> Em Wed, Oct 14, 2009 at 07:44:04AM -0700, Randy Dunlap escreveu:
> > On Wed, 14 Oct 2009 08:20:52 +0200 Ingo Molnar wrote:
> > 
> > > 
> > > * Randy Dunlap <randy.dunlap@ORACLE.COM> wrote:
> > > 
> > > > On Mon, 12 Oct 2009 08:34:16 GMT tip-bot for Ingo Molnar wrote:
> > > > 
> > > > > Commit-ID:  55621ccf2b7a8afe39df8c80f55b28424fd07d13
> > > > > Gitweb:     http://git.kernel.org/tip/55621ccf2b7a8afe39df8c80f55b28424fd07d13
> > > > > Author:     Ingo Molnar <mingo@elte.hu>
> > > > > AuthorDate: Mon, 12 Oct 2009 09:57:25 +0200
> > > > > Committer:  Ingo Molnar <mingo@elte.hu>
> > > > > CommitDate: Mon, 12 Oct 2009 10:00:27 +0200
> > > > > 
> > > > > perf tools: Fix the NO_64BIT build on pure 64-bit systems
> > > > > 
> > > > > Randy Dunlap reported that 'make NO_64BIT=1' fails to build
> > > > > a pure 32-b it binary on 64-bit/64-bit x86 systems.
> > > > > 
> > > > > The reason is that we dont pass in the -m32 and GCC defaults
> > > > > to -m64.
> > > > > 
> > > > > So pass it in - and also extend the warning message about libelf
> > > > > dependencies - glibc-dev[el] is needed as well beyond the libelf
> > > > > library.
> > > > 
> > > > Ingo, thanks, I finally got this working, after installing more 32-bit
> > > > libs etc., like Kyle said that I would need to do.
> > > > 
> > > > The error message is still a little misleading/confusing:
> > > > Makefile:426: *** No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el].  Stop.
> > > > 
> > > > when elfutils-libelf-devel.i586 is installed but glibc-devel.i[56]86 is not
> > > > installed.  gcc failed with:
> > > > In file included from /usr/include/features.h:376,
> > > >                  from /usr/include/sys/types.h:27,
> > > >                  from /usr/include/libelf.h:53,
> > > >                  from elfdeveltest.c:1:
> > > > /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
> > > 
> > > Why is it misleading? It says it very clearly that you need to install 
> > > both:
> > > 
> > >   please install libelf-dev/elfutils-libelf-devel and glibc-dev[el].  Stop.
> > 
> > It also says very clearly:
> > 
> > Makefile:426: *** No libelf.h/libelf found
> > 
> > which is not correct.
> 
> So the correct way is to first look for the presence of glibc-devel, 
> barf if its not present, then after that, do what is done now and test 
> for the presence of libelf.h :-\
> 
> But if one just follows the suggestion, and installs the suggested 
> packages, it should work, no?

well .. send me a patch that makes the message more ambigious, so that 
we output something like:

> Makefile:426: *** No ELF support found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el].  Stop.

that should make it useful enough, without complicating the make rules.

	Ingo

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

* Re: [tip:perf/urgent] perf tools: Fix the NO_64BIT build on pure 64-bit systems
  2009-10-14 15:58       ` Arnaldo Carvalho de Melo
  2009-10-14 16:01         ` Ingo Molnar
@ 2009-10-14 16:02         ` Randy Dunlap
  2009-10-19  2:20         ` [PATCH] perf tools: better error messages on missing packages Randy Dunlap
  2 siblings, 0 replies; 8+ messages in thread
From: Randy Dunlap @ 2009-10-14 16:02 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, linux-kernel, mingo, hpa, paulus, a.p.zijlstra,
	efault, fweisbec, tglx, linux-tip-commits

On Wed, 14 Oct 2009 12:58:48 -0300 Arnaldo Carvalho de Melo wrote:

> Em Wed, Oct 14, 2009 at 07:44:04AM -0700, Randy Dunlap escreveu:
> > On Wed, 14 Oct 2009 08:20:52 +0200 Ingo Molnar wrote:
> > 
> > > 
> > > * Randy Dunlap <randy.dunlap@ORACLE.COM> wrote:
> > > 
> > > > On Mon, 12 Oct 2009 08:34:16 GMT tip-bot for Ingo Molnar wrote:
> > > > 
> > > > > Commit-ID:  55621ccf2b7a8afe39df8c80f55b28424fd07d13
> > > > > Gitweb:     http://git.kernel.org/tip/55621ccf2b7a8afe39df8c80f55b28424fd07d13
> > > > > Author:     Ingo Molnar <mingo@elte.hu>
> > > > > AuthorDate: Mon, 12 Oct 2009 09:57:25 +0200
> > > > > Committer:  Ingo Molnar <mingo@elte.hu>
> > > > > CommitDate: Mon, 12 Oct 2009 10:00:27 +0200
> > > > > 
> > > > > perf tools: Fix the NO_64BIT build on pure 64-bit systems
> > > > > 
> > > > > Randy Dunlap reported that 'make NO_64BIT=1' fails to build
> > > > > a pure 32-b it binary on 64-bit/64-bit x86 systems.
> > > > > 
> > > > > The reason is that we dont pass in the -m32 and GCC defaults
> > > > > to -m64.
> > > > > 
> > > > > So pass it in - and also extend the warning message about libelf
> > > > > dependencies - glibc-dev[el] is needed as well beyond the libelf
> > > > > library.
> > > > 
> > > > Ingo, thanks, I finally got this working, after installing more 32-bit
> > > > libs etc., like Kyle said that I would need to do.
> > > > 
> > > > The error message is still a little misleading/confusing:
> > > > Makefile:426: *** No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el].  Stop.
> > > > 
> > > > when elfutils-libelf-devel.i586 is installed but glibc-devel.i[56]86 is not
> > > > installed.  gcc failed with:
> > > > In file included from /usr/include/features.h:376,
> > > >                  from /usr/include/sys/types.h:27,
> > > >                  from /usr/include/libelf.h:53,
> > > >                  from elfdeveltest.c:1:
> > > > /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
> > > 
> > > Why is it misleading? It says it very clearly that you need to install 
> > > both:
> > > 
> > >   please install libelf-dev/elfutils-libelf-devel and glibc-dev[el].  Stop.
> > 
> > It also says very clearly:
> > 
> > Makefile:426: *** No libelf.h/libelf found
> > 
> > which is not correct.
> 
> So the correct way is to first look for the presence of glibc-devel,
> barf if its not present, then after that, do what is done now and test
> for the presence of libelf.h :-\
> 
> But if one just follows the suggestion, and installs the suggested
> packages, it should work, no?

Yes, it's just the confusing message...


---
~Randy

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

* [PATCH] perf tools: better error messages on missing packages
  2009-10-14 15:58       ` Arnaldo Carvalho de Melo
  2009-10-14 16:01         ` Ingo Molnar
  2009-10-14 16:02         ` Randy Dunlap
@ 2009-10-19  2:20         ` Randy Dunlap
  2009-10-19  8:42           ` [tip:perf/core] perf tools: Display " tip-bot for Randy Dunlap
  2 siblings, 1 reply; 8+ messages in thread
From: Randy Dunlap @ 2009-10-19  2:20 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, linux-kernel, mingo, hpa, paulus, a.p.zijlstra,
	efault, fweisbec, tglx

From: Randy Dunlap <randy.dunlap@oracle.com>

Check for libelf headers and glibc headers separately so that
the error message correctly identifies which package
installation is missing/needed.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 tools/perf/Makefile |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- lnx-2632-rc5.orig/tools/perf/Makefile
+++ lnx-2632-rc5/tools/perf/Makefile
@@ -422,8 +422,12 @@ ifeq ($(uname_S),Darwin)
 	PTHREAD_LIBS =
 endif
 
+ifneq ($(shell sh -c "(echo '\#include <gnu/libc-version.h>'; echo 'int main(void) { const char * version = gnu_get_libc_version(); return (long)version; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y)
+	msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]);
+endif
+
 ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y)
-	msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el]);
+	msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel);
 endif
 
 ifdef NO_DEMANGLE

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

* [tip:perf/core] perf tools: Display better error messages on missing packages
  2009-10-19  2:20         ` [PATCH] perf tools: better error messages on missing packages Randy Dunlap
@ 2009-10-19  8:42           ` tip-bot for Randy Dunlap
  0 siblings, 0 replies; 8+ messages in thread
From: tip-bot for Randy Dunlap @ 2009-10-19  8:42 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, acme, hpa, mingo, tglx, randy.dunlap, mingo

Commit-ID:  1abc7f5500fff8422f34826a006648d8741d83d3
Gitweb:     http://git.kernel.org/tip/1abc7f5500fff8422f34826a006648d8741d83d3
Author:     Randy Dunlap <randy.dunlap@oracle.com>
AuthorDate: Sun, 18 Oct 2009 19:20:24 -0700
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 19 Oct 2009 10:06:37 +0200

perf tools: Display better error messages on missing packages

Check for libelf headers and glibc headers separately so that
the error message correctly identifies which package
installation is missing/needed.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: paulus@samba.org
Cc: a.p.zijlstra@chello.nl
Cc: efault@gmx.de
Cc: fweisbec@gmail.com
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <4ADBCCE8.3060300@oracle.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 tools/perf/Makefile |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 2400e50..db89a6d 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -431,8 +431,12 @@ ifeq ($(uname_S),Darwin)
 	PTHREAD_LIBS =
 endif
 
+ifneq ($(shell sh -c "(echo '\#include <gnu/libc-version.h>'; echo 'int main(void) { const char * version = gnu_get_libc_version(); return (long)version; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y)
+	msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]);
+endif
+
 ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y)
-	msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el]);
+	msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel);
 endif
 
 ifdef NO_DEMANGLE

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

end of thread, other threads:[~2009-10-19  8:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <tip-55621ccf2b7a8afe39df8c80f55b28424fd07d13@git.kernel.org>
2009-10-13 21:09 ` [tip:perf/urgent] perf tools: Fix the NO_64BIT build on pure 64-bit systems Randy Dunlap
2009-10-14  6:20   ` Ingo Molnar
2009-10-14 14:44     ` Randy Dunlap
2009-10-14 15:58       ` Arnaldo Carvalho de Melo
2009-10-14 16:01         ` Ingo Molnar
2009-10-14 16:02         ` Randy Dunlap
2009-10-19  2:20         ` [PATCH] perf tools: better error messages on missing packages Randy Dunlap
2009-10-19  8:42           ` [tip:perf/core] perf tools: Display " tip-bot for Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox