SDK not being used by mkapp

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

can you try with LEAF+VSCODE?

https://docs.legato.io/latest/tools_vsCode.html

Since this is a remote login to a dev server, no.

Just for fun, I attempted to locally on my desktop, and even though the Legato plugin is installed in vsCode (and I restarted the app for good measure), I don’t see any “Leaf” menu anywhere, even after opening an active Leaf Workspace folder according to the instructions.

You mean you cannot see the available list?

https://docs.legato.io/latest/tools_vsCodeInstall.html

Ok, so the problem with vsCode was that I didn’t notice the new “leaf” tab on the left. Still haven’t really used it since it’s not particularly discoverable, but…

I did, get leaf working. What was not clear, anywhere, is that legato-spm is no longer used, and that leaf is a replacement, not just a supplement. Removing everything installed by legato-spm did fix this.