After installing the WP77XX SDK via legato-spm, I’m getting build errors, even for the samples. It seems to be using my host gcc, rather than target gcc.
alex@devspace:~$ legato-spm -i -m WP77XX
Browsing repository content
Browsing repository
Fetching content.jar (3 KB - 18 KB/s)
Fetching artifacts.jar (1 KB - 5 KB/s)
<More Fetching...>
Fetching artifacts.jar (1 KB - 5 KB/s)
========== Install pending packages ==========
Found 0 update site
========== Install packages ==========
<License Text Here>
Do you accept the license? [Y/n]
y
Following packages will be installed
- Legato for WP77 R11 (18.9.2.wp77xx-native-x86_64-201906171503)
- Legato Application Framework (18.9.2.wp77xx-201906171436)
- Legato Device Image for WP77 R11 (2.22.12.00.wp76xx-201906171439)
- GCC cross compiler Toolchain (0.22.12.00.SWI9X06Y_02221200-wp77xx-native-x86_64-201906171428)
- Legato Recovery Tooling for Linux (4.0.8.2.linux-201809040840)
Do you want to continue? [Y/n]
y
Installing 5 packages
Installing 5 package(s)
Loading repositories...
Fetching <...>
Fetching legato.recovery@4.0.8 (3 MB/3 MB - 1 MB/s)
Extracting temp1159289472201282455.jar
Fetching <...>
Fetching legato.device.image@2.22.12 (96 MB/96 MB - 3 MB/s)
Extracting temp3908498072701032560.jar
Fetching legato.sdk@18.9.2 (4 KB/4 KB - 22 KB/s)
Extracting temp1309299572086994025.jar
Fetching <...>
Fetching legato.toolchain@0.22.12 (232 MB/232 MB - 4 MB/s)
Extracting temp1661648349462035468.jar
Fetching <...>
Fetching legato.framework@18.9.2 (35 MB/35 MB - 6 MB/s)
Extracting temp4946767853190476283.jar
Refreshing installed packages...
Managing post install operations...
Post install Legato Application Framework (18.9.2.wp77xx-201906171436)
Extract framework archive
Init tools
Post install Legato Device Image for WP77 R11 (2.22.12.00.wp76xx-201906171439)
Updating permissions
Post install GCC cross compiler Toolchain (0.22.12.00.SWI9X06Y_02221200-wp77xx-native-x86_64-201906171428)
Updating permissions
Extract native toolchain
Prepare toolchain for kernel modules build
Post install Legato Recovery Tooling for Linux (4.0.8.2.linux-201809040840)
Updating permissions
Post install Legato for WP77 R11 (18.9.2.wp77xx-native-x86_64-201906171503)
License accept
Create link
Done.
alex@devspace:~$ cd legato/packages/legato.framework.18.9.2.wp77xx-201906171436/resources/legato/
alex@devspace:~/legato/packages/legato.framework.18.9.2.wp77xx-201906171436/resources/legato$ source bin/configlegatoenv
alex@devspace:~/legato/packages/legato.framework.18.9.2.wp77xx-201906171436/resources/legato$ cd apps/sample/httpGet
alex@devspace:~/legato/packages/legato.framework.18.9.2.wp77xx-201906171436/resources/legato/apps/sample/httpGet$ mkapp -t WP77XX -i ../../../interfaces/modemServices/ httpGet.adef
** WARNING: Failed to receive sysroot path from compiler 'gcc --print-sysroot' (errno: Success).
ninja: error: '/curl/not/found', needed by '_build_httpGet/WP77XX/app/httpGet/staging/read-only/lib/found', missing and no known rule to make it
alex@devspace:~/legato/packages/legato.framework.18.9.2.wp77xx-201906171436/resources/legato/apps/sample/httpGet$ cd ../helloWorld/
alex@devspace:~/legato/packages/legato.framework.18.9.2.wp77xx-201906171436/resources/legato/apps/sample/helloWorld$ mkapp -t WP77XX helloWorld.adef
** WARNING: Failed to receive sysroot path from compiler 'gcc --print-sysroot' (errno: Success).
ninja: error: '/home/alex/legato/packages/legato.framework.18.9.2.wp77xx-201906171436/resources/legato/build/WP77XX/framework/lib/liblegato.so', needed by '_build_helloWorld/WP77XX/staging/read-only/lib/libComponent_helloComponent.so', missing and no known rule to make it
alex@devspace:~/legato/packages/legato.framework.18.9.2.wp77xx-201906171436/resources/legato/apps/sample/httpGet$ exit