Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Robert Yang <liezhi.yang@windriver.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/1] perf.bb: fix multilib build
Date: Tue, 02 Sep 2014 09:28:24 +0100	[thread overview]
Message-ID: <1409646504.29296.268.camel@ted> (raw)
In-Reply-To: <cf27f471a5feb7deaaa24694028d7b4dc34fea02.1407836032.git.liezhi.yang@windriver.com>

On Tue, 2014-08-12 at 04:10 -0700, Robert Yang wrote:
> Fixed:
> $ bitbake perf lib32-perf
> ERROR: QA Issue: lib32-perf: Files/directories were installed but not shipped
>   /usr/lib64
>   /usr/lib64/traceevent
>   /usr/lib64/traceevent/plugins
>   /usr/lib64/traceevent/plugins/plugin_function.so
>   /usr/lib64/traceevent/plugins/plugin_scsi.so
>   /usr/lib64/traceevent/plugins/plugin_hrtimer.so
>   /usr/lib64/traceevent/plugins/plugin_kmem.so
>   /usr/lib64/traceevent/plugins/plugin_jbd2.so
>   /usr/lib64/traceevent/plugins/plugin_xen.so
>   /usr/lib64/traceevent/plugins/plugin_mac80211.so
>   /usr/lib64/traceevent/plugins/plugin_cfg80211.so
>   /usr/lib64/traceevent/plugins/plugin_sched_switch.so
>   /usr/lib64/traceevent/plugins/plugin_kvm.so [installed-vs-shipped]
> 
> The perf.do_configure edits kernel's
> ${STAGING_KERNEL_DIR}/tools/perf/config/Makefile, there would be
> problems since kernel doesn't have multilib, and the build result is
> undetermined.
> 
> Previously, the sed command changed libdir to /usr/lib64 (or 32) in the
> Makefile, so the build result was different if we build perf (64) first
> or lib32-perf first.
> 
> Use the weak assignment "libdir ?=" to instead of "libdir =" will fix
> the problem since the multilib builds are in different processes, and
> they won't affect each other any more.
> 
> The sed command will match both $(prefix)/$(lib) and $(prefix)/lib since
> the Makefile may has been modified before this patch.
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  meta/recipes-kernel/perf/perf.bb |    8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
> index bfd210c..ebfedb9 100644
> --- a/meta/recipes-kernel/perf/perf.bb
> +++ b/meta/recipes-kernel/perf/perf.bb
> @@ -121,10 +121,12 @@ do_configure_prepend () {
>      # detected by perf, since it triggers via: ifeq ($(ARCH),x86_64). In a 32 bit
>      # build, with a 64 bit multilib, the arch won't match and the detection of a 
>      # 64 bit build (and library) are not exected. To ensure that libraries are
> -    # installed to the correct location, we can make the substitution in the 
> -    # config/Makefile. For non multilib builds, this has no impact.
> +    # installed to the correct location, we can use the weak assignment in the
> +    # config/Makefile.
>      if [ -e "${S}/tools/perf/config/Makefile" ]; then
> -        sed -i 's,libdir = $(prefix)/$(lib),libdir = $(prefix)/${baselib},' ${S}/tools/perf/config/Makefile
> +        # Match $(prefix)/$(lib) and $(prefix)/lib
> +        sed -i 's,^libdir = \($(prefix)/.*lib\),libdir ?= \1,' \
> +            ${S}/tools/perf/config/Makefile
>      fi
>      # We need to ensure the --sysroot option in CC is preserved
>      if [ -e "${S}/tools/perf/Makefile.perf" ]; then

What happens if both lib32-perf and lib64-perf are being built at the
same time?

${S} is shared here so we should not be making changes to it. Your patch
doesn't make things worse I guess but there is still a horribly big race
here :(

Cheers,

Richard





  reply	other threads:[~2014-09-02  8:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-12 11:10 [PATCH 0/1] perf.bb: fix multilib build Robert Yang
2014-08-12 11:10 ` [PATCH 1/1] " Robert Yang
2014-09-02  8:28   ` Richard Purdie [this message]
2014-09-02  9:28     ` Robert Yang
2014-09-02  1:18 ` [PATCH 0/1] " Robert Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1409646504.29296.268.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=liezhi.yang@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox