mongoose-os-libs/bt-common

demo-js failed to compile

Closed this issue · 1 comments

the demo-js fails to compile
steps to reproduce:
mos clone https://github.com/mongoose-os-apps/demo-js app1
mos build --platform esp32
build log file attached.
summary:
In file included from /opt/Espressif/xtensa-esp32-elf/xtensa-esp32-elf/sys-include/stdio.h:36,
from /data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_403846881/deps/modules/mjs/mjs.h:65,
from /data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_403846881/deps/bt-common/src/mgos_bt_js.c:30:
/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_403846881/deps/bt-common/src/mgos_bt_js.c:148:54: error: 'struct mgos_bt_gatts_read_arg' has no member named 'uuid'; did you mean 'svc_uuid'?
{"uuid", offsetof(struct mgos_bt_gatts_read_arg, uuid),
^~~~
/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_403846881/deps/bt-common/src/mgos_bt_js.c:156:13: error: 'struct mgos_bt_gatts_read_arg' has no member named 'len'
{"len", offsetof(struct mgos_bt_gatts_read_arg, len),
^~~~~~~~
/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_403846881/deps/bt-common/src/mgos_bt_js.c:166:55: error: 'struct mgos_bt_gatts_write_arg' has no member named 'uuid'; did you mean 'svc_uuid'?
{"uuid", offsetof(struct mgos_bt_gatts_write_arg, uuid),
^~~~
/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_403846881/deps/bt-common/src/mgos_bt_js.c:166:14: error: initialization of 'int' from 'const struct mjs_c_struct_member *' makes integer from pointer without a cast [-Werror=int-conversion]
{"uuid", offsetof(struct mgos_bt_gatts_write_arg, uuid),
^~~~~~~~
/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_403846881/deps/bt-common/src/mgos_bt_js.c:166:14: note: (near initialization for 'gatts_write_arg_def[0].offset')
In file included from /opt/Espressif/xtensa-esp32-elf/xtensa-esp32-elf/sys-include/stdio.h:36,
from /data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_403846881/deps/modules/mjs/mjs.h:65,
from /data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_403846881/deps/bt-common/src/mgos_bt_js.c:30:
/data/fwbuild-volumes/latest/apps/app1/esp32/build_contexts/build_ctx_403846881/deps/bt-common/src/mgos_bt_js.c:166:14: error: initializer element is not constant
{"uuid", offsetof(struct mgos_bt_gatts_write_arg, uuid),
build.log

rojer commented

you are right, refactoring broke it. thanks for reporting, will fix!