espressif / esp-matter

Espressif's SDK for Matter
Apache License 2.0
645 stars 150 forks source link

Can't build IPv6 only (IPv4 turned off) (CON-864) #714

Closed jonsmirl closed 6 days ago

jonsmirl commented 10 months ago
/home/jonsmirl/aosp/esp-matter/examples/common/blemesh_platform/platform/ESP32_custom/ConnectivityManagerImpl_WiFi.cpp: In member function 'void chip::DeviceLayer::ConnectivityManagerImpl::UpdateInternetConnectivityState()':
/home/jonsmirl/aosp/esp-matter/examples/common/blemesh_platform/platform/ESP32_custom/ConnectivityManagerImpl_WiFi.cpp:1002:42: error: 'netif_ip4_addr' was not declared in this scope; did you mean 'netif_ip6_addr'?
 1002 |                 if (!ip4_addr_isany_val(*netif_ip4_addr(netif)) && !ip4_addr_isany_val(*netif_ip4_gw(netif)))
      |                                          ^~~~~~~~~~~~~~
      |                                          netif_ip6_addr
/home/jonsmirl/aosp/esp-matter/examples/common/blemesh_platform/platform/ESP32_custom/ConnectivityManagerImpl_WiFi.cpp:1002:42: note: maximum limit of 1000 namespaces searched for 'netif_ip4_addr'
/home/jonsmirl/aosp/esp-matter/examples/common/blemesh_platform/platform/ESP32_custom/ConnectivityManagerImpl_WiFi.cpp:1002:22: error: 'ip4_addr_isany_val' was not declared in this scope; did you mean 'ip_addr_isany_val'?
 1002 |                 if (!ip4_addr_isany_val(*netif_ip4_addr(netif)) && !ip4_addr_isany_val(*netif_ip4_gw(netif)))
      |                      ^~~~~~~~~~~~~~~~~~
      |                      ip_addr_isany_val
/home/jonsmirl/aosp/esp-matter/examples/common/blemesh_platform/platform/ESP32_custom/ConnectivityManagerImpl_WiFi.cpp:1002:22: note: maximum limit of 1000 namespaces searched for 'ip4_addr_isany_val'
/home/jonsmirl/aosp/esp-matter/examples/common/blemesh_platform/platform/ESP32_custom/ConnectivityManagerImpl_WiFi.cpp:1002:89: error: 'netif_ip4_gw' was not declared in this scope; did you mean 'netif_is_up'?
 1002 |                 if (!ip4_addr_isany_val(*netif_ip4_addr(netif)) && !ip4_addr_isany_val(*netif_ip4_gw(netif)))
      |                                                                                         ^~~~~~~~~~~~
      |                                                                                         netif_is_up
/home/jonsmirl/aosp/esp-matter/examples/common/blemesh_platform/platform/ESP32_custom/ConnectivityManagerImpl_WiFi.cpp:1002:89: note: maximum limit of 1000 namespaces searched for 'netif_ip4_gw'
At global scope:
cc1plus: note: unrecognized command-line option '-Wno-unknown-warning-option' may have been intended to silence earlier diagnostics
[319/339] c++ obj/ABS_PATH/home/jonsmirl/aosp/esp-matter/examples/common/blemesh_platform/platform/ESP32_custom/ESP32_custom.ESP32DeviceInfoProvider.cpp.oninja: build stopped: subcommand failed.
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /home/jonsmirl/lowpan/build/log/idf_py_stderr_output_1145466 and /home/jonsmirl/lowpan/build/log/idf_py_stdout_output_1145466
jonsmirl commented 10 months ago

I want to build IPv6 only so that I can see if the group issue below is dependent on dual stacks.

shripad621git commented 10 months ago

Can you please specify the options you enabled or disabled to build the app. Also please specify the commit id and the esp-idf version used.

jonsmirl commented 10 months ago

esp-idf 6b1f40b9bfb91ec82fab4a60e5bfb4ca0c9b062f

Yes DISABLE_IPV4 - Disable IPv4 functionality in the CHIP stack No LWIP_IPV4 - Enable IPv4

