Build error for raspi ('system_raspi' failed)


#1

Hi,
I tried to follow the raspi build guide(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 :slight_smile:

Below is my build step.

  1. Git clone for legato

git clone https://github.com/legatoproject/legato-af.git

  1. Git clone for raspberry tools

git clone 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


#2

Hi,

Some repositories are missing.
You lust follow the clone instruction from Github: https://github.com/legatoproject/legato-af#clone-from-github


#3

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

so I cloned platfromAdaptor.

git clone 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 tole_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 tole_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


#4

Hello @projekct,

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


#5

Hi @Vamsi3012, @projekct

You need to clone Legato using repo and not directly through ‘git clone’.
Cf https://github.com/legatoproject/legato-af#clone-from-github


#6

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?

Best Regards,
Vamsi