I am trying to compile sample app ‘useLegatoApi’, but I am running into the following two errors:
$ cd /legato-af/apps/samples/legace/useLegatoApi
$ make wp85
mkcomp --stand-alone -t wp85 -i /home/pivaz/Legato/legato-af/interfaces/modemServices api_client
[3/3] /opt/swi/y16-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-…6de55acfa7a2f/client/le_info_client.c.o -Wall -fPIC -Werror -DMK_TOOLS_BUIL
/opt/swi/y16-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc -c main.c -I_build -I/home/pivaz/Legato/legato-af/framework/c/inc
main.c:3:24: fatal error: interfaces.h: No such file or directory
compilation terminated.
make: *** [main.o] Error 1
‘mkcomp …’ creates the ‘_build’ folder. “interfaces.h” is inside folder, but its path is '_build/component/api_client/src/interfaces.h", looking at the makefile the expected location should be “_build/interfaces.h”. Similar thing for “le_info_interfaces.h”, its actual location is “_build/api/ec20858f80d55f58b606de55acfa7a2f/client/le_info_interface.h”, not “_build/le_info_interfaces.h”
Attempted solution:
I modified the makefile to include ‘-I _build/api/ec20858f80d55f58b606de55acfa7a2f/client/’ and ‘-I _build/component/api_client/src’, and that gets me past the ‘interfaces.h: no such file or directory’ problem…but then the make can’t find libIF_le_info_client.so.
$ make wp85
mkcomp --stand-alone -t wp85 -i /home/pivaz/Legato/legato-af/interfaces/modemServices api_client
[3/3] /opt/swi/y16-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-…6de55acfa7a2f/client/le_info_client.c.o -Wall -fPIC -Werror -DMK_TOOLS_BUIL
/opt/swi/y16-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc -c main.c -I_build -I_build/component/api_client/src -I_build/api/ec20858f80d55f58b606de55acfa7a2f/client -I/home/pivaz/Legato/legato-af/framework/c/inc
/opt/swi/y16-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc -o legacy main.o libIF_le_info_client.so -L/home/pivaz/Legato/legato-af/build/wp85/bin/lib -llegato
arm-poky-linux-gnueabi-gcc: error: libIF_le_info_client.so: No such file or directory
make: *** [legacy] Error 1
I checked $LEGATO_ROOT/build/wp85/bin/lib, could not find the .so file there.
Note: I have ninja-build installed.
Host: Ubuntu 14.04 x64
Modem: WP85
Legato: 15.05 Beta