shripad621git commented 10 months ago

Please do specify the esp-matter commit id you are working on.

jonsmirl commented 10 months ago

I pulled up to:

commit 12716c76e7c0ddf13bddddb5e91a714129094436 (origin/main, origin/HEAD, main)
Merge: 198db12 0fdb831
Author: Hrishikesh Dhayagude <hrishi@espressif.com>
Date:   Mon Nov 6 19:09:25 2023 +0800

errors when building without IPv4

onnectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp -o obj/third_party/connectedhomeip/src/platform/ESP32/ESP32.ConnectivityManagerImpl_WiFi.cpp.o
../../../../../connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp: In member function 'void chip::DeviceLayer::ConnectivityManagerImpl::UpdateInternetConnectivityState()':
../../../../../connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp:1002:42: error: 'netif_ip4_addr' was not declared in this scope; did you mean 'netif_ip6_addr'?
 1002 |                 if (!ip4_addr_isany_val(*netif_ip4_addr(netif)) && !ip4_addr_isany_val(*netif_ip4_gw(netif)))
      |                                          ^~~~~~~~~~~~~~
      |                                          netif_ip6_addr
../../../../../connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp:1002:42: note: maximum limit of 1000 namespaces searched for 'netif_ip4_addr'
../../../../../connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp:1002:22: error: 'ip4_addr_isany_val' was not declared in this scope; did you mean 'ip_addr_isany_val'?
 1002 |                 if (!ip4_addr_isany_val(*netif_ip4_addr(netif)) && !ip4_addr_isany_val(*netif_ip4_gw(netif)))
      |                      ^~~~~~~~~~~~~~~~~~
      |                      ip_addr_isany_val
../../../../../connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp:1002:22: note: maximum limit of 1000 namespaces searched for 'ip4_addr_isany_val'
../../../../../connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp:1002:89: error: 'netif_ip4_gw' was not declared in this scope; did you mean 'netif_is_up'?
 1002 |                 if (!ip4_addr_isany_val(*netif_ip4_addr(netif)) && !ip4_addr_isany_val(*netif_ip4_gw(netif)))
      |                                                                                         ^~~~~~~~~~~~
      |                                                                                         netif_is_up
../../../../../connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp:1002:89: note: maximum limit of 1000 namespaces searched for 'netif_ip4_gw'
At global scope:
cc1plus: note: unrecognized command-line option '-Wno-unknown-warning-option' may have been intended to silence earlier diagnostics
[260/366] c++ obj/third_party/connectedhomeip/src/platform/ESP32/ESP32.DiagnosticDataProviderImpl.cpp.o../../../../../connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/platform/ESP32/DiagnosticDataProviderImpl.cpp: In member function 'virtual CHIP_ERROR chip::DeviceLayer::DiagnosticDataProviderImpl::GetNetworkInterfaces(chip::DeviceLayer::NetworkInterface**)':
../../../../../connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/platform/ESP32/DiagnosticDataProviderImpl.cpp:219:33: warning: unused variable 'ipv4_info' [-Wunused-variable]
  219 |             esp_netif_ip_info_t ipv4_info;
      |                                 ^~~~~~~~~
At global scope:
cc1plus: note: unrecognized command-line option '-Wno-unknown-warning-option' may have been intended to silence earlier diagnostics
[261/366] c++ obj/third_party/connectedhomeip/src/platform/ESP32/ESP32.PlatformManagerImpl.cpp.oninja: build stopped: subcommand failed.
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /home/jonsmirl/aosp/esp-matter/examples/light/build/log/idf_py_stderr_output_2559505 and /home/jonsmirl/aosp/esp-matter/examples/light/build/log/idf_py_stdout_output_2559505
jonsmirl commented 10 months ago

I am building the light example.

shripad621git commented 1 month ago

@jonsmirl , we will be updating the submodule to include the change in the above PR #33085 in some time. Till then, you can apply the changes of the above PR on connectedhomeip submodule to test out the change.

dhrishi commented 6 days ago

Fixed with the connectedhomeip submodule update.