iotivity / iotivity-lite

To contribute code to the project, please visit
https://iotivity.org/get-involved
Apache License 2.0
123 stars 67 forks source link

Failure to build virtual device. #291

Closed finlaymorrison closed 10 months ago

finlaymorrison commented 1 year ago

The repository was cloned and ./gen.sh was run, and upon running ./build.sh the following error was given. I am compiling on Debian GNU/Linux 11.

gcc -c -o obj/client_server/oc_core_res.o ../../api/oc_core_res.c -fPIC -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -ffreestanding -Os -fno-stack-protector -ffunction-sections -fdata-sections -fno-reorder-functions -fno-defer-pop -fno-strict-overflow -I./ -I../../include/ -I../../ -std=gnu99 -Wall -Wextra -Werror -pedantic  -Wl,--gc-sections -I../../deps/mbedtls/include -D__OC_RANDOM -DOC_PKI -DOC_DYNAMIC_ALLOCATION -DOC_IDD_API -DOC_SECURITY -DOC_OSCORE -DOC_CLIENT -DOC_SERVER
../../api/oc_core_res.c: In function ‘oc_core_con_handler_post’:
../../api/oc_core_res.c:287:38: error: implicit conversion from ‘oc_locn_t’ to ‘oc_enum_t’ [-Werror=enum-conversion]
  287 |         oc_resource_tag_locn(device, oc_locn);
      |                                      ^~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:307: obj/client_server/oc_core_res.o] Error 1
Danielius1922 commented 1 year ago

Sorry, this has been fixed in master months ago.

Are you going by this guide https://openconnectivity.github.io/IOTivity-Lite-setup/ ? If you try using install-master.sh instead of install.sh the issue should occur.

@jkralik, we should consider a new release.

jkralik commented 1 year ago

@Danielius1922 Sure, with version 2.2.5.2

Danielius1922 commented 10 months ago

Should be fixed in current releases.