Bug 3993

Summary: perf using host includes
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Jack Mitchell <jack>
Component: kernelAssignee: Tom Zanussi <tom.zanussi>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: bruce.ashfield, dvhart, tom.zanussi
Version: unspecified   
Target Milestone: 1.4 M6   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
perf do_compile log none

Description Jack Mitchell 2013-03-07 16:10:35 UTC
Created attachment 1105 [details]
perf do_compile log

Perf flagged up the other day about using host includes. Log file attached.
Comment 1 Tom Zanussi 2013-03-07 16:18:04 UTC
This is apparently due to the libtraceevent library new in 3.8 perf - the libtraceeevent Makefile contains -I/usr/local/include, which seems pointless since gcc already looks at that location automatically and it doesn't actually need anything from there.  So it should probably just be removed from the Makefile.  I'll submit a patch to linux-yocto-3.8 to do that.
Comment 2 Jack Mitchell 2013-03-07 16:30:32 UTC
would this fix it in other kernels too, I'm not using a Yocto kernel... if not I'll take a look at your perf patch and make sure it gets applied to my kernel too.
Comment 3 Tom Zanussi 2013-03-07 16:45:59 UTC
No, this wouldn't work for every kernel, just ones that have been patched to remove the /usr/local/include - I don't see any way around that.

I actually saw the problem when using linux-yocto-custom with the 3.8 stable kernel, and just tried and am not seeing it with the linux-yocto-3.8 kernel.  So more digging to do to see why that is...
Comment 4 Darren Hart 2013-03-18 21:00:46 UTC
Tom, setting these to 1.4. Feel free to update the prio/target as appropriate.
Comment 5 Tom Zanussi 2013-03-19 22:08:56 UTC
(In reply to comment #1)
> This is apparently due to the libtraceevent library new in 3.8 perf - the
> libtraceeevent Makefile contains -I/usr/local/include, which seems pointless
> since gcc already looks at that location automatically and it doesn't
> actually need anything from there.  So it should probably just be removed
> from the Makefile.  I'll submit a patch to linux-yocto-3.8 to do that.

I see that you sent a patch that does the above to the upstream kernel.  So is there anything left to do for this?
Comment 6 Jack Mitchell 2013-03-19 22:29:38 UTC
Hi Tom,

Yes, I sent a patch upstream for this and it has been accepted for 3.9. I suppose you should keep your patch for yocto-3.8 and mark as fixed upstream.

Cheers,
Comment 7 Bruce Ashfield 2013-03-20 02:30:31 UTC
nominate the upstream 3.9 patch for -stable and we'll pick it up
automatically. Otherwise, someone does need to send it to me
for linux-yocto-3.8 and I'll queue it up.
Comment 8 Tom Zanussi 2013-03-20 03:37:04 UTC
I'll send it to you (linux-yocto) but I can't actually see the problem with linux-yocto-3.8 for some reason.  It won't hurt to have it but I first want to understand why it doesn't show up with the yocto kernels.
Comment 9 Tom Zanussi 2013-03-20 21:28:54 UTC
So the reason we don't see it in linux-yocto kernels is due to this patch.  Bruce, could you explain, since there isn't a real commit message for this?

commit 100ba7b476d4b595e8c6b7eca52a32bbbfe29cb1
Author: Bruce Ashfield <bruce.ashfield@windriver.com>
Date:   Sun Sep 9 13:47:36 2012 -0400

    perf: temporary gcc 4.7 build fixes
    
    Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>

diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index a20e320..7bb26ce 100644
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -122,7 +122,7 @@ export Q VERBOSE
 
 EVENT_PARSE_VERSION = $(EP_VERSION).$(EP_PATCHLEVEL).$(EP_EXTRAVERSION)
 
-INCLUDES = -I. -I/usr/local/include $(CONFIG_INCLUDES)
+INCLUDES = -I. -I=/usr/local/include $(CONFIG_INCLUDES)
Comment 10 Bruce Ashfield 2013-03-21 03:01:00 UTC
Aha. That's Richard's and my quick patch to fix perf looking in the
host includes in older kernels. Since enforcing a sysroot aware toolchain
in the upstream kernel didn't fly .. the patch is being carried locally.

Now that we have another fix, feel free to send a revert and the new
patch and I'll switch to the mainline solution.
Comment 11 Tom Zanussi 2013-04-18 14:16:47 UTC
Fixed in poky/master: 64b3a377e8b8eff0d9421899081fd22d93b7ecde