Legato 16.01 Linux source build error

Hi All,

We are trying to install Legato based on the instructions given in the “Legato_Getting_Started.pdf”. The Host machine we have used :
Ubuntu 15.04 with VMware player 6.0

We have installed toolchain and successfully build legato framework. But when build the linux source “Legato-Dist-Source-mdm9x15-SWI9X15Y_07.08.03.00.tar.bz2”, it shows some build erros.

Also when build starts, it shows a warning message initially like “WARNING: Host distribution “Ubuntu-15.04” has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.”
Will it be a problem? or which one is the tested distribution?.

The error log is geven below. Any suggestions are welcome?

== built system’s info.properties: ==
| cat build/ar7/staging/system/info.properties
| system.name=system
| system.md5=7f146f9550a484f3d9889ffd8247f55b
| install targetFiles/mdm9x15/startup/start build/ar7/staging
| install targetFiles/mdm9x15/startup/startupScript build/ar7/staging
| mklegatoimg -t ar7 -d build/ar7/staging -o build/ar7
| ar7 == /home/shabeerb/Legato/yocto/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/ar7
| build/ar7/staging == /home/shabeerb/Legato/yocto/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/staging
| build/ar7 == /home/shabeerb/Legato/yocto/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7
| Using fakeroot /usr/bin/fakeroot …
| ar7 == /home/shabeerb/Legato/yocto/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/ar7
| build/ar7/staging == /home/shabeerb/Legato/yocto/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/staging
| build/ar7 == /home/shabeerb/Legato/yocto/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7
| -t ar7 -d build/ar7/staging -o build/ar7
| Target: ar7
| Input: /home/shabeerb/Legato/yocto/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/staging
| Output: /home/shabeerb/Legato/yocto/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7
| Version: 16.01.2 2d5ef2f TELTVM1680 2016/03/22 18:20:05
| ar7: Generating the framework image (yaffs2)
| ar7: Generating the framework cwe
| ar7: Generating the framework image (ubi)
| Warning: Unable to find mksquashfs within toolchain, please update your toolchain.
| Warning: Unable to produce squashfs image: mksquashfs needed
| ar7: Generating the framework cwe
| cat: /home/shabeerb/Legato/yocto/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/legatoimg/ubi/temp.mbn.hdr: No such file or directory
| cat: /home/shabeerb/Legato/yocto/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/build/ar7/legato.ubi: No such file or directory
| Exit Code 1
| Makefile:271: recipe for target ‘stage_mklegatoimg’ failed
| make: *** [stage_mklegatoimg] Error 1
| WARNING: exit code 2 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/shabeerb/Legato/yocto/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/temp/log.do_compile.20512)
ERROR: Task 1461 (/home/shabeerb/Legato/yocto/meta-swi/common/recipes-legato/legato-af/legato-af_git.bb, do_compile) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 1191 tasks of which 708 didn’t need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:

Hi.

It should work ok on 15.04. The warning is generated by the base Yocto build. Can you confirm that you have set your shell to bash (not dash). Also, are you building inside a VM?

Also, if you can attach the log that was generated we could have a look. According to your post it’s at /home/shabeerb/Legato/yocto/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/temp/log.do_compile.20512

Thanks.

Hi,
Thanks for your quick response.

The default shell of my Linux host is ‘bash’ which we can see from the below commands.
shabeerb@TELTVM1680:~$ echo $0
bash
Also we have run the Linux host OS 15.04 inside the VM. Will it be a problem?

What we have done for building the Linux source is just uncompress the file “Legato-Dist-Source-mdm9x15-SWI9X15Y_07.08.03.00.tar.bz2”. After uncompressing it generate a single folder “yocto”, inside this folder
contains a Makefile along with sub folders, we have just run the make command from this location.

Do we need to set any environment variable before run the make command? We haven’t seen any readme.txt or any other how to use docs in the yocto folder. The log file is also attached. Could you please help up to resolve this issue?

Thanks,
Shabeer

Hi
I have faced some issues while attaching the log file, once again attaching the log file.

Thanks,
Shabeer
sample.txt (128 KB)

Hi,

Try to force the build for WP8548 target only.

Edit the file “meta-swi/meta-swi-mdm9x15/conf/machine/swi-mdm9x15.conf

And replace the last line:

LEGATO_ROOTFS_TARGETS ?= "ar7 ar86 wp85"

by this one:

LEGATO_ROOTFS_TARGETS ?= "wp85"

Then run “make”.


Jay

Hi Jai,

This modification doesn’t help us.
I have already seen some similar posts on the forum and i tried it previously, but it couldn’t generate the images.
Now I have tried make clean and make, but no change.
Do you have any other idea to help us??

Thanks,
Shabeer

Hi,

From the log, it seems that the mksquashfs tool is not reachable.
Could you check if the file exists in your yocto folder:

ls -al build_bin/tmp/sysroots/x86_64-linux/usr/sbin/mksquashfs

Could you provide some details about your virtual machine?
Is it 64-bit or 32-bit?
How much memory/disk space?
Could you provide the result of these commands:

uname -a free df -h

Jay

Hi All,
Atlast I could succeed to build the image. We don’t have Mango board at present, once we get the board we will check the images.
We are expecting that the make command from the top directory location will do everything, i don’t understand why this returns error!!.
The method I have done is given below, i don’t know whether this is correct or not!. It will be very helpful if anyone confirm this.

shabeerb@TELTVM1680:~/Legato$ cd yocto/poky/
shabeerb@TELTVM1680:~/Legato/yocto/poky$ source oe-init-build-env
shabeerb@TELTVM1680:~/Legato/yocto/poky/build$ bitbake core-image-minimal (This command generated a quemu image)

Then we have modified the files ‘bblayers.conf’ and ‘local.conf’ (location - yocto/poky/build/conf) based on the similar file which found in the location ‘yocto/build_bin/conf’. This is for configuring the build for the machine ‘swi-mdm9x15’. These files will be generated when we give make command from the top linux source directory. Then run the follwing commands.

shabeerb@TELTVM1680:~/Legato/yocto/poky/build$ bitbake core-image-minimal (This will give some buils error, run next commands)
shabeerb@TELTVM1680:~/Legato/yocto/poky/build$ bitbake yaffs2-utils
shabeerb@TELTVM1680:~/Legato/yocto/poky/build$ bitbake mkyaffs2-utils
shabeerb@TELTVM1680:~/Legato/yocto/poky/build$ bitbake yaffs2-utils-native
shabeerb@TELTVM1680:~/Legato/yocto/poky/build$ bitbake squashfs-tools
shabeerb@TELTVM1680:~/Legato/yocto/poky/build$ bitbake core-image-minimal

Thanks,
Shabeer

Hi Jay,

yes, the mksquashfs utility is not found in the system. How will we correct this?
The commands results are given below. Also do you have any comments on my previous post?

shabeerb@TELTVM1680:~$ ls -al build_bin/tmp/sysroots/x86_64-linux/usr/sbin/mksquashfs
ls: cannot access build_bin/tmp/sysroots/x86_64-linux/usr/sbin/mksquashfs: No such file or directory

shabeerb@TELTVM1680:~$ uname -a
Linux TELTVM1680 3.19.0-15-generic #15-Ubuntu SMP Thu Apr 16 23:32:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

shabeerb@TELTVM1680:~$ free
total used free shared buffers cached
Mem: 2040696 1687260 353436 19224 26236 583172
-/+ buffers/cache: 1077852 962844
Swap: 2094076 516572 1577504

shabeerb@TELTVM1680:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 986M 0 986M 0% /dev
tmpfs 200M 9.3M 191M 5% /run
/dev/sda1 97G 57G 36G 62% /
tmpfs 997M 224K 997M 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 997M 0 997M 0% /sys/fs/cgroup
cgmfs 100K 0 100K 0% /run/cgmanager/fs
tmpfs 200M 56K 200M 1% /run/user/1000

Thanks,
Shabeer

I’m also having difficulty building Legato using the Legato-Dist-Source-mdm9x15-SWI9X15Y_07.08.03.00.tar.bz2 yocto source.
I extracted the folder to ~/Legato/yocto
Then executed “make”
I’ve attached the lo.do_compile. But the issue seems to be a missing file or even folder.
find: platformAdaptor': No such file or directory find:modules’: No such file or directory

** ERROR:
/home/john/Legato/yocto/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/components/airVantage/avcDaemon/Component.cdef:36:8: error: Couldn’t find component ‘/home/john/Legato/yocto/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/platformAdaptor/qmi/bin/wp85/components/le_pa_avc’.
make: *** [system_wp85] Error 1

Did I miss a step? I was going to download the latest yocto build but it takes a few hours. I’ll try that later.
log.do_compile.28346.txt (112 KB)

New downloads solved my problems!!

I downloaded the new Legato-Dist-Source-mdm9x15-SWI9X15Y_07.10.04.00.tar.bz2 and still have the same problem.

I got an error concerning the shell
Error: bash is not set as default provider for /bin/sh
build is not guaranteed to work, aborting
make: *** [image_bin] Error 1

I changed my link sh from dash to bash to remove the error but now get the same error as before.

Note I’m using Ubuntu 12.04 and there is a warning in the Rebuild Yocto section:
Warning:
You can’t rebuild Yocto images on Ubuntu 13.10.
Does this apply to 12.04 too?

The error again is:
rror: Couldn’t find component ‘/home/john/Legato/yocto/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/legato-af/git-r0/git/platformAdaptor/qmi/bin/wp85/components/le_pa_avc’

Do I have to build a library first before running make. Again here are my steps:
download tar file
untar it
run make in yocto folder
The log file is attached
log.do_compile .10181.txt (112 KB)

I have the same problem in Ubuntu 12.04 and Ubuntu 14.04 where I used the same procedure to build:
download tar file
untar it
run make in yocto folder
The log file is attached
log.do_compile.31846.txt (113 KB)

Note I was able to re-create the platformAdaptor/qmi/bin/wp85/components/le_pa_avc’ using sources downloaded from git but in an entirely different folder structure. This got rid of the first error (finding platformAdapter folder) and the second error with le_pa_avc but then it was missing the audio folder. Surely something was left out of the tar file. I think the same files exist when the framework is built too. Any instructions on how the missing folders should be created would be helpful.

I was facing same issue, but modifying the legato.inc file to checkout a older version of legato-af resolved it for me.

I found that it checks out the latest version always from github. The latest commits have been updated to Legato 16.04 which may not be compatible. Modiying it to checkout the revision “dbefa080f4afeb4e7f76309d96f314dfccf440da”, which was committed on 22nd April 2016, made it work.

Hope this helps.

Adarsh, could you please tell me where to find the legato.inc file. I am facing the same issue too.

Thanks,
Chandra

Indeed that should work, but it is also possible to prevent this without updating the sources.
I provided few workarounds for this issue here: Build yocto/legato 16.04

Folders/files that are not being found errors are caused by the switch to repo, so the legato-af.git repository is not standalone anymore and requires multiple other repositories to work, which is not something that is really supported in these versions of the Yocto distribution.