Unable to build source from mangoh/mangoh repo

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:

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.

Hi,

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

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

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:

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

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

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?

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.

Great, thanks @dfrey that did the trick.