IoT: Include cloudproxy service in demo build
Description
Environment
Activity
Jan-Simon Moeller July 13, 2020 at 4:02 PM
Ok, roger that.
Leonid Lazarev July 13, 2020 at 3:54 PM
@Jan-Simon Moeller There are explanations:
cloudproxy service has runtime dependency: azure-iot-sdk-c.
In result of the azure-iot-sdk-c build the library libiothub_client.so is prepared.
But azure-iot-sdk-c has dependency on the 3 different transport (mqtt, http, aqmp). By default all transports are enabled.
When we try to run cloudrpoxy on the target we face with the issue:
ERROR: binding [/var/local/lib/afm/applications/cloudproxy-service/lib/cloudproxy-service.so] not loadable: /usr/lib/libiothub_client.so.1: undefined symbol: messagereceiver_get_link_name [/usr/src/debug/af-binder/master+gitAUTOINC+33ddfb569b-r0/git/src/afb-api-so.c:97,load_binding]
After investigation it was found that the symbol messagereceiver_get_link_name is located in the azure-uamqp-c library.
external/meta-iot-cloud/recipes-azure/azure-uamqp-c
This library has to be linked with libiothub_client.so during the build, but as we see in dunfell release, this has been disable by patch:
see
external/meta-iot-cloud/recipes-azure/azure-iot-sdk-c/files/Fix-cmake-build-issues.patch
@@ -332,7 +332,6 @@ if(${use_amqp})
${iothub_client_amqp_ws_transport_c_files}
${iothub_client_amqp_ws_transport_h_files})
- set(iothub_client_libs ${iothub_client_libs} uamqp)
endif(build_as_dynamic)
endif()
In result the necessary symbols are not included in the final library libiothub_client.so.
As amqp transport is not used by cloudproxy service, we just excluded the amqp transport from AGL build at all.
Jan-Simon Moeller July 13, 2020 at 3:16 PM
what is the exact issue with amqp ?
cloudproxy service has to be included in demo build.
Add new feature "cloudproxy" which is required to active cloud-proxy service.