legatoproject / legato-af

Legato Application Framework
Mozilla Public License 2.0
153 stars 118 forks source link

Compile error with FW 15.1 Toolchain and Legato 21.05.0 (distributed with FW 15.1 Comps) #76

Open upsampled opened 7 months ago

upsampled commented 7 months ago

I am trying to compile with FW 15.1 Toolchain, Legato version 21.05.0 (also on the FW 15.1 component page) and getting the following error:

/var/wp77xx/yocto/legato/framework/daemons/linux/start/start.c: In function ‘RunCurrentSystem’:
/var/wp77xx/yocto/legato/framework/daemons/linux/start/start.c:1670:13: error: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Werror=unused-result]
 1670 |             system("echo start 10000000000 > /sys/power/wake_lock");
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

It is a pretty easy fix, but I do expect the toolchain to be able to compile the legato version in the same release. Right now I am doing the following:

# setup
## fix github sunsetting anon git protocol access in 2022
git config --global url."git@github.com:".insteadOf git://github.com/
## isntall the yocto toolchain
./poky-swi-ext-glibc-x86_64-meta-toolchain-swi-armv7a-neon-swi-mdm9x28-wp-toolchain-swi-SWI9X06Y_03.00.13.00.sh

then to compile i run

. /opt/swi/SWI9X06Y_03.00.13.00/environment-setup-armv7a-neon-poky-linux-gnueabi
python3 /opt/repo init -u git://github.com/legatoproject/manifest -m legato/releases/21.05.0.xml
python3 /opt/repo sync
make
upsampled commented 7 months ago

Ok I have gotten this working by just using the Yocto Env:

tar xf Legato-Dist-Source-mdm9x06-SWI9X06Y_03.00.13.00.tar.bz2
cd ./yocto
repo init -u git://github.com/legatoproject/manifest -m legato/releases/21.05.0.xml
repo sync
make dev
cd ../legato
make
make wp77xx

I am keeping this ticket open to indicate you need to update your build instructions