Mangoh-to-gcloud


#1

*** I also submitted this to the legato forum ***

Hi – I’m new to the MangOH Red and Legato platform. I’ve successfully completed the mangOH Red Getting Started Tutorial. I updated my Legato Application Framework to version 17.09.0 and successfully ran the HelloWorld and RedSensorToCloud applications. My project requires that I send MQTT messages directly to Google Cloud IoT. I found this tutorial (https://github.com/startwithsierra/mangoh-to-gcloud/tree/red) but I’m getting build errors.

  1. A prerequisite is to install the MQTT client Legato application (page 2). I found this at https://github.com/nhonchu/mqttClient-for-Legato. I downloaded the files to ~/legato_framework/legato/apps/sample/mqttClient. I ran cfglegato and make wp85. The build finished with this error: “Unrecognized section name ‘provides’”.

  2. Next, I tried to build the mangoh-to-gcloud application. I downloaded the files to ~/legato_framework/legato/apps/sample/mangohToGCloud. I ran cfglegato and make wp85 (page 13). The build finished with this error: “Unrecognized section name ‘assets’”.

How do I resolve these errors?

*** mqttClient Build Output ***
mangoh@mangoh-virtualbox:~/legato_framework/legato/apps/sample/mqttClient$ make wp85
export TARGET=wp85 ;
mkapp -v -t wp85
-i /home/mangoh/legato_framework/legato/interfaces/dataConnectionService
-i /home/mangoh/legato_framework/legato/interfaces/modemServices
-i mqttClientComp/inc
-i mqttClientComp/inc/mqtt
mqttClient.adef
C compiler = /opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc
C++ compiler =/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++
Compiler sysroot = /opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi
Linker = /opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-ld
Static lib archiver = /opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-ar
Assembler = /opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-as
Debug symbol stripper = /opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-strip
Object file copier/translator = /opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-objcopy
ELF file info extractor = /opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-readelf
Command-line arguments from previous run not found.
Parsing file: ‘/home/mangoh/legato_framework/legato/apps/sample/mqttClient/mqttClient.adef’.
** ERROR:
/home/mangoh/legato_framework/legato/apps/sample/mqttClient/mqttClient.adef:41:8: error: Unrecognized section name ‘provides’.
Makefile:7: recipe for target ‘wp85’ failed
make: *** [wp85] Error 1


*** mangoh-to-gcloud Build Output ***
mangoh@mangoh-virtualbox:~/legato_framework/legato/apps/sample/mangohToGCloud$ make wp85
mkapp -v -t wp85
-i myComponent/utils
mangohToGCloud.adef
C compiler = /opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc
C++ compiler =/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++
Compiler sysroot = /opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi
Linker = /opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-ld
Static lib archiver = /opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-ar
Assembler = /opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-as
Debug symbol stripper = /opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-strip
Object file copier/translator = /opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-objcopy
ELF file info extractor = /opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-readelf
Command-line arguments from previous run not found.
Parsing file: ‘/home/mangoh/legato_framework/legato/apps/sample/mangohToGCloud/mangohToGCloud.adef’.
Modelling application: 'mangohToGCloud’
defined in '/home/mangoh/legato_framework/legato/apps/sample/mangohToGCloud/mangohToGCloud.adef’
Application ‘mangohToGCloud’ contains executable ‘mangohToGCloud’.
Parsing file: ‘/home/mangoh/legato_framework/legato/apps/sample/mangohToGCloud/myComponent/Component.cdef’.
** ERROR:
/home/mangoh/legato_framework/legato/apps/sample/mangohToGCloud/myComponent/Component.cdef:51:6: error: Unrecognized section name ‘assets’.
Makefile:29: recipe for target ‘wp85’ failed
make: *** [wp85] Error 1


Thanks ,

Troy


#2

Hi Troy, I have been trying the same example for quite some time now. Yet to get it up and running.

assets section is no longer supported, thats what I learned from this on legato.io website

And looking at the same source, it looks like your provides section should be in the .cdef file instead of .adef.

Hope this helps to at least compile the project.

Either you can rollback to legato-16.10.1 (along with toolchain and device firmware) or you can change the example for your legato compatibility.


#3

@majditoumi can you please comment on this?


#4

Hi, we actually discussed about this by e-mail with @WedaPashi.
I’m going to resolve some issues asap with a specific ReadMe file to explain all steps around mqtt client, jwt library, etc.

There is also some issues with the Legato version.
I will notify here when the update is push on github.


#5

@majditoumi @asyal

Hey, thanks for responding!
I did go on to rollback everything (including toolchain and firmware on mangOH Green board) to legato-16.10.1.
I managed to get the MQTT Client working. Now, I am trying to figure out how to get around the jwt-cpp library and the implicit dependencies it has on OpenSSL.


#6

@majditoumi could we investigate allowing this app to work with latest legato release as well. Can you dig into that?


#7

@asyal and @majditoumi:

I appreciate your support for this so far.

There are issues with dependencies in example that seemed to be compatible with older legato version (legato-16.01.3 for that matter), although no longer compatible now that external libraries have changed to a greater extent.
It would indeed help to have a completely functional sample application which gets connected to google cloud, based on legato-16.01.3, with all the dependencies clearly stated and provided with.

This could make life easy to port a functional example with all the dependencies well-sorted, to a higher/latest legato version.

@cchins: You might want to follow this discussion.


#8

Sure @asyal, I’m on it, I’m going a new version with all issues fixed. Don’t worry about that @WedaPashi.

You’ll have access to the latest legato version API.


#9

Hi - Thank you for working on this project. majditoumi, do you have an estimated date when the new version will be released?

Troy


#11

So currently this is broken?


#12

Hi @majditoumi - I’m just following up on when the new version will be released?

Thanks

Troy


#13

Hey @Troy1, sorry about the delay.
A new developer is going to fix this current repository.

I’m actually working around a new mangoh-to-gcloud project without any dependency.
I’ll post the link here and I’ll fix this one if not yet :wink: