Li zhu

Registered on 03/24/2022 • Last connection on 09/19/2024

build errors on Ubuntu 20.04.4 LTS

Hello,

 

I downloaded ZBOSS_v1.0_src and had a build with the following build commands on Ubuntu 20.04.4 LTS

 

ln -s build-configurations/Platform-linux Platform

 

ln -s build-configurations/Options-linux-debug Options

 

make rebuild

 

but got the following build errors. Anyone know what happen to me. what do i need to do before issue 'make rebuild'

 

make[1]: Entering directory '/home/li/zboss/common'

 

gcc -c -g -pipe -W -Wall -Wpointer-arith -Wcast-align -std=gnu99 -Wno-format-zero-length -Wno-format-zero-length -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -Wno-unused-but-set-variable -fno-strict-aliasing -Werror -DZB_PLATFORM_LINUX_PC32 -DDEBUG -DZB_TRACE_LEVEL=4 -DZB_TRACE_MASK=-1 -I../osif/include -I../include -o zb_debug.o zb_debug.c

 

gcc -c -g -pipe -W -Wall -Wpointer-arith -Wcast-align -std=gnu99 -Wno-format-zero-length -Wno-format-zero-length -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -Wno-unused-but-set-variable -fno-strict-aliasing -Werror -DZB_PLATFORM_LINUX_PC32 -DDEBUG -DZB_TRACE_LEVEL=4 -DZB_TRACE_MASK=-1 -I../osif/include -I../include -o zb_scheduler.o zb_scheduler.c

 

In file included from ../include/zb_transport_globals.h:61,

 

from ../include/zb_g_context.h:121,

 

from ../include/zb_common.h:57,

 

from zb_scheduler.c:52:

 

*zb_scheduler.c: In function ‘zb_sched_loop_iteration’:

 

*../include/zb_transport_linux_pipes.h:104:49: error: right-hand operand of comma expression has no effect [-Werror=unused-value]

 

104 | #define ZB_TRY_IO() (zb_mac_wait_for_ext_event(), RET_OK)

 

| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~**

 

zb_scheduler.c:191:5: note: in expansion of macro ‘ZB_TRY_IO’

 

191 | ZB_TRY_IO();

 

| ^~~~~~~~~

 

cc1: all warnings being treated as errors

 

make[1]: *** [../Options:119: zb_scheduler.o] Error 1

 

make[1]: Leaving directory '/home/li/zboss/common'

 

make: *** [Makefile:67: bldall] Error 2

 

RE: build errors on Ubuntu 20.04.4 LTS

Hello,

 

Thanks for your reply! I want to use this stack to setup zigbee test environment with our M15.4 radio chip.

 

Yes, I had tried disable -Werror and In my build environment, I also installed some dependency of ZBOSS such as libxml2-dev and libpcap-dev. Unfortunately , finally , I still encountered some build errors as below. For build environment of ZBOSS, whether I still need to do special configurations

 

Build error logs:

 

include/libxml2 -o zigbee_stuff.o zigbee_stuff.cpp

 

zigbee_stuff.cpp: In function ‘int route_packet(uint8_t*, uint16_t*)’:

 

zigbee_stuff.cpp:624:121: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream’ and ‘std::ostream’ {aka ‘std::basic_ostream’})

 

624 | cout << "Got rejoin response laddr " << " " << (int)nwk_hdr.dst_ieee_addr[0] << " nwk addr " << (int)addr << cout;

 

| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~~~~

 

| | |

 

| | basic_ostream<[...]>

 

|

 

/usr/include/c++/9/ostream:691:5: note: template argument deduction/substitution failed:

 

/usr/include/c++/9/ostream: In substitution of ‘template typename std::enable_if >, std::__is_convertible_to_basic_ostream<_Ostream>, std::__is_insertable::__ostream_type, const _Tp&, void> >::value, typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type>::type std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_ostream&; _Tp = std::basic_ostream]’:

 

zigbee_stuff.cpp:624:124: required from here

 

/usr/include/c++/9/ostream:691:5: error: no type named ‘type’ in ‘struct std::enable_if&>’

 

make[2]: *** [../../Options:116: zigbee_stuff.o] Error 1

 

make[2]: Leaving directory '/home/li/zboss/devtools/network_simulator'

 

make[1]: *** [Makefile:51: bldall] Error 2

 

make[1]: Leaving directory '/home/li/zboss/devtools'

 

make: *** [Makefile:74: bldall] Error 2