# Build error for raspi ('system\_raspi' failed)

**URL:** https://forum.legato.io/t/build-error-for-raspi-system-raspi-failed/2164
**Category:** Legato Linux distribution (Yocto project)
**Created:** [September 26, 2016, 1:42am UTC](https://forum.legato.io/t/build-error-for-raspi-system-raspi-failed/2164 "2016-09-26T01:42:18Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![projekct](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@projekct](https://forum.legato.io/u/projekct)
#### Post date: [September 26, 2016, 1:42am UTC](https://forum.legato.io/t/build-error-for-raspi-system-raspi-failed/2164/1 "2016-09-26T01:42:18Z")

</div>

Hi,  
I tried to follow the raspi build guide([Configure Raspberry Pi - Legato Docs](http://legato.io/legato-docs/latest/raspbianMain.html)) but had build error problem.  
so please let me know how to fix build error or similar experience.  
Thanks in advance 🙂

Below is my build step.

1. Git clone for legato

> git clone [GitHub - legatoproject/legato-af: Legato Application Framework](https://github.com/legatoproject/legato-af.git)

1. Git clone for raspberry tools

> git clone [GitHub - raspberrypi/tools](https://github.com/raspberrypi/tools.git)

1. Set path for raspi tools

> export RASPI\_TOOLCHAIN\_DIR=/home/projekct/dev/rpi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/  
> export RASPI\_TOOLCHAIN\_PREFIX=arm-linux-gnueabihf-

1. Make legato for raspbian

> $make raspi

#Build error log

> cp -u -P --preserve=all targetFiles/shared/bin/configEcm targetFiles/shared/bin/install-hook targetFiles/shared/bin/legato targetFiles/shared/bin/cleanSandbox targetFiles/shared/bin/procInSandbox targetFiles/shared/bin/setNet targetFiles/shared/bin/debugCfg targetFiles/shared/bin/start targetFiles/shared/bin/security-unpack targetFiles/shared/bin/saveLogs /home/projekct/dev/legato-af/build/raspi/framework/bin  
> make[2]: Leaving directory ‘/home/projekct/dev/legato-af’  
> Computing MD5 hash for contents of framework bin and lib directories.  
> md5=` ( find /home/projekct/dev/legato-af/build/raspi/framework/bin && \ find /home/projekct/dev/legato-af/build/raspi/framework/bin -type f | xargs cat && \ find /home/projekct/dev/legato-af/build/raspi/framework/bin -type l | xargs -r -n 1 readlink && \ find /home/projekct/dev/legato-af/build/raspi/framework/lib && \ find /home/projekct/dev/legato-af/build/raspi/framework/lib -type f | xargs cat && \ find /home/projekct/dev/legato-af/build/raspi/framework/lib -type l | xargs -r -n 1 readlink \ ) | md5sum` &&   
> md5=${md5%% \*} &&   
> echo “$md5” \> /home/projekct/dev/legato-af/build/raspi/framework/md5  
> make[1]: Leaving directory ‘/home/projekct/dev/legato-af’  
> rm -f system.sdef  
> ln -s default.sdef system.sdef  
> mksys -t raspi -w build/raspi/system -o build/raspi system.sdef \

> \*\* ERROR:  
> /home/projekct/dev/legato-af/components/airVantage/avcDaemon/Component.cdef:36:8: error: Couldn’t find component ‘/home/projekct/dev/legato-af/platformAdaptor/at/components/le\_pa\_avc’.  
> Makefile:383: recipe for target ‘system\_raspi’ failed

---

<div class="post-metadata">

### Author: ![dfrancois](https://avatars.discourse-cdn.com/v4/letter/d/9e8a1a/32.png) [@dfrancois](https://forum.legato.io/u/dfrancois)
#### Post date: [September 26, 2016, 7:27am UTC](https://forum.legato.io/t/build-error-for-raspi-system-raspi-failed/2164/2 "2016-09-26T07:27:33Z")

</div>

Hi,

Some repositories are missing.  
You lust follow the clone instruction from Github: [GitHub - legatoproject/legato-af: Legato Application Framework](https://github.com/legatoproject/legato-af#clone-from-github)

---

<div class="post-metadata">

### Author: ![projekct](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@projekct](https://forum.legato.io/u/projekct)
#### Post date: [September 26, 2016, 7:57am UTC](https://forum.legato.io/t/build-error-for-raspi-system-raspi-failed/2164/3 "2016-09-26T07:57:05Z")

</div>

Thanks for information.  
I found missing repository for “platformAdaptor”

so I cloned platfromAdaptor.

> git clone [GitHub - legatoproject/legato-PlatformAdaptor-AT: AT commands Platform Adaptor for Legato](https://github.com/legatoproject/legato-PlatformAdaptor-AT)

but still build error. libComponent\_le\_pa.so can’t find le\_atClient\*.  
but le\_atCleint.c file is exist.  
How to include libComponent includes atClient object?

> build/raspi/system/component/obj/libComponent\_le\_pa.so: undefined reference to `le_atClient_Create' build/raspi/system/component/obj/libComponent_le_pa.so: undefined reference to `le\_atClient\_SetDevice’  
> build/raspi/system/component/obj/libComponent\_le\_pa.so: undefined reference to `le_atClient_SetFinalResponse' build/raspi/system/component/obj/libComponent_le_pa.so: undefined reference to `le\_atClient\_SetText’  
> build/raspi/system/component/obj/libComponent\_le\_pa.so: undefined reference to `le\_atClient\_Send’  
> collect2: error: ld returned 1 exit status  
> [256/266] Compiling C source  
> ninja: build stopped: subcommand failed.  
> Makefile:383: recipe for target ‘system\_raspi’ failed

---

<div class="post-metadata">

### Author: ![Vamsi3012](https://avatars.discourse-cdn.com/v4/letter/v/53a042/32.png) [@Vamsi3012](https://forum.legato.io/u/Vamsi3012)
#### Post date: [June 20, 2017, 3:10pm UTC](https://forum.legato.io/t/build-error-for-raspi-system-raspi-failed/2164/4 "2017-06-20T15:10:28Z")

</div>

Hello @projekct,

Were you able to solve this error? I am facing the same issue and would like to know how you solved it.

---

<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: [June 26, 2017, 10:42pm UTC](https://forum.legato.io/t/build-error-for-raspi-system-raspi-failed/2164/5 "2017-06-26T22:42:41Z")

</div>

Hi @Vamsi3012, @projekct

You need to clone Legato using repo and not directly through ‘git clone’.  
Cf [GitHub - legatoproject/legato-af: Legato Application Framework](https://github.com/legatoproject/legato-af#clone-from-github)

---

<div class="post-metadata">

### Author: ![Vamsi3012](https://avatars.discourse-cdn.com/v4/letter/v/53a042/32.png) [@Vamsi3012](https://forum.legato.io/u/Vamsi3012)
#### Post date: [June 27, 2017, 7:12am UTC](https://forum.legato.io/t/build-error-for-raspi-system-raspi-failed/2164/6 "2017-06-27T07:12:00Z")

</div>

Hello @CoRfr,

Thank you for the solution. But I am now facing a problem that is mentioned in the link below. Did you also face this issue? If so, were you able to solve it?

> [@Error while loading shared libraries](http://forum.legato.io/t/error-while-loading-shared-libraries/2265):
>
> Hi Everyone, I’m trying to go through the [Raspbian Info](http://legato.io/legato-docs/latest/raspbianMain.html) instructions for installing Legato on a raspberry pi. I’m building on a Ubuntu 16.04 VM and installing on a Raspberry Pi 1B. I seem to have no problems compiling both the kernel and Legato on the host machine but when I mount the squashfs to the pi and try to run sudo /./mnt/legato/start I get this error. ./system/bin/startSystem: error while loading shared libraries: liblegato.so: cannot open shared object file: No such file or directo…

Best Regards,  
Vamsi
