# Unable to build source from mangoh/mangoh repo

**URL:** <https://mangoh.discourse.group/t/unable-to-build-source-from-mangoh-mangoh-repo/3127>\
**Category:** mangOH Yellow\
**Created:** [December 6, 2019, 3:19am UTC](https://mangoh.discourse.group/t/unable-to-build-source-from-mangoh-mangoh-repo/3127 "2019-12-06T03:19:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnemaddox](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@johnemaddox](https://mangoh.discourse.group/u/johnemaddox)\
**Post date:** [December 6, 2019, 3:19am UTC](https://mangoh.discourse.group/t/unable-to-build-source-from-mangoh-mangoh-repo/3127/1 "2019-12-06T03:19:29Z")

</div>

I’m trying to build the BluetoothSensorTag sample project from the mangOH/mangOH repository. Unfortunately, this project fails to build. Before building, I synced the repo to the latest. I also updated my leaf profile, which is currently mangOH-yellow-wp77xx\_0.3.0.

Source:

> **[mangOH/mangOH](https://github.com/mangOH/mangOH/tree/master/samples)**
>
> Primary mangOH git repository. Contribute to mangOH/mangOH development by creating an account on GitHub.

When I run mkapp -t wp77xx bluetoothSensorTag.adef, I get the following error.

\*\* ERROR:  
/mangOH/samples/BluetoothSensorTag/sensorTagComponent/Component.cdef:29:8: error: Couldn’t find component ‘bluezDBus’.

I navigated to the components directory and verified that there is a bluezDBus directory inside of it.

I thought doing a system build from the root directory would pickup the missing dependencies, but it also failed.

mksys -t wp77xx yellow.sdef

From the root directory, running mksys -t wp77xx  
/mangOH/apps/Bme680EnvironmentalSensor/bsecIntegrationComponent/bsecIntegration.c:3:10: fatal error: bsec\_interface.h: No such file or directory  
#include “bsec\_interface.h”  
^ ~~~~~~~~~~~~~~~~~  
compilation terminated.  
[1127/1345] Generating IPC interface code  
ninja: build stopped: subcommand failed.

---

<div class="post-metadata">

**Author:** ![jchitty](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jchitty/32/846_2.png) [@jchitty](https://mangoh.discourse.group/u/jchitty)\
**Post date:** [December 6, 2019, 3:55am UTC](https://mangoh.discourse.group/t/unable-to-build-source-from-mangoh-mangoh-repo/3127/2 "2019-12-06T03:55:42Z")

</div>

Hi,

> [@johnemaddox](#):
>
> /mangOH/apps/Bme680EnvironmentalSensor/bsecIntegrationComponent/bsecIntegration.c:3:10: fatal error: bsec\_interface.h: No such file or directory  
> #include “bsec\_interface.h”  
> ^ ~~~~~~~~~~~~~~~~~

You need to set the BSEC\_DIR environment variable to the file system path where the Bosch Bsec library can be found. If you run `make yellow_wp77xx`, it should give you some more helpful error messages. But, basically, you download the zip file from the link below and unzip it in your components/boschBsec directory.

[https://community.bosch-sensortec.com/varuj77995/attachments/varuj77995/bst\_community-mems-forum/44/1/BSEC\_1.4.7.2\_GCC\_CortexA7\_20190225.zip](https://community.bosch-sensortec.com/varuj77995/attachments/varuj77995/bst_community-mems-forum/44/1/BSEC_1.4.7.2_GCC_CortexA7_20190225.zip)

Alternatively, if you don’t care about using the environmental sensor, you can comment-out the environment app and the related bindings in yellow.sdef.

–Jen

---

<div class="post-metadata">

**Author:** ![dfrey](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/dfrey/32/303_2.png) [@dfrey](https://mangoh.discourse.group/u/dfrey)\
**Post date:** [December 6, 2019, 3:58pm UTC](https://mangoh.discourse.group/t/unable-to-build-source-from-mangoh-mangoh-repo/3127/3 "2019-12-06T15:58:12Z")

</div>

As @jchitty mentioned, you can likely fix your problem by setting `$BSEC_DIR` and building the whole system. If you just want to build the `bluetoothSensorTag` app, then you need to let the `mkapp` program know where to find the `bluezDBus` component. That component is located in the `components` subdirectory of the mangOH repository. So you want to run:

```auto
mkapp -t wp77xx --source-search ../../components bluetoothSensorTag.adef

```

The `../../components` path is because the `bluetoothSensorTag.adef` is located in `samples/BluetoothSensorTag`.

---

<div class="post-metadata">

**Author:** ![johnemaddox](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@johnemaddox](https://mangoh.discourse.group/u/johnemaddox)\
**Post date:** [December 6, 2019, 10:39pm UTC](https://mangoh.discourse.group/t/unable-to-build-source-from-mangoh-mangoh-repo/3127/4 "2019-12-06T22:39:03Z")

</div>

I have a quick follow up question for you or @dfrey. If I need to use the bluezDBus component in a custom project, do I need to put the component directory in my project, or is there a way to reference it?

For example, I target the Legato Root directory using $LEGATO\_ROOT to include the curl component, but the Legato components directory does not contain bluezDBus.

I’m assuming the MangOH project is a layer above Legato so the bluezDBUS component needs to be dropped into my project. Is this correct?

---

<div class="post-metadata">

**Author:** ![dfrey](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/dfrey/32/303_2.png) [@dfrey](https://mangoh.discourse.group/u/dfrey)\
**Post date:** [December 6, 2019, 10:52pm UTC](https://mangoh.discourse.group/t/unable-to-build-source-from-mangoh-mangoh-repo/3127/5 "2019-12-06T22:52:54Z")

</div>

You either have to put the parent directory (the one that contains the directory that contains `Component.cdef` into the `componentSearch: { }` section of your SDEF or you can pass `--source-search /path/to/parent/dir` to `mksys` or `mkapp`.

---

<div class="post-metadata">

**Author:** ![johnemaddox](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@johnemaddox](https://mangoh.discourse.group/u/johnemaddox)\
**Post date:** [December 6, 2019, 11:00pm UTC](https://mangoh.discourse.group/t/unable-to-build-source-from-mangoh-mangoh-repo/3127/6 "2019-12-06T23:00:48Z")

</div>

Great, thanks @dfrey that did the trick.
