ot-br-posix
ot-br-posix copied to clipboard
Build failed when enable OT_MESSAGE_USE_HEAP and OTBR_SRP_ADVERTISING_PROXY at the same time
Describe the bug A clear and concise description of what the bug is. When compiling, I turn on both OT_MESSAGE_USE_HEAP and OTBR_SRP_ADVERTISING_PROXY options. It will get the error message as follow,
ot-br-posix/third_party/openthread/repo/src/core/common/message.cpp:166:44: error: ‘GetHeap’ is not a member of ‘ot::Instance’
rval = static_cast<uint16_t>(Instance::GetHeap().GetFreeSize() / sizeof(Buffer));
^~~~~~~
compilation terminated due to -Wfatal-errors.
third_party/openthread/repo/src/core/CMakeFiles/openthread-ftd.dir/build.make:985: recipe for target 'third_party/openthread/repo/src/core/CMakeFiles/openthread-ftd.dir/common/message.cpp.o' failed
make[2]: *** [third_party/openthread/repo/src/core/CMakeFiles/openthread-ftd.dir/common/message.cpp.o] Error 1
CMakeFiles/Makefile2:1281: recipe for target 'third_party/openthread/repo/src/core/CMakeFiles/openthread-ftd.dir/all' failed
make[1]: *** [third_party/openthread/repo/src/core/CMakeFiles/openthread-ftd.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
To Reproduce Information to reproduce the behavior, including:
- Git commit id: https://github.com/openthread/ot-br-posix/commit/f7bcb8724656cabe15ffd4c969eb3b8615ddab87
- IEEE 802.15.4 hardware platform
- Build steps
$ cmake .. -DCMAKE_BUILD_TYPE=Debug \
-DOT_READLINE=readline \
-DOTBR_REST=ON \
-DOTBR_WEB=ON \
-DOTBR_SRP_ADVERTISING_PROXY=ON \
-DOTBR_DNSSD_DISCOVERY_PROXY=ON \
-DOT_MESSAGE_USE_HEAP=ON
- Network topology
Expected behavior A clear and concise description of what you expected to happen.
Console/log output If applicable, add console/log output to help explain your problem.
Additional context Add any other context about the problem here.