# Binary app packages build issue with sdef

**URL:** <https://mangoh.discourse.group/t/binary-app-packages-build-issue-with-sdef/1027>\
**Category:** Services\
**Created:** [December 26, 2017, 5:30am UTC](https://mangoh.discourse.group/t/binary-app-packages-build-issue-with-sdef/1027 "2017-12-26T05:30:35Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![niladridm](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/niladridm/32/91_2.png) [@niladridm](https://mangoh.discourse.group/u/niladridm)\
**Post date:** [December 26, 2017, 5:30am UTC](https://mangoh.discourse.group/t/binary-app-packages-build-issue-with-sdef/1027/1 "2017-12-26T05:30:35Z")

</div>

I am facing this issue with client - server application. I am trying to add my server app and client app in sdef like below

in default.sdef

apps:  
{  
myserver.wp85.app  
myclient.wp85.app  
}

bindings:  
{  
myclient.mydata -\> myserver.mydata  
}

but not able to build getting below error

\*\* ERROR:  
/home/mangoh/legato-17.11.0/build/wp85/system/binApps/myclient/myclient.adef:12:4: error: Executable ‘myclient’ not defined in application.  
Makefile:414: recipe for target ‘system\_wp85’ failed  
make: \*\*\* [system\_wp85] Error 1

But if I add only the server app in sdef that means no ipc binding defined in sdef then there is no error. it throwing error only when i add client app with the ipc binding.

tried with legato 16.10.03 and 17.11 but both the cases i am getting similar error.

Thanks

---

<div class="post-metadata">

**Author:** ![niladridm](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/niladridm/32/91_2.png) [@niladridm](https://mangoh.discourse.group/u/niladridm)\
**Post date:** [December 27, 2017, 7:51am UTC](https://mangoh.discourse.group/t/binary-app-packages-build-issue-with-sdef/1027/2 "2017-12-27T07:51:20Z")

</div>

is anybody facing this issue or am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![daav](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/daav/32/79_2.png) [@daav](https://mangoh.discourse.group/u/daav)\
**Post date:** [January 3, 2018, 8:53am UTC](https://mangoh.discourse.group/t/binary-app-packages-build-issue-with-sdef/1027/3 "2018-01-03T08:53:43Z")

</div>

Hi @niladridm  
Please can you share you adef files as well?  
The build error suggests a mistake there (rather than in the sdef file…)

---

<div class="post-metadata">

**Author:** ![niladridm](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/niladridm/32/91_2.png) [@niladridm](https://mangoh.discourse.group/u/niladridm)\
**Post date:** [January 3, 2018, 11:01am UTC](https://mangoh.discourse.group/t/binary-app-packages-build-issue-with-sdef/1027/4 "2018-01-03T11:01:20Z")

</div>

Thanks for your response.

I have tried with helloipc example code attached here [helloIpc.zip](https://mangoh.discourse.group/uploads/short-url/zJambhssT58nL9KbKgl4mzLVL59.zip) (25.3 KB)

and have the same issue (see below)

/home/mangoh/legato-16.10.3/build/wp750x/system/binApps/printClient/printClient.adef:43:4: error: Executable ‘client’ not defined in application.  
Makefile:382: recipe for target ‘system\_wp750x’ failed  
make: \*\*\* [system\_wp750x] Error 1

in my sdef i have these 2 apps along with other platform services

apps:  
{  
…  
$LEGATO\_ROOT/apps/myapps/printServer.wp750x.app  
$LEGATO\_ROOT/apps/myapps/printClient.wp750x.app

}

Thanks

---

<div class="post-metadata">

**Author:** ![daav](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/daav/32/79_2.png) [@daav](https://mangoh.discourse.group/u/daav)\
**Post date:** [January 5, 2018, 3:57pm UTC](https://mangoh.discourse.group/t/binary-app-packages-build-issue-with-sdef/1027/5 "2018-01-05T15:57:54Z")

</div>

Hi @niladridm

First thing to do is to make sure that the pointed .app files in the sdef file are not located in the same directory that the .adef file (to avoid confusion)  
That said, as soon as your adef file is correctly defined at the bindings level, you don’t need to specify it again in the sdef file.  
The bindings section of the sdef file is used only if you want to override the client app binding in order to bind it to something different (another implementation of the interface)

As soon as you have apps correctly defined, just pointing at them without overriding the binding should just work:

```
#include $LEGATO_ROOT/default.sdef

apps:
{
  printServer
  printClient
}

```

Build this with:

```
mksys -t wp750x -s /tmp/helloIpc/apps/ test.sdef

```

where /tmp/helloIpc/apps/ is the folder where your .app are stored, and you’re done.

---

<div class="post-metadata">

**Author:** ![niladridm](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/niladridm/32/91_2.png) [@niladridm](https://mangoh.discourse.group/u/niladridm)\
**Post date:** [January 6, 2018, 5:21am UTC](https://mangoh.discourse.group/t/binary-app-packages-build-issue-with-sdef/1027/6 "2018-01-06T05:21:20Z")

</div>

thank you daav.  
I am trying to follow all the steps shared by you but still having same issue. may be i am doing something wrong.  
my steps are

1. build helloipc for binary apps
2. copy both the .app files to /tmp/helloIpc/apps/
3. create test.sdef file inside legato-17.11.0 directory have  
#include $LEGATO\_ROOT/default.sdef

apps:  
{  
printServer  
printClient  
}  
4. run . bin/configlegatoenv  
5. mksys -t wp750x -s /tmp/helloIpc/apps/ test.sdef

but getting same error

…  
…

md5=${md5%% \*} &&   
echo “$md5” \> /home/mangoh/legato-17.11.0/build/wp750x/framework/md5  
make[1]: Leaving directory '/home/mangoh/legato-17.11.0’  
mksys -t wp750x -s /tmp/helloIpc/apps/ test.sdef  
\*\* ERROR:  
/home/mangoh/legato-17.11.0/\_build\_test/wp750x/binApps/printClient/printClient.adef:43:4: error: Executable ‘client’ not defined in application.  
Makefile:414: recipe for target ‘system\_wp750x’ failed  
make: \*\*\* [system\_wp750x] Error 1

Thanks

---

<div class="post-metadata">

**Author:** ![daav](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/daav/32/79_2.png) [@daav](https://mangoh.discourse.group/u/daav)\
**Post date:** [January 8, 2018, 8:18am UTC](https://mangoh.discourse.group/t/binary-app-packages-build-issue-with-sdef/1027/7 "2018-01-08T08:18:54Z")

</div>

Hi @niladridm

This file:

```
/home/mangoh/legato-17.11.0/_build_test/wp750x/binApps/printClient/printClient.adef

```

is extracted from the .app file, and is the one used by mksys to figure out what is the packed app content. Please can you share it so that we can see what is the issue?

---

<div class="post-metadata">

**Author:** ![niladridm](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/niladridm/32/91_2.png) [@niladridm](https://mangoh.discourse.group/u/niladridm)\
**Post date:** [January 8, 2018, 10:00am UTC](https://mangoh.discourse.group/t/binary-app-packages-build-issue-with-sdef/1027/8 "2018-01-08T10:00:34Z")

</div>

Hi Daav,  
here the adef file [printClient.adef](https://mangoh.discourse.group/uploads/short-url/uf9XTkCTtuzjpmGJRXW4i1qWtqe.adef) (606 Bytes)

Please look into this.

Thanks

---

<div class="post-metadata">

**Author:** ![daav](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/daav/32/79_2.png) [@daav](https://mangoh.discourse.group/u/daav)\
**Post date:** [January 8, 2018, 1:13pm UTC](https://mangoh.discourse.group/t/binary-app-packages-build-issue-with-sdef/1027/9 "2018-01-08T13:13:46Z")

</div>

Hi @niladridm

The file doesn’t look good indeed.  
Are your binary apps built with Legato 17.11 as well?  
There were bugs on binary apps generation in Legato 16.10.3 which are fixed on recent versions…

---

<div class="post-metadata">

**Author:** ![niladridm](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/niladridm/32/91_2.png) [@niladridm](https://mangoh.discourse.group/u/niladridm)\
**Post date:** [January 8, 2018, 3:48pm UTC](https://mangoh.discourse.group/t/binary-app-packages-build-issue-with-sdef/1027/11 "2018-01-08T15:48:47Z")

</div>

Yes Daav thanks, you are right. No problem if i build my apps using 17.11

---

<div class="post-metadata">

**Author:** ![niladridm](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/niladridm/32/91_2.png) [@niladridm](https://mangoh.discourse.group/u/niladridm)\
**Post date:** [January 8, 2018, 5:38pm UTC](https://mangoh.discourse.group/t/binary-app-packages-build-issue-with-sdef/1027/12 "2018-01-08T17:38:19Z")

</div>

Hi davv want to know how do i update Legato 16.10.3 package to recent version.

thanks

---

<div class="post-metadata">

**Author:** ![daav](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/daav/32/79_2.png) [@daav](https://mangoh.discourse.group/u/daav)\
**Post date:** [January 9, 2018, 7:03am UTC](https://mangoh.discourse.group/t/binary-app-packages-build-issue-with-sdef/1027/13 "2018-01-09T07:03:09Z")

</div>

Hi @niladridm

We’re working at providing preliminary packages more systematically (when waiting for products to be upgraded to more recent Legato versions).

In the meantime, I guess you successfully built the Legato framework in version 17.11  
The build folder will contain the **legato.cwe** file for your module. You just need to install it on the device (with fwupdate or swiflash) to get it upgraded.

---

<div class="post-metadata">

**Author:** ![niladridm](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/niladridm/32/91_2.png) [@niladridm](https://mangoh.discourse.group/u/niladridm)\
**Post date:** [January 10, 2018, 4:00am UTC](https://mangoh.discourse.group/t/binary-app-packages-build-issue-with-sdef/1027/14 "2018-01-10T04:00:03Z")

</div>

Thank you Daav. yes I have upgraded to 17.11 and as of now do not have any problem.

---

<div class="post-metadata">

**Author:** ![niladridm](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/niladridm/32/91_2.png) [@niladridm](https://mangoh.discourse.group/u/niladridm)\
**Post date:** [January 11, 2018, 5:01am UTC](https://mangoh.discourse.group/t/binary-app-packages-build-issue-with-sdef/1027/15 "2018-01-11T05:01:24Z")

</div>

Hi daav,  
now we have app update issue after up-gradation of the legato from 16.10.3 to 17.11  
I am Getting below error message

Jan 11 04:57:00 | updateDaemon[495]/framework T=main | LE\_FILENAME file\_CopyRecursive() 807 | No such path : ‘/tmp/legato\_logs/syslog-myapp1-1515644251’  
Jan 11 04:57:00 | updateDaemon[495]/updateDaemon T=main | updateDaemon.c ApplyAppUpdate() 724 | Failed to install app myapp2\<3e70d6422d3bd9aa3e25513fc26ff995\>’.  
Jan 11 04:57:00 | updateDaemon[495]/updateDaemon T=main | updateDaemon.c UpdateFailed() 417 | Update failed!!

Thanks

---

<div class="post-metadata">

**Author:** ![daav](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/daav/32/79_2.png) [@daav](https://mangoh.discourse.group/u/daav)\
**Post date:** [January 11, 2018, 6:37am UTC](https://mangoh.discourse.group/t/binary-app-packages-build-issue-with-sdef/1027/16 "2018-01-11T06:37:49Z")

</div>

Hi @niladridm

are you sure that the apps you try to install are now built with 17.11?  
Otherwise my guess is that apps built with 16.10.3 won’t install over 17.11…

---

<div class="post-metadata">

**Author:** ![niladridm](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/niladridm/32/91_2.png) [@niladridm](https://mangoh.discourse.group/u/niladridm)\
**Post date:** [January 11, 2018, 8:25am UTC](https://mangoh.discourse.group/t/binary-app-packages-build-issue-with-sdef/1027/17 "2018-01-11T08:25:23Z")

</div>

yes, all our apps rebuild using 17.11  
We can install / remove apps using update /app tool manually without any issue but we are facing this issue, when we used our existing SOTA Service app(based on update api [http://legato.io/legato-docs/latest/c\_update.html](http://legato.io/legato-docs/latest/c_update.html)) to install any app from our ftp. After this we are now not able to install or remove any app manually using UPDATE and APP tools also because of earlier mentioned error .  
May be our SOTA Service app needs some modification to work good with 17.11

Thanks  
Niladri
