All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-fsl-arm][PATCH] linux-imx: Add a patch to fix perf compilation issue.
@ 2012-12-18 13:59 Noor, Ahsan
  2012-12-18 14:53 ` Andrei Gherzan
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Noor, Ahsan @ 2012-12-18 13:59 UTC (permalink / raw)
  To: meta-freescale

From: Noor Ahsan <noor_ahsan@mentor.com>

* Perf build fails with GNU C library version 2.16. It give
undefined reference for RUSAGE_SELF and storage size of 'ru'
 in builtin-sched.c.
* Fixed issue by adding time.h and resource.h headerfiles in builtin-sched.c.

Signed-off-by: Noor Ahsan <noor_ahsan@mentor.com>
---
 .../linux/linux-imx/fix_of_getrusage.patch         |   11 +++++++++++
 recipes-kernel/linux/linux-imx_3.0.35.bb           |    3 +++
 2 files changed, 14 insertions(+)

diff --git a/recipes-kernel/linux/linux-imx/fix_of_getrusage.patch b/recipes-kernel/linux/linux-imx/fix_of_getrusage.patch
new file mode 100644
index 0000000..4d3faa8
--- /dev/null
+++ b/recipes-kernel/linux/linux-imx/fix_of_getrusage.patch
@@ -0,0 +1,11 @@
+--- git/tools/perf/builtin-sched_orig.c	2012-12-11 15:18:58.000000000 +0500
++++ git/tools/perf/builtin-sched.c	2012-12-11 15:22:43.302782244 +0500
+@@ -14,6 +14,8 @@
+ #include "util/debug.h"
+ 
+ #include <sys/prctl.h>
++#include <sys/time.h>
++#include <sys/resource.h>
+ 
+ #include <semaphore.h>
+ #include <pthread.h>
diff --git a/recipes-kernel/linux/linux-imx_3.0.35.bb b/recipes-kernel/linux/linux-imx_3.0.35.bb
index 4aa5f08..a3235e8 100644
--- a/recipes-kernel/linux/linux-imx_3.0.35.bb
+++ b/recipes-kernel/linux/linux-imx_3.0.35.bb
@@ -13,3 +13,6 @@ LOCALVERSION = "-12.09.01+yocto"
 
 # iMX6Q SabreLITE changes done by Boundary Devices
 SRC_URI_append_imx6qsabrelite = " file://sync-boundary-changes.patch"
+
+SRC_URI += "file://fix_of_getrusage.patch \
+           "
-- 
1.7.9.5



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

* Re: [meta-fsl-arm][PATCH] linux-imx: Add a patch to fix perf compilation issue.
  2012-12-18 13:59 [meta-fsl-arm][PATCH] linux-imx: Add a patch to fix perf compilation issue Noor, Ahsan
@ 2012-12-18 14:53 ` Andrei Gherzan
  2012-12-18 15:27   ` Otavio Salvador
  2012-12-18 15:27 ` Daiane Angolini
  2012-12-18 16:09 ` Otavio Salvador
  2 siblings, 1 reply; 6+ messages in thread
From: Andrei Gherzan @ 2012-12-18 14:53 UTC (permalink / raw)
  To: Noor, Ahsan; +Cc: meta-freescale

[-- Attachment #1: Type: text/plain, Size: 483 bytes --]

On Tue, Dec 18, 2012 at 3:59 PM, Noor, Ahsan <noor_ahsan@mentor.com> wrote:

> From: Noor Ahsan <noor_ahsan@mentor.com>
>
> * Perf build fails with GNU C library version 2.16. It give
> undefined reference for RUSAGE_SELF and storage size of 'ru'
>  in builtin-sched.c.
> * Fixed issue by adding time.h and resource.h headerfiles in
> builtin-sched.c.
>

I just finished a build with linux-imx + eglibc 2.16. No error.

Could this be generated by something else?

ag

[-- Attachment #2: Type: text/html, Size: 945 bytes --]

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

* Re: [meta-fsl-arm][PATCH] linux-imx: Add a patch to fix perf compilation issue.
  2012-12-18 13:59 [meta-fsl-arm][PATCH] linux-imx: Add a patch to fix perf compilation issue Noor, Ahsan
  2012-12-18 14:53 ` Andrei Gherzan
@ 2012-12-18 15:27 ` Daiane Angolini
  2012-12-18 16:09 ` Otavio Salvador
  2 siblings, 0 replies; 6+ messages in thread
From: Daiane Angolini @ 2012-12-18 15:27 UTC (permalink / raw)
  To: Noor, Ahsan; +Cc: meta-freescale

On 12/18/2012 11:59 AM, Noor, Ahsan wrote:
> diff --git a/recipes-kernel/linux/linux-imx_3.0.35.bb b/recipes-kernel/linux/linux-imx_3.0.35.bb
> index 4aa5f08..a3235e8 100644
> --- a/recipes-kernel/linux/linux-imx_3.0.35.bb
> +++ b/recipes-kernel/linux/linux-imx_3.0.35.bb
> @@ -13,3 +13,6 @@ LOCALVERSION = "-12.09.01+yocto"
>
>   # iMX6Q SabreLITE changes done by Boundary Devices
>   SRC_URI_append_imx6qsabrelite = " file://sync-boundary-changes.patch"
> +
> +SRC_URI += "file://fix_of_getrusage.patch \
> +           "
It's missing a BUMP here.

Daiane





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

* Re: [meta-fsl-arm][PATCH] linux-imx: Add a patch to fix perf compilation issue.
  2012-12-18 14:53 ` Andrei Gherzan
@ 2012-12-18 15:27   ` Otavio Salvador
  0 siblings, 0 replies; 6+ messages in thread
