# Building legato 17.06 fails

**URL:** <https://forum.legato.io/t/building-legato-17-06-fails/2612>\
**Category:** Legato Application Framework\
**Created:** [August 17, 2017, 5:19pm UTC](https://forum.legato.io/t/building-legato-17-06-fails/2612 "2017-08-17T17:19:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![virajpadte](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/virajpadte/32/264_2.png) [@virajpadte](https://forum.legato.io/u/virajpadte)\
**Post date:** [August 17, 2017, 5:19pm UTC](https://forum.legato.io/t/building-legato-17-06-fails/2612/1 "2017-08-17T17:19:47Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![dfrey](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/dfrey/32/563_2.png) [@dfrey](https://forum.legato.io/u/dfrey)\
**Post date:** [August 17, 2017, 5:37pm UTC](https://forum.legato.io/t/building-legato-17-06-fails/2612/2 "2017-08-17T17:37:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![virajpadte](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/virajpadte/32/264_2.png) [@virajpadte](https://forum.legato.io/u/virajpadte)\
**Post date:** [August 22, 2017, 5:45pm UTC](https://forum.legato.io/t/building-legato-17-06-fails/2612/4 "2017-08-22T17:45:56Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![virajpadte](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/virajpadte/32/264_2.png) [@virajpadte](https://forum.legato.io/u/virajpadte)\
**Post date:** [August 22, 2017, 7:43pm UTC](https://forum.legato.io/t/building-legato-17-06-fails/2612/5 "2017-08-22T19:43:23Z")

</div>

> [@virajpadte](#):
>
> pport for cross-build targets, run make

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

---

<div class="post-metadata">

**Author:** ![virajpadte](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/virajpadte/32/264_2.png) [@virajpadte](https://forum.legato.io/u/virajpadte)\
**Post date:** [August 23, 2017, 7:06pm UTC](https://forum.legato.io/t/building-legato-17-06-fails/2612/6 "2017-08-23T19:06:53Z")

</div>

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-

---

<div class="post-metadata">

**Author:** ![CoRfr](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/corfr/32/69_2.png) [@CoRfr](https://forum.legato.io/u/CoRfr)\
**Post date:** [August 25, 2017, 4:12am UTC](https://forum.legato.io/t/building-legato-17-06-fails/2612/7 "2017-08-25T04:12:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mbiuki](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/mbiuki/32/260_2.png) [@mbiuki](https://forum.legato.io/u/mbiuki)\
**Post date:** [November 7, 2017, 9:13am UTC](https://forum.legato.io/t/building-legato-17-06-fails/2612/8 "2017-11-07T09:13:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bharath\_08](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@bharath\_08](https://forum.legato.io/u/bharath_08)\
**Post date:** [September 17, 2018, 7:21am UTC](https://forum.legato.io/t/building-legato-17-06-fails/2612/9 "2018-09-17T07:21:23Z")

</div>

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.

> **[Configure Raspberry Pi - Legato Docs](https://docs.legato.io/latest/raspbianMain.html)**
>
> legato™ is an open source Linux-based embedded platform designed to simplify connected IoT application development

Best Regards,  
Bharath
