All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Randy MacLeod" <randy.macleod@windriver.com>
To: Michael <youhour@us.ibm.com>, yocto@lists.yoctoproject.org
Subject: Re: [yocto] valgrind failed do_compile during bitbake
Date: Fri, 16 Jul 2021 22:39:42 -0400	[thread overview]
Message-ID: <ff262033-b119-5790-9808-99266dea52cf@windriver.com> (raw)
In-Reply-To: <OFB9643837.3B7703CB-ON0025870C.00772D0E-8625870C.0078ED16@ibm.com>

On 2021-07-08 6:00 p.m., Michael wrote:
> I'm using Yocto "warrior" version.
> 
> It is setup for powerpc-nf
> DEFAULTTUNE = "powerpc-nf"
> DISTRO = "poky"
> 
> Everything seems to work find until I enable "valgrind".  'bitbake' 
> fails to compile valgrind
> 
> ************************
> :
> | collect2: error: ld returned 1 exit status
> | make[3]: *** [Makefile:1034: <file:1034:> memcheck-ppc32-linux] Error 1
> | make[3]: Leaving directory 
> '${WORK_DIR}/powerpc-nf-poky-linux/valgrind/3.14.0-r0/build/memcheck'
> | make[2]: *** [Makefile:1345: <file:1345:> all-recursive] Error 1
> | make[2]: Leaving directory 
> '${WORK_DIR}/powerpc-nf-poky-linux/valgrind/3.14.0-r0/build/memcheck'
> | make[1]: *** [Makefile:834: <file:834:> all-recursive] Error 1
> | make[1]: Leaving directory 
> '${WORK_DIR}/work/powerpc-nf-poky-linux/valgrind/3.14.0-r0/build'
> | make: *** [Makefile:703: <file:703:> all] Error 2
> | make: Leaving directory 
> '${WORK_DIR}/powerpc-nf-poky-linux/valgrind/3.14.0-r0/build'
> | ERROR: oe_runmake failed
> | WARNING: 
> ${WORK_DIR}/powerpc-nf-poky-linux/valgrind/3.14.0-r0/temp/run.do_compile.23806:1 
> exit 1 from 'exit 1'
> | ERROR: Function failed: do_compile (log file is located at 
> ${WORK_DIR}/powerpc-nf-poky-linux/valgrind/3.14.0-r0/temp/log.do_compile.23806)
> ERROR: Task 
> (${REPODIR}fips-build/meta/recipes-devtools/valgrind/valgrind_3.14.0.bb 
> <https://urldefense.com/v3/__http://valgrind_3.14.0.bb__;!!AjveYdw8EvQ!OY_7dx2G2egduSYaa7nftLqPZTpn3EC40Z_N7J8MPkv_dz7hS4AnmQdr1YAPEw_-jJ6cSQ$>:do_compile) 
> failed with exit code '1'
> NOTE: Tasks Summary: Attempted 4091 tasks of which 4089 didn't need to 
> be rerun and 1 failed.
> 
> Summary: 1 task failed:
>
> ${REPO_DIR}/fips-build/meta/recipes-devtools/valgrind/valgrind_3.14.0.bb 
> <https://urldefense.com/v3/__http://valgrind_3.14.0.bb__;!!AjveYdw8EvQ!OY_7dx2G2egduSYaa7nftLqPZTpn3EC40Z_N7J8MPkv_dz7hS4AnmQdr1YAPEw_-jJ6cSQ$>:do_compile
> Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
> *********************************************
> 
> Many link failure...
> **********************************
>   undefined reference to `__floatsidf'
> undefined reference to `__muldf3'
> undefined reference to `__ltdf2'
> undefined reference to `__fixdfsi'
> undefined reference to `__divdf3'
> undefined reference to `__floatunsidf'
> undefined reference to `__floatundidf'
> undefined reference to `__adddf3'
> undefined reference to `__fixunsdfdi'
> undefined reference to `__nedf2'
> undefined reference to `__gtdf2'
> undefined reference to `__subdf3'
> undefined reference to `__eqsf2'
> undefined reference to `__eqdf2'
> undefined reference to `__floatunsisf'
> undefined reference to `__divsf3'
> ***********************
> 
> Seems like many people were running into this issue for many reason. 
>   Saw a lot of suggestion in google, but seem like there is no real 
> solution...
> I try to create valgrind_%.bbappen with the following contents.  And did 
> not help...
> #####################
> #valgrind will not compile even with below changes
> CFLAGS_prepend = " -lc -lm "
> CFLAGS_append = " -ffast-math -static-libgcc -lgcc -ffreestanding -lc -lm "
> #BASE_WORKDIR="/tmp/youhour/fips-build/m20210707a/fips-ppcnf/build/tmp/work"
> #./powerpc-nf-poky-linux/valgrind/3.14.0-r0/recipe-sysroot/usr/lib/powerpc-poky-linux/8.3.0/libgcc.a
> BUILD_LDFLAGS_append = " 
> -L${BASE_WORKDIR}/powerpc-nf-poky-linux/valgrind/3.14.0-r0/recipe-sysroot/usr/lib/powerpc-poky-linux/8.3.0 
> "
> #####################
> 
> Any suggestion is appreciated.

It looks like you are just missing a soft-float library but I don't know
off-hand where that is.

We have a recent commit:

https://git.openembedded.org/openembedded-core/commit/?id=effd1434a6ca6afcc358bea64053a7bf805633c7

   valgrind: disable it for powerpc soft-float
   valgrind doesn't build for powerpc soft-float. It is thus disabled for
   such architectures.

so it seems that powerpc-nf is just not supported by valgrind yet.


An examples that shows what sort of changes would be needed:

https://sourceware.org/git/?p=valgrind.git&a=search&h=HEAD&st=commit&s=soft-float

Good luck,
../Randy


> 
> 
> 
> 
> 
> 


-- 
# Randy MacLeod
# Wind River Linux

      reply	other threads:[~2021-07-17  2:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08 22:00 valgrind failed do_compile during bitbake Michael
2021-07-17  2:39 ` Randy MacLeod [this message]

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=ff262033-b119-5790-9808-99266dea52cf@windriver.com \
    --to=randy.macleod@windriver.com \
    --cc=yocto@lists.yoctoproject.org \
    --cc=youhour@us.ibm.com \
    /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 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.