# MangoH Red WP8548 Build FAILS

**URL:** <https://mangoh.discourse.group/t/mangoh-red-wp8548-build-fails/3006>\
**Category:** mangOH Red\
**Created:** [October 26, 2019, 9:43am UTC](https://mangoh.discourse.group/t/mangoh-red-wp8548-build-fails/3006 "2019-10-26T09:43:15Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohanFT](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@mohanFT](https://mangoh.discourse.group/u/mohanFT)\
**Post date:** [October 26, 2019, 9:43am UTC](https://mangoh.discourse.group/t/mangoh-red-wp8548-build-fails/3006/1 "2019-10-26T09:43:15Z")

</div>

Hi Forum  
I am stuck with an build issue while ‘Build/Install mangOH distribution’ for mangOH Red WP8548. Please see if anyone of you could help.  
I use,  
Ubuntu - 18.04  
Legato - 18.09

1. 

At /home/mangoh/mangOH, when I give ‘make red\_wp85’, it FAILS with error as found below,  
\*\* ERROR:  
/home/mangoh/legato\_framework/legato/modules/WiFi/service/daemon/Component.cdef:15:4: error: Couldn’t find source file ‘/home/mangoh/legato\_framework/legato/modules/WiFi/service/platformAdaptor//home/mangoh/legato\_framework/legato/modules/WiFi/service/platformAdaptor/ti/pa\_wifi.sh/pa\_wifi\_client\_ti.c’  
Makefile:131: recipe for target ‘red\_wp85’ failed

1. 

ls -al build/update\_files/\*  
-\> doesn’t lists any update files  
Because,  
Since the ‘make’ fails, the directory ‘update\_files’ and the update files doesn’t get created under,  
/home/mangoh/mangOH/build/

1. 

So, I couldn’t move on to install the latest updates,  
-\> Install the mangOH Red Distribution specific to the CF3 module on your mangOH board:  
$ update ~/mangOH/build/update\_files/red/ 192.168.2.2

1. 

So, I don’t see ‘redSensortoCloud’ service listed under

# app status

Which ofcourse means that, the mangOH Red WP8548 is not completely installed.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [October 29, 2019, 2:14am UTC](https://mangoh.discourse.group/t/mangoh-red-wp8548-build-fails/3006/2 "2019-10-29T02:14:30Z")

</div>

/home/mangoh/legato\_framework/legato/modules/WiFi/service/daemon/Component.cdef

In line 15, change to the followings:

* * *

// {LEGATO\_WIFI\_ROOT}/service/platformAdaptor/{LEGATO\_WIFI\_PA}/pa\_wifi\_client\_ti.c  
// {LEGATO\_WIFI\_ROOT}/service/platformAdaptor/{LEGATO\_WIFI\_PA}/pa\_wifi\_ap\_ti.c

{LEGATO\_WIFI\_ROOT}/service/platformAdaptor/ti/pa\_wifi\_client\_ti.c {LEGATO\_WIFI\_ROOT}/service/platformAdaptor/ti/pa\_wifi\_ap\_ti.c

* * *

---

<div class="post-metadata">

**Author:** ![mohanFT](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@mohanFT](https://mangoh.discourse.group/u/mohanFT)\
**Post date:** [October 29, 2019, 12:49pm UTC](https://mangoh.discourse.group/t/mangoh-red-wp8548-build-fails/3006/3 "2019-10-29T12:49:34Z")

</div>

Hi, thanks much.  
The earlier error related to WiFi is resolved.  
Now, I get the below error while I try ‘make red\_wp85’. Pls see if you could assist.

\*\* ERROR:  
/home/mangoh/mangOH/apps/DataHub/components/json/Component.cdef:22:13: error: Unexpected subsection name ‘headerDir’ in ‘provides’ section.  
Makefile:131: recipe for target ‘red\_wp85’ failed  
make: \*\*\* [red\_wp85] Error 1  
mangoh@mangoh-vm:~/mangOH$

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [October 29, 2019, 1:15pm UTC](https://mangoh.discourse.group/t/mangoh-red-wp8548-build-fails/3006/4 "2019-10-29T13:15:02Z")

</div>

change to the followings:

* * *

// headerDir:  
// {  
// $CURDIR  
// }

* * *

---

<div class="post-metadata">

**Author:** ![mohanFT](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@mohanFT](https://mangoh.discourse.group/u/mohanFT)\
**Post date:** [October 29, 2019, 1:31pm UTC](https://mangoh.discourse.group/t/mangoh-red-wp8548-build-fails/3006/5 "2019-10-29T13:31:06Z")

</div>

Thanks much for immediate response.

The build has encountered the below error now,  
/home/mangoh/mangOH/apps/BatteryService/batteryComponentRed/battery.c:33:26: fatal error: batteryUtils.h: No such file or directory  
#include “batteryUtils.h”

Tried,  
// #include “batteryUtils.h”

But, it leads to some other issues and build fails as found below,

for dir in tests doc platform-specific sha2 aes ecc; do   
make -C $dir install=“cp” includedir=/home/mangoh/legato\_framework/legato/build/wp85/3rdParty/tinydtls/include/tinydtls install;   
done  
make[2]: Entering directory ‘/home/mangoh/mangOH/build/red\_wp85/component/15261e8fcca914bdb7113b7a8fc5211f/tests’  
:  
make[2]: Leaving directory ‘/home/mangoh/mangOH/build/red\_wp85/component/15261e8fcca914bdb7113b7a8fc5211f/tests’  
make[2]: Entering directory ‘/home/mangoh/mangOH/build/red\_wp85/component/15261e8fcca914bdb7113b7a8fc5211f/doc’  
make[2]: \*\*\* No rule to make target ‘html’, needed by ‘install’. Stop.  
make[2]: Leaving directory ‘/home/mangoh/mangOH/build/red\_wp85/component/15261e8fcca914bdb7113b7a8fc5211f/doc’  
make[2]: Entering directory ‘/home/mangoh/mangOH/build/red\_wp85/component/15261e8fcca914bdb7113b7a8fc5211f/platform-specific’  
:  
make[2]: Leaving directory ‘/home/mangoh/mangOH/build/red\_wp85/component/15261e8fcca914bdb7113b7a8fc5211f/platform-specific’  
make[2]: Entering directory ‘/home/mangoh/mangOH/build/red\_wp85/component/15261e8fcca914bdb7113b7a8fc5211f/sha2’  
test -d /home/mangoh/legato\_framework/legato/build/wp85/3rdParty/tinydtls/include/tinydtls/sha2 || mkdir -p /home/mangoh/legato\_framework/legato/build/wp85/3rdParty/tinydtls/include/tinydtls/sha2  
cp sha2.h /home/mangoh/legato\_framework/legato/build/wp85/3rdParty/tinydtls/include/tinydtls/sha2  
make[2]: Leaving directory ‘/home/mangoh/mangOH/build/red\_wp85/component/15261e8fcca914bdb7113b7a8fc5211f/sha2’  
make[2]: Entering directory ‘/home/mangoh/mangOH/build/red\_wp85/component/15261e8fcca914bdb7113b7a8fc5211f/aes’  
test -d /home/mangoh/legato\_framework/legato/build/wp85/3rdParty/tinydtls/include/tinydtls/aes || mkdir -p /home/mangoh/legato\_framework/legato/build/wp85/3rdParty/tinydtls/include/tinydtls/aes  
cp rijndael.h /home/mangoh/legato\_framework/legato/build/wp85/3rdParty/tinydtls/include/tinydtls/aes  
make[2]: Leaving directory ‘/home/mangoh/mangOH/build/red\_wp85/component/15261e8fcca914bdb7113b7a8fc5211f/aes’  
make[2]: Entering directory ‘/home/mangoh/mangOH/build/red\_wp85/component/15261e8fcca914bdb7113b7a8fc5211f/ecc’  
test -d /home/mangoh/legato\_framework/legato/build/wp85/3rdParty/tinydtls/include/tinydtls/ecc || mkdir -p /home/mangoh/legato\_framework/legato/build/wp85/3rdParty/tinydtls/include/tinydtls/ecc  
cp ecc.h test\_helper.h /home/mangoh/legato\_framework/legato/build/wp85/3rdParty/tinydtls/include/tinydtls/ecc  
make[2]: Leaving directory ‘/home/mangoh/mangOH/build/red\_wp85/component/15261e8fcca914bdb7113b7a8fc5211f/ecc’  
make[1]: Leaving directory ‘/home/mangoh/mangOH/build/red\_wp85/component/15261e8fcca914bdb7113b7a8fc5211f’  
ninja: build stopped: subcommand failed.  
Makefile:131: recipe for target ‘red\_wp85’ failed  
make: \*\*\* [red\_wp85] Error 1

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [October 29, 2019, 1:44pm UTC](https://mangoh.discourse.group/t/mangoh-red-wp8548-build-fails/3006/6 "2019-10-29T13:44:54Z")

</div>

/home/mangoh/mangOH/apps/BatteryService/batteryComponentRed/Component.cdef  
in line 9, add one line under cflags section:

* * *

cflags:  
{  
-std=c99  
-I${CURDIR}/…/batteryUtils  
}

* * *

---

<div class="post-metadata">

**Author:** ![mohanFT](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@mohanFT](https://mangoh.discourse.group/u/mohanFT)\
**Post date:** [October 29, 2019, 1:52pm UTC](https://mangoh.discourse.group/t/mangoh-red-wp8548-build-fails/3006/7 "2019-10-29T13:52:20Z")

</div>

Thank you.  
Next issue,

LevelFilterPtr “-DCOMPONENT\_INIT=LE\_CI\_LINKAGE LE\_SHARED void \_batteryComponentRed\_COMPONENT\_INIT()” -std=c99 -l/home/mangoh/mangOH/apps/BatteryService/batteryComponentRed/…/batteryUtils  
/home/mangoh/mangOH/apps/BatteryService/batteryComponentRed/battery.c: In function ‘UpdateChargeLevel’:  
/home/mangoh/mangOH/apps/BatteryService/batteryComponentRed/battery.c:686:9: error: implicit declaration of function ‘util\_WriteIntToFile’ [-Werror=implicit-function-declaration]  
util\_WriteIntToFile(path, uAh);  
^ ~~~~~~~~~~~~~~~~~~  
/home/mangoh/mangOH/apps/BatteryService/batteryComponentRed/battery.c: In function ‘ReadChargingStatus’:  
/home/mangoh/mangOH/apps/BatteryService/batteryComponentRed/battery.c:706:21: error: implicit declaration of function ‘util\_ReadStringFromFile’ [-Werror=implicit-function-declaration]  
le\_result\_t r = util\_ReadStringFromFile(StatusFilePath, chargingStatus, sizeof(chargingStatus));  
^ ~~~~~~~~~~~~~~~~~~~~~~  
/home/mangoh/mangOH/apps/BatteryService/batteryComponentRed/battery.c: In function ‘ReadChargeCounter’:  
/home/mangoh/mangOH/apps/BatteryService/batteryComponentRed/battery.c:765:26: error: implicit declaration of function ‘util\_ReadIntFromFile’ [-Werror=implicit-function-declaration]  
le\_result\_t result = util\_ReadIntFromFile(path, &counter);  
^ ~~~~~~~~~~~~~~~~~~~  
cc1: all warnings being treated as errors  
[448/524] Packaging app  
ninja: build stopped: subcommand failed.  
Makefile:131: recipe for target ‘red\_wp85’ failed  
make: \*\*\* [red\_wp85] Error 1  
mangoh@mangoh-vm:~/mangOH$

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [October 29, 2019, 2:01pm UTC](https://mangoh.discourse.group/t/mangoh-red-wp8548-build-fails/3006/8 "2019-10-29T14:01:27Z")

</div>

Maybe you can try directly comment out the battery app in sdef file.

---

<div class="post-metadata">

**Author:** ![mohanFT](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@mohanFT](https://mangoh.discourse.group/u/mohanFT)\
**Post date:** [October 29, 2019, 2:29pm UTC](https://mangoh.discourse.group/t/mangoh-red-wp8548-build-fails/3006/9 "2019-10-29T14:29:07Z")

</div>

Hi,  
Yes, I removed,  
~/mangOH/apps/BatteryService/batteryComponentRed$ gvim Component.cdef &  
sources:  
{  
[//battery.c](https://battery.c)  
}

The build is successful now. As you see, the “update\_files” directory and the “red.wp85.update” are created.

mangoh@mangoh-vm:~/mangOH/build/update\_files$ ls -al \*  
-rw-rw-r-- 1 mangoh mangoh 6118455 Oct 29 14:15 red.wp85.update

In future, we might require the Battery App.  
Would MangoH Forum upcoming release would fix these issues (those I removed)?  
Can you please update the product team on this?
