I set up leaf on a new Ubuntu system exactly according to:
https://docs.legato.io/latest/confLeaf.html
paul@paul-VirtualBox:~/myWorkspace$ leaf shell
Leaf Shell /bin/bash started in Leaf environment.
(lsh:wp77stable) paul@paul-VirtualBox:~/myWorkspace$ date
Wed Mar 4 16:23:45 EST 2020
(lsh:wp77stable) paul@paul-VirtualBox:~/myWorkspace$ cd apps/helloTest
(lsh:wp77stable) paul@paul-VirtualBox:~/myWorkspace/apps/helloTest$ ls
helloTest.adef helloTestComponent
(lsh:wp77stable) paul@paul-VirtualBox:~/myWorkspace/apps/helloTest$ mkapp helloTest.adef
ninja: error: '/home/paul/myWorkspace/leaf-data/wp77stable/wp77-legato/build/localhost/framework/lib/liblegato.so', needed by '/home/paul/myWorkspace/apps/helloTest/_build_helloTest/localhost/component/9fb74ac50a5bfe9e8922f2ebc23886f0/obj/libComponent_helloTestComponent.so', missing and no known rule to make it
(lsh:wp77stable) paul@paul-VirtualBox:~/myWorkspace/apps/helloTest$ ls
_build_helloTest helloTest.adef helloTestComponent
(lsh:wp77stable) paul@paul-VirtualBox:~/myWorkspace/apps/helloTest$ ls -l
total 12
drwxr-xr-x 3 paul paul 4096 Mar 4 16:23 _build_helloTest
-rw------- 1 paul paul 227 Mar 4 16:06 helloTest.adef
drwx------ 2 paul paul 4096 Mar 4 16:21 helloTestComponent
(lsh:wp77stable) paul@paul-VirtualBox:~/myWorkspace/apps/helloTest$
(lsh:wp77stable) paul@paul-VirtualBox:~/myWorkspace$ find ~ -name liblegato.so
/home/paul/.leaf/wp77-legato_19.07.0-201909032009/build/wp77xx/framework/lib/liblegato.so
(lsh:wp77stable) paul@paul-VirtualBox:~/myWorkspace$
It appears that the link library path is not being set up.