From: Otavio Salvador @ 2012-12-18 15:27 UTC (permalink / raw)
  To: Andrei Gherzan; +Cc: meta-freescale

On Tue, Dec 18, 2012 at 12:53 PM, Andrei Gherzan <andrei@gherzan.ro> wrote:
> On Tue, Dec 18, 2012 at 3:59 PM, Noor, Ahsan <noor_ahsan@mentor.com> wrote:
>>
>> From: Noor Ahsan <noor_ahsan@mentor.com>
>>
>> * Perf build fails with GNU C library version 2.16. It give
>> undefined reference for RUSAGE_SELF and storage size of 'ru'
>>  in builtin-sched.c.
>> * Fixed issue by adding time.h and resource.h headerfiles in
>> builtin-sched.c.
>
>
> I just finished a build with linux-imx + eglibc 2.16. No error.
>
> Could this be generated by something else?

Same here. I am curious why you're getting different results than us.

Please check the build log so we confirm the GCC params being passed ...

--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br


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

* Re: [meta-fsl-arm][PATCH] linux-imx: Add a patch to fix perf compilation issue.
  2012-12-18 13:59 [meta-fsl-arm][PATCH] linux-imx: Add a patch to fix perf compilation issue Noor, Ahsan
  2012-12-18 14:53 ` Andrei Gherzan
  2012-12-18 15:27 ` Daiane Angolini
@ 2012-12-18 16:09 ` Otavio Salvador
  2012-12-19  7:58   ` Ahsan, Noor
  2 siblings, 1 reply; 6+ messages in thread
From: Otavio Salvador @ 2012-12-18 16:09 UTC (permalink / raw)
  To: Noor, Ahsan; +Cc: meta-freescale

On Tue, Dec 18, 2012 at 11:59 AM, Noor, Ahsan <noor_ahsan@mentor.com> wrote:
> From: Noor Ahsan <noor_ahsan@mentor.com>
>
> * Perf build fails with GNU C library version 2.16. It give
> undefined reference for RUSAGE_SELF and storage size of 'ru'
>  in builtin-sched.c.
> * Fixed issue by adding time.h and resource.h headerfiles in builtin-sched.c.
>
> Signed-off-by: Noor Ahsan <noor_ahsan@mentor.com>

Checking the kernel sources it seems the only required header is
resource.h, as stated in:

commit 7b78f13603c6fcb64e020a0bbe31a651ea2b657b
Author: Markus Trippelsdorf <markus@trippelsdorf.de>
Date:   Wed Apr 4 10:45:27 2012 +0200

    perf tools: Fix getrusage() related build failure on glibc trunk

    On a system running glibc trunk perf doesn't build:

        CC builtin-sched.o
    builtin-sched.c: In function ‘get_cpu_usage_nsec_parent’:
builtin-sched.c:399:16: error: storage
        [...]

    Fix it by including sys/resource.h.

    Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/r/20120404084527.GA294@x4
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

Please use this patch, add a Upstream-Status header in the patch and
also bump PR.

Regards,

--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br


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

* Re: [meta-fsl-arm][PATCH] linux-imx: Add a patch to fix perf compilation issue.
  2012-12-18 16:09 ` Otavio Salvador
@ 2012-12-19  7:58   ` Ahsan, Noor
  0 siblings, 0 replies; 6+ messages in thread
From: Ahsan, Noor @ 2012-12-19  7:58 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale

Hello,

Thanks for your input. I'll send another patch. In order to reproduce it you need to build perf not linux-imx.

Regards,
Noor

-----Original Message-----
From: otavio.salvador@gmail.com [mailto:otavio.salvador@gmail.com] On Behalf Of Otavio Salvador
Sent: Tuesday, December 18, 2012 9:09 PM
To: Ahsan, Noor
Cc: meta-freescale@yoctoproject.org
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH] linux-imx: Add a patch to fix perf compilation issue.

On Tue, Dec 18, 2012 at 11:59 AM, Noor, Ahsan <noor_ahsan@mentor.com> wrote:
> From: Noor Ahsan <noor_ahsan@mentor.com>
>
> * Perf build fails with GNU C library version 2.16. It give undefined 
> reference for RUSAGE_SELF and storage size of 'ru'
>  in builtin-sched.c.
> * Fixed issue by adding time.h and resource.h headerfiles in builtin-sched.c.
>
> Signed-off-by: Noor Ahsan <noor_ahsan@mentor.com>

Checking the kernel sources it seems the only required header is resource.h, as stated in:

commit 7b78f13603c6fcb64e020a0bbe31a651ea2b657b
Author: Markus Trippelsdorf <markus@trippelsdorf.de>
Date:   Wed Apr 4 10:45:27 2012 +0200

    perf tools: Fix getrusage() related build failure on glibc trunk

    On a system running glibc trunk perf doesn't build:

        CC builtin-sched.o
    builtin-sched.c: In function 'get_cpu_usage_nsec_parent':
builtin-sched.c:399:16: error: storage
        [...]

    Fix it by including sys/resource.h.

    Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/r/20120404084527.GA294@x4
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

Please use this patch, add a Upstream-Status header in the patch and also bump PR.

Regards,

--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br


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

end of thread, other threads:[~2012-12-19  7:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-18 13:59 [meta-fsl-arm][PATCH] linux-imx: Add a patch to fix perf compilation issue Noor, Ahsan
2012-12-18 14:53 ` Andrei Gherzan
2012-12-18 15:27   ` Otavio Salvador
2012-12-18 15:27 ` Daiane Angolini
2012-12-18 16:09 ` Otavio Salvador
2012-12-19  7:58   ` Ahsan, Noor

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.