iotbzh / DEPRECATED_app-framework-templates

DEPRECATED. Please use official version on https://git.automotivelinux.org/src/cmake-apps-module/
8 stars 3 forks source link

Errors building hybrid-qml application #5

Open blvckcrxw opened 4 years ago

blvckcrxw commented 4 years ago

Hi there! Thank you for provided templates!

I'm using halibut 8.0.5 for raspberry pi 3. I'm trying to build cpu-hybrid-qml.wgt according to this documentation https://iot.bzh/download/public/2016/sdk/AGL-Devkit-Build-your-1st-AGL-Application.pdf

When I run

make

command

Following errors occur:

Scanning dependencies of target xxxxxx-hybrid-qml [ 33%] Building C object CMakeFiles/xxxxxx-hybrid-qml.dir/xxxxxx-hybrid-qml-binding.c.o In file included from /home/devel/xds-workspace/app-framework-templates/templates/hybrid-qml/xxxxxx-hybrid-qml-binding.c:20: /xdt/sdk/poky-agl/8.0.5/armv7vet2hf-neon-vfpv4/1e25135e2394f61d65f31f708d7a2978/sysroots/armv7vet2hf-neon-vfpv4-agl-linux-gnueabi/usr/include/afb/afb-binding.h:86:2: error: #error "\n\n AFB_BINDING_VERSION should be defined before including <afb/afb-binding.h>\n AFB_BINDING_VERSION defines the version of binding that you use.\n Currently the version to use is 3 (older versions: 1 is obsolete, 2 is legacy).\n Consider to add one of the following define before including <afb/afb-binding.h>:\n\n #define AFB_BINDING_VERSION 3\n\n"

error "\

^~~~~ /home/devel/xds-workspace/app-framework-templates/templates/hybrid-qml/xxxxxx-hybrid-qml-binding.c:24:26: warning: ‘struct afb_req’ declared inside parameter list will not be visible outside of this definition or declaration static void ping (struct afb_req request) ^~~ /home/devel/xds-workspace/app-framework-templates/templates/hybrid-qml/xxxxxx-hybrid-qml-binding.c:24:34: error: parameter 1 (‘request’) has incomplete type static void ping (struct afb_req request)


/home/devel/xds-workspace/app-framework-templates/templates/hybrid-qml/xxxxxx-hybrid-qml-binding.c: In function ‘ping’:
/home/devel/xds-workspace/app-framework-templates/templates/hybrid-qml/xxxxxx-hybrid-qml-binding.c:28:23: error: implicit declaration of function ‘afb_req_json’; did you mean ‘afb_req_x2_json’? [-Werror=implicit-function-declaration]
  json_object *query = afb_req_json(request);
                       ^~~~~~~~~~~~
                       afb_req_x2_json
/home/devel/xds-workspace/app-framework-templates/templates/hybrid-qml/xxxxxx-hybrid-qml-binding.c:29:2: error: implicit declaration of function ‘afb_req_success_f’; did you mean ‘afb_req_x2_reply_f’? [-Werror=implicit-function-declaration]
  afb_req_success_f(request, NULL, "Ping Binder Daemon count=%d query=%s", ++pingcount, json_object_to_json_string(query));
  ^~~~~~~~~~~~~~~~~
  afb_req_x2_reply_f
/home/devel/xds-workspace/app-framework-templates/templates/hybrid-qml/xxxxxx-hybrid-qml-binding.c: At top level:
/home/devel/xds-workspace/app-framework-templates/templates/hybrid-qml/xxxxxx-hybrid-qml-binding.c:35:17: error: ‘AFB_SESSION_NONE’ undeclared here (not in a function); did you mean ‘AFB_SESSION_NONE_X2’?
   {"ping"     , AFB_SESSION_NONE, ping    , "Ping the binder"},
                 ^~~~~~~~~~~~~~~~
                 AFB_SESSION_NONE_X2
/home/devel/xds-workspace/app-framework-templates/templates/hybrid-qml/xxxxxx-hybrid-qml-binding.c:39:21: error: variable ‘plugin_desc’ has initializer but incomplete type
 static const struct afb_binding plugin_desc = {
                     ^~~~~~~~~~~
/home/devel/xds-workspace/app-framework-templates/templates/hybrid-qml/xxxxxx-hybrid-qml-binding.c:40:3: error: ‘const struct afb_binding’ has no member named ‘type’
  .type = AFB_BINDING_VERSION_1,
   ^~~~
/home/devel/xds-workspace/app-framework-templates/templates/hybrid-qml/xxxxxx-hybrid-qml-binding.c:40:10: warning: excess elements in struct initializer
  .type = AFB_BINDING_VERSION_1,
          ^~~~~~~~~~~~~~~~~~~~~
/home/devel/xds-workspace/app-framework-templates/templates/hybrid-qml/xxxxxx-hybrid-qml-binding.c:40:10: note: (near initialization for ‘plugin_desc’)
/home/devel/xds-workspace/app-framework-templates/templates/hybrid-qml/xxxxxx-hybrid-qml-binding.c:41:3: error: ‘const struct afb_binding’ has no member named ‘v1’
  .v1 = {
   ^~
/home/devel/xds-workspace/app-framework-templates/templates/hybrid-qml/xxxxxx-hybrid-qml-binding.c:41:8: error: extra brace group at end of initializer
  .v1 = {
        ^
/home/devel/xds-workspace/app-framework-templates/templates/hybrid-qml/xxxxxx-hybrid-qml-binding.c:41:8: note: (near initialization for ‘plugin_desc’)
/home/devel/xds-workspace/app-framework-templates/templates/hybrid-qml/xxxxxx-hybrid-qml-binding.c:41:8: warning: excess elements in struct initializer
/home/devel/xds-workspace/app-framework-templates/templates/hybrid-qml/xxxxxx-hybrid-qml-binding.c:41:8: note: (near initialization for ‘plugin_desc’)
/home/devel/xds-workspace/app-framework-templates/templates/hybrid-qml/xxxxxx-hybrid-qml-binding.c:48:27: error: conflicting types for ‘afbBindingV1Register’
 const struct afb_binding *afbBindingV1Register (const struct afb_binding_interface *itf)
                           ^~~~~~~~~~~~~~~~~~~~
In file included from /xdt/sdk/poky-agl/8.0.5/armv7vet2hf-neon-vfpv4/1e25135e2394f61d65f31f708d7a2978/sysroots/armv7vet2hf-neon-vfpv4-agl-linux-gnueabi/usr/include/afb/afb-binding.h:114,
                 from /home/devel/xds-workspace/app-framework-templates/templates/hybrid-qml/xxxxxx-hybrid-qml-binding.c:20:
/xdt/sdk/poky-agl/8.0.5/armv7vet2hf-neon-vfpv4/1e25135e2394f61d65f31f708d7a2978/sysroots/armv7vet2hf-neon-vfpv4-agl-linux-gnueabi/usr/include/afb/afb-binding-v1.h:63:37: note: previous declaration of ‘afbBindingV1Register’ was here
 extern const struct afb_binding_v1 *afbBindingV1Register (const struct afb_binding_interface_v1 *interface);
                                     ^~~~~~~~~~~~~~~~~~~~
/home/devel/xds-workspace/app-framework-templates/templates/hybrid-qml/xxxxxx-hybrid-qml-binding.c:39:33: error: storage size of ‘plugin_desc’ isn’t known
 static const struct afb_binding plugin_desc = {
                                 ^~~~~~~~~~~
cc1: some warnings being treated as errors
CMakeFiles/xxxxxx-hybrid-qml.dir/build.make:62: recipe for target 'CMakeFiles/xxxxxx-hybrid-qml.dir/xxxxxx-hybrid-qml-binding.c.o' failed
make[2]: *** [CMakeFiles/xxxxxx-hybrid-qml.dir/xxxxxx-hybrid-qml-binding.c.o] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/xxxxxx-hybrid-qml.dir/all' failed
make[1]: *** [CMakeFiles/xxxxxx-hybrid-qml.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

What are my steps to build wgt file?

jobol commented 4 years ago

hi @karapetyantv , thank you for your interest.

The real issue that you are facing is that this repository is quiet old and not updated since years (4 years for the qml example)!

I recommend you to go to AGL main repositories: https://git.automotivelinux.org/

It includes more maintained set of examples https://git.automotivelinux.org/src/app-framework-demo/