Legato 15.05 build error in bitbake

Hi folks,

I downloaded Legato 15.05 today and I have problems to build it.
It seems the recipe legato-af has some un-resolved dependency:

$ bitbake legato-af -c compile -f

| make[3]: Entering directory /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7' | [ 40%] mkapp 'audioService': /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/bin/apps/audioService.ar7 | Executing ninja build system... | $ ninja -v -d explain -f /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/platformServices/apps/audio/_build_audioService.ar7/build.ninja | ninja explain: output /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/platformServices/apps/audio/_build_audioService.ar7/staging/bin/audioDaemon doesn't exist | ninja explain: /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/platformServices/apps/audio/_build_audioService.ar7/staging/bin/audioDaemon is dirty | [1/2] /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/sysroots/x86_64-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc -o /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/platformServices/apps/audio/_build_audioService.ar7/staging/bin/audioDaemon /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/platformServices/apps/audio/_build_audioService.ar7/obj/audioDaemon/_main.c.o -L/home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/platformServices/apps/audio/_build_audioService.ar7/staging/lib -Wl,--enable-new-dtags,-rpath="\$ORIGIN/../lib" "-L/home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/platformServices/apps/audio/_build_audioService.ar7/staging/lib" -lComponent_audio -lComponent_le_pa_audio "-L$LEGATO_BUILD/bin/lib" -llegato -lpthread -lrt -lm -lqmi_cci -lqmiservices /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/sysroots/swi-mdm9x15/usr/lib/libsierra_qcsi.a | FAILED: /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/sysroots/x86_64-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc -o /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/platformServices/apps/audio/_build_audioService.ar7/staging/bin/audioDaemon /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/platformServices/apps/audio/_build_audioService.ar7/obj/audioDaemon/_main.c.o -L/home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/platformServices/apps/audio/_build_audioService.ar7/staging/lib -Wl,--enable-new-dtags,-rpath="\$ORIGIN/../lib" "-L/home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/platformServices/apps/audio/_build_audioService.ar7/staging/lib" -lComponent_audio -lComponent_le_pa_audio "-L$LEGATO_BUILD/bin/lib" -llegato -lpthread -lrt -lm -lqmi_cci -lqmiservices /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/sysroots/swi-mdm9x15/usr/lib/libsierra_qcsi.a | /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/sysroots/x86_64-linux/usr/libexec/armv7a-vfp-neon-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.7.2/ld: warning: libopencore-amrwb.so.0, needed by /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/platformServices/apps/audio/_build_audioService.ar7/staging/lib/libComponent_le_pa_audio.so, not found (try using -rpath or -rpath-link) | /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/sysroots/x86_64-linux/usr/libexec/armv7a-vfp-neon-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.7.2/ld: warning: libopencore-amrnb.so.0, needed by /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/platformServices/apps/audio/_build_audioService.ar7/staging/lib/libComponent_le_pa_audio.so, not found (try using -rpath or -rpath-link) | /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/platformServices/apps/audio/_build_audioService.ar7/staging/lib/libComponent_le_pa_audio.so: undefined reference toDecoder_Interface_exit’
| /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/platformServices/apps/audio/_build_audioService.ar7/staging/lib/libComponent_le_pa_audio.so: undefined reference to Decoder_Interface_Decode' | /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/platformServices/apps/audio/_build_audioService.ar7/staging/lib/libComponent_le_pa_audio.so: undefined reference toD_IF_init’
| /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/platformServices/apps/audio/_build_audioService.ar7/staging/lib/libComponent_le_pa_audio.so: undefined reference to D_IF_decode' | /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/platformServices/apps/audio/_build_audioService.ar7/staging/lib/libComponent_le_pa_audio.so: undefined reference toDecoder_Interface_init’
| /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/platformServices/apps/audio/_build_audioService.ar7/staging/lib/libComponent_le_pa_audio.so: undefined reference to D_IF_exit' | collect2: error: ld returned 1 exit status | ninja: build stopped: subcommand failed. | make[3]: *** [bin/apps/audioService.ar7] Error 1 | make[3]: Leaving directory/home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7’
| make[2]: *** [platformServices/apps/audio/CMakeFiles/audioService.dir/all] Error 2
| make[2]: Leaving directory /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7' | make[1]: *** [all] Error 2 | make[1]: Leaving directory/home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7’
| make: *** [build_ar7] Error 2
| WARNING: /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/temp/run.do_compile.11372:1 exit 2 from
| make $LEGATO_TARGET
| ERROR: Function failed: do_compile (log file is located at /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/temp/log.do_compile.11372)
ERROR: Task 5 (/home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/meta-swi/common/recipes-legato/legato-af/legato-af_git.bb, do_compile) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 728 tasks of which 727 didn’t need to be rerun and 1 failed.

Summary: 1 task failed:
/home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/meta-swi/common/recipes-legato/legato-af/legato-af_git.bb, do_compile
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Can you help me with this problem?

Rgds,

Hi,

can you try a couple of things:

  1. Can you clone and build the framework project from github directly without trying to build inside the bitbake environment?
  2. Can you just run “make image_bin” from the top level and see if it completes?

Finally, there is no supporting firmware for the AR series yet for this version of Legato. That will come to you directly so do not install 15.05 on an AR platform.

Regards,
Andrew

Hi Andrew,

The first time I got this error was using the top-level Makefile at top-level dir.

First I thought it was a problem with the legato-af package, this is why I executed separated bitbake fetch and compile tasks and I had the same problem, as I posted here.

Even after executing a “bitbake legato-af -c clean” and them “make image_bin” I had the same problem before.

It seems that the package libopencore-amrwb.so.0 is missing as showed in:

| /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/sysroots/x86_64-linux/usr/libexec/armv7a-vfp-neon-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.7.2/ld: warning: libopencore-amrwb.so.0 , needed by /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/platformServices/apps/audio/_build_audioService.ar7/staging/lib/libComponent_le_pa_audio.so, not found (try using -rpath or -rpath-link)

Should this package be generated in some recipe?

Is there any way to bypass this libComponent_le_pa_audio generation?

Thanks for your help.
Danillo

Please be sure to have the ninja-build package installed on your build machine:

sudo apt-get install ninja-build

If you do not install this package then legato-af recipe will fail to build.

Jay

Hello Jay,
I have ninja-build installed.
It is possible to see it in the log I posted:

This is not the problem…

The package libopencore-amrwb.so.0 seems to be defined in recipes-misc/libopencore-amr/libopencore-amr_0.1.3.bb of /layer/meta-telephony/ in OpenEmbedded.
However, this recipe, and this layer are not in Legato 15.05.

Can you check if it is really required?
Can you provide the fix?

Regards,
Danillo

The libopencore-amr recipe is located here:
meta-swi/common/recipes-multimedia/libopencore-amr/libopencore-amr_0.1.3.bb

Try to build it prior to retry to build legato-af:

bitbake libopencore-amr -c compile -f

Jay

Hi Jay,

Tks. I followed your suggestion and the error changed:

| # Install default startup scripts.
| install -d build/ar7/staging/mnt/flash/startupDefaults
| install targetFiles/mdm-9x15/startup/* -t build/ar7/staging/mnt/flash/startupDefaults
| # Create a tarball containing everything in the staging area.
| tar -C build/ar7/staging -cf build/ar7/legato-runtime.tar .
| mklegatoimg -t ar7 -d build/ar7/staging -o build/ar7
| Target: ar7
| Input: /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/staging
| Output: /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7
| Unable to find mkyaffs2image within toolchain, please update your toolchain.
| make: *** [package_9x15] Error 1
| WARNING: /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/temp/run.do_compile.29923:1 exit 2 from
| make $LEGATO_TARGET
| ERROR: Function failed: do_compile (log file is located at /home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/temp/log.do_compile.29923)
ERROR: Task 1292 (/home/f59dms0/tcu_gen2kai/FW/LegatoYocto1505/meta-swi/common/recipes-legato/legato-af/legato-af_git.bb, do_compile) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 1810 tasks of which 1700 didn’t need to be rerun and 1 failed.

Rgds,
Danillo

May be it is an issue with the build environment variables.

Can you try to exit your current shell session and then try to do a “make” at the root of your yocto folder?

Jay

Hi Jay,

Tks for your support.
I executed ‘bitbake yaffs2-utils’ manually inside build_bin/
then ‘bitbake mdm9x15-image-minimal’
and ‘legato-af-git’ could finallycomplete do_compile :wink:

images generated at:
deploy/images/swi-mdm9x15

let’s test.

Rgds,
Danillo

Hi Danillo,

It’s great that you got to the end, but I’d love to understand why it failed in the first place. I retried on 2 different machine running different Ubuntu versions today and both ran start to finish without issue. Is there something unusual about your environment?

Andrew

Hi Andrew,

No idea. I will try a clean decompressed area and let you know.

I have a Ubuntu 14.04 LTS in a Intel® Core™ i5-4210M CPU @ 2.60GHz with 4Gbs RAM.

$ uname -a
Linux F59DMS0P-Ubuntu 3.13.0-53-generic #89-Ubuntu SMP Wed May 20 10:34:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

During my first build try I had problems with disk space, not sure this could impact the others try.

Rgds,
Danillo

Hi all,

Finally, I have been able to build LegatoYocto 15.05 following the posts of Danillo and Andrew. I have suffered the same problems as Danillo during the building process.

In my case, I have a Lubuntu 14.04 LTS and below my system information:
$ uname -a
Linux idneo-hbm 3.13.0-49-generic #83-Ubuntu SMP Fri Apr 10 20:14:51 UTC 2015 i686 i686 i686 GNU/Linux

Best regards,

Héctor