Building legato 17.06 fails

I am getting the following error while trying to build Legato 17.06:

– Build files have been written to: /home/jarvisdev/workspace/legato/build/localhost
make -C build/localhost user_docs
make[2]: Entering directory ‘/home/jarvisdev/workspace/legato/build/localhost’
make[2]: *** No rule to make target ‘user_docs’. Stop.
make[2]: Leaving directory ‘/home/jarvisdev/workspace/legato/build/localhost’
Makefile:190: recipe for target ‘user_docs’ failed
make[1]: *** [user_docs] Error 2
make[1]: Leaving directory ‘/home/jarvisdev/workspace/legato’
Makefile:49: recipe for target ‘default’ failed
make: *** [default] Error 2

Followed instructions on the git page. Does the Makefile need some changes? Please guide me!

It seems like you probably just ran make, but you probably want to run make wp85 or make wp750x depending on your module.

I am trying to install the Legato framework on my development PC. So in the GitHub readme there are two sections:

To install the Legato framework on your development PC

Clone it from GitHub or untar a release archive into a directory

cd into that directory

Run make

To configure your bash shell’s environment for the Legato application build tools

Source bin/configlegatoenv:

$ . bin/configlegatoenv
OR, run the interactive bash shell bin/legs:

$ bin/legs
To build support for cross-build targets, run make .

For example, to enable support for the Sierra Wireless WP85xx devices, run make wp85.

So I wanted to try and setup a development environment on my linux host!

Also when I am trying to build it for wp85, I get the following error. I have pointed to gcc in my path so I don’t know why it wouldn’t find it:

/bin/sh: 1: /gcc: not found
ninja: build stopped: subcommand failed.
Makefile.framework:108: recipe for target ‘liblegato’ failed
make[1]: *** [liblegato] Error 1
make[1]: Leaving directory ‘/home/jarvis/legato-17.07.1’
Makefile:254: recipe for target ‘framework_wp85’ failed
make: *** [framework_wp85] Error 2

This is solved. The problem is that there is a typo in the documentation while setting up the environment variable WP85_TOOLCHAIN_PREFIX.

Correct value of prefix: arm-poky-linux-gnuabi- arm-poky-linux-gnueabi-

Oh thanks @virajpadte, we just the typo ([Docs] Fix ReadMe and Antenna documentation · legatoproject/legato-af@23a31c2 · GitHub), thanks for the heads up!

Hi,

I have the same problem. How can I solve it? I am trying to get it running for my raspberry pi 3. I am building outside of the raspberry pi. I am trying to build image in an Ubuntu machine. Can you tell me what could be the problem?

Thanks

Here is how I run it:

mehdi@machine::~/Documents/legato-demo/legato-17.09.0$ bin/legs
Using legato framework found under ‘/home/mehdi/Documents/legato-demo/legato-17.09.0’
mehdi@machine::~/Documents/legato-demo/legato-17.09.0$ source /home/mehdi/Documents/legato-demo/legato-17.09.0/framework/tools/scripts/configlegatoenv
[ar7] No toolchain found for target ‘ar7’.
[ar86] No toolchain found for target ‘ar86’.
[wp85] No toolchain found for target ‘wp85’.
[wp750x] No toolchain found for target ‘wp750x’.
[wp76xx] No toolchain found for target ‘wp76xx’.
[wp77xx] No toolchain found for target ‘wp77xx’.
[ar758x] No toolchain found for target ‘ar758x’.
[ar759x] No toolchain found for target ‘ar759x’.
[em75xx] No toolchain found for target ‘em75xx’.
[virt] No toolchain found for target ‘virt’.
mehdi@machine::~/Documents/legato-demo/legato-17.09.0$ exec <> /dev/tty

mehdi@machine::~/Documents/legato-demo/legato-17.09.0$ make raspi
Module: WiFi
modules/WiFi/moduleDefs:14: Legato WiFi version is undefined…
Module: Dualsys
make -f Makefile.hostTools
make[1]: Entering directory /home/mehdi/Documents/legato-demo/legato-17.09.0' Using ninja installed at: /usr/bin/ninja ln -sf ../build/tools/mk bin/mk ln -sf mk bin/mkcomp ln -sf mk bin/mkexe ln -sf mk bin/mkapp ln -sf mk bin/mksys ln -sf ../framework/tools/scripts/splitdebug ../framework/tools/scripts/findtoolchain ../framework/tools/scripts/instsys ../framework/tools/scripts/settime ../framework/tools/scripts/mkinfo ../framework/tools/scripts/instlegato ../framework/tools/scripts/stoplegato ../framework/tools/scripts/settz ../framework/tools/scripts/createsdk ../framework/tools/scripts/systoimg ../framework/tools/scripts/legato-qemu ../framework/tools/scripts/checkpa ../framework/tools/scripts/legato-install ../framework/tools/scripts/update-pack ../framework/tools/scripts/security-pack ../framework/tools/scripts/instapp ../framework/tools/scripts/mklegatoimg ../framework/tools/scripts/app ../framework/tools/scripts/av-pack ../framework/tools/scripts/releaselegato ../framework/tools/scripts/sbhelper ../framework/tools/scripts/remoteDebug ../framework/tools/scripts/systocwe ../framework/tools/scripts/configlegatoenv ../framework/tools/scripts/update ../framework/tools/scripts/configtargetssh ../framework/tools/scripts/legs ../framework/tools/scripts/gettargettype ../framework/tools/scripts/update-util ../framework/tools/scripts/configToolchainDirEnvVars ../framework/tools/scripts/simu ../framework/tools/scripts/fwupdate ../framework/tools/scripts/setname ../framework/tools/scripts/mkdoc ../framework/tools/scripts/startlegato ../framework/tools/scripts/shlib ../framework/tools/scripts/mklegatotreero bin/ ln -sf /home/mehdi/Documents/legato-demo/legato-17.09.0/framework/tools/ifgen/ifgen bin/ make -C framework/tools/mkPatch mkPatch make[2]: Entering directory /home/mehdi/Documents/legato-demo/legato-17.09.0/framework/tools/mkPatch’
/usr/bin/gcc -Wall -Werror -o /home/mehdi/Documents/legato-demo/legato-17.09.0/bin/mkPatch
mkPatch.c /home/mehdi/Documents/legato-demo/legato-17.09.0/framework/liblegato/crc.c
-I/home/mehdi/Documents/legato-demo/legato-17.09.0/framework/include
-I/home/mehdi/Documents/legato-demo/legato-17.09.0/3rdParty/include
make[2]: Leaving directory /home/mehdi/Documents/legato-demo/legato-17.09.0/framework/tools/mkPatch' ninja -f /home/mehdi/Documents/legato-demo/legato-17.09.0/build/tools/build.ninja ninja: no work to do. make[1]: Leaving directory /home/mehdi/Documents/legato-demo/legato-17.09.0’
# Generate an MD5 hash of everything in the source directories.
find framework components interfaces platformAdaptor modules apps/platformServices apps/proprietary apps/tools targetFiles Makefile.framework Makefile.hostTools Makefile.targetTools Makefile targetDefs CMakeLists.txt -type f | grep -v “.git” | sort | while read filePath ;
do
echo “$filePath” &&
cat “$filePath” ;
done | md5sum | awk ‘{ print $1 }’ > sources.md5
version=17.09.0
md5=d2790bf2cdc985839cf4aa1aabd3ce66
make -f Makefile.framework CC=/home/mehdi/Documents/raspberry/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc
make[1]: Entering directory /home/mehdi/Documents/legato-demo/legato-17.09.0' framework/liblegato/ninja-generator ninja -f /home/mehdi/Documents/legato-demo/legato-17.09.0/build/raspi/framework/build.ninja [3/51] Compiling liblegato source file FAILED: /home/mehdi/Documents/raspberry/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc -MMD -MF /home/mehdi/Documents/legato-demo/legato-17.09.0/build/raspi/framework/obj/atomFile.c.o.d -c /home/mehdi/Documents/legato-demo/legato-17.09.0/framework/liblegato/linux/atomFile.c -o /home/mehdi/Documents/legato-demo/legato-17.09.0/build/raspi/framework/obj/atomFile.c.o -Wall -Werror -DLEGATO_EMBEDDED -fPIC -I/home/mehdi/Documents/legato-demo/legato-17.09.0/framework/daemons/linux -g -O2 -I/home/mehdi/Documents/legato-demo/legato-17.09.0/framework/liblegato/linux -DLE_COMPONENT_NAME=framework -I/home/mehdi/Documents/legato-demo/legato-17.09.0/framework/include -I/home/mehdi/Documents/legato-demo/legato-17.09.0/framework/liblegato -DDISABLE_SMACK=0 -DLE_SVCDIR_SERVER_SOCKET_NAME="\"/tmp/legato/serviceDirectoryServer\"" -DLE_SVCDIR_CLIENT_SOCKET_NAME="\"/tmp/legato/serviceDirectoryClient\"" /home/mehdi/Documents/raspberry/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory [3/51] Compiling liblegato source file FAILED: /home/mehdi/Documents/raspberry/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc -MMD -MF /home/mehdi/Documents/legato-demo/legato-17.09.0/build/raspi/framework/obj/eventLoop.c.o.d -c /home/mehdi/Documents/legato-demo/legato-17.09.0/framework/liblegato/linux/eventLoop.c -o /home/mehdi/Documents/legato-demo/legato-17.09.0/build/raspi/framework/obj/eventLoop.c.o -Wall -Werror -DLEGATO_EMBEDDED -fPIC -I/home/mehdi/Documents/legato-demo/legato-17.09.0/framework/daemons/linux -g -O2 -I/home/mehdi/Documents/legato-demo/legato-17.09.0/framework/liblegato/linux -DLE_COMPONENT_NAME=framework -I/home/mehdi/Documents/legato-demo/legato-17.09.0/framework/include -I/home/mehdi/Documents/legato-demo/legato-17.09.0/framework/liblegato -DDISABLE_SMACK=0 -DLE_SVCDIR_SERVER_SOCKET_NAME="\"/tmp/legato/serviceDirectoryServer\"" -DLE_SVCDIR_CLIENT_SOCKET_NAME="\"/tmp/legato/serviceDirectoryClient\"" /home/mehdi/Documents/raspberry/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory [3/51] Compiling liblegato source file FAILED: /home/mehdi/Documents/raspberry/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc -MMD -MF /home/mehdi/Documents/legato-demo/legato-17.09.0/build/raspi/framework/obj/cgroups.c.o.d -c /home/mehdi/Documents/legato-demo/legato-17.09.0/framework/liblegato/linux/cgroups.c -o /home/mehdi/Documents/legato-demo/legato-17.09.0/build/raspi/framework/obj/cgroups.c.o -Wall -Werror -DLEGATO_EMBEDDED -fPIC -I/home/mehdi/Documents/legato-demo/legato-17.09.0/framework/daemons/linux -g -O2 -I/home/mehdi/Documents/legato-demo/legato-17.09.0/framework/liblegato/linux -DLE_COMPONENT_NAME=framework -I/home/mehdi/Documents/legato-demo/legato-17.09.0/framework/include -I/home/mehdi/Documents/legato-demo/legato-17.09.0/framework/liblegato -DDISABLE_SMACK=0 -DLE_SVCDIR_SERVER_SOCKET_NAME="\"/tmp/legato/serviceDirectoryServer\"" -DLE_SVCDIR_CLIENT_SOCKET_NAME="\"/tmp/legato/serviceDirectoryClient\"" /home/mehdi/Documents/raspberry/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory ninja: build stopped: subcommand failed. make[1]: *** [liblegato] Error 1 make[1]: Leaving directory /home/mehdi/Documents/legato-demo/legato-17.09.0’
make: *** [framework_raspi] Error 2

Hi @mbiuki,

sorry for the delayed answer.
I have seen, you are trying to get run the legato for raspberry pi 3. And also noticed that there is no toolchain found for the target you building.
Please follow the steps given in the below link for configuring raspberry pi.

Best Regards,
Bharath