project-chip / connectedhomeip

Matter (formerly Project CHIP) creates more connections between more objects, simplifying development for manufacturers and increasing compatibility for consumers, guided by the Connectivity Standards Alliance.
https://buildwithmatter.com
Apache License 2.0
7.49k stars 2.01k forks source link

[build] MacOS build failure of linux lighting-app #4472

Closed turon closed 3 years ago

turon commented 3 years ago

Problem

Building on Mac fails now. Seems to have started in past 3-4 commits.

./gn_build.sh 
...

.--------------------------------
-- Build: GN configure
'--------------------------------
Done. Made 1032 targets from 118 files in 1481ms
Done. Made 1032 targets from 118 files in 1631ms
.--------------------------------
-- Build: Ninja build
'--------------------------------
ninja: Entering directory `./out/debug'
[2/8] ar libCHIP.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: standalone/lib/libCHIP.a(lwip.dhcp6.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: standalone/lib/libCHIP.a(lwip.inet6.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: standalone/lib/libCHIP.a(lwip.api_lib.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: standalone/lib/libCHIP.a(lwip.api_msg.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: standalone/lib/libCHIP.a(lwip.if.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: standalone/lib/libCHIP.a(lwip.netbuf.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: standalone/lib/libCHIP.a(lwip.netdb.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: standalone/lib/libCHIP.a(lwip.netifapi.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: standalone/lib/libCHIP.a(lwip.sockets.c.o) has no symbols
[7/8] c++ standalone/obj/examples/lighting-app/linux/chip-tool-server.main.cpp.o
FAILED: standalone/obj/examples/lighting-app/linux/chip-tool-server.main.cpp.o 
g++ -MMD -MF standalone/obj/examples/lighting-app/linux/chip-tool-server.main.cpp.o.d -O0 -g2 -fno-common -ffunction-sections -fdata-sections -fno-exceptions -fPIC -Wall -Wextra -Wshadow -Werror -Wno-deprecated-declarations -Wno-unknown-warning-option -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wno-cast-function-type -fdiagnostics-color -fno-strict-aliasing -I/usr/local/Cellar/openssl@1.1/1.1.1i/include -std=gnu++14 -fno-rtti -Wnon-virtual-dtor -DBUILD_RELEASE=0 -DCHIP_HAVE_CONFIG_H=1 -DCHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE=true -DLWIP_IPV4=1 -DLWIP_IPV6=1 -DLWIP_API=1 -DLWIP_ETHERNET=1 -DLWIP_SLIP=0 -DLWIP_6LOWPAN=1 -DLWIP_PPP=1 -I../../examples/lighting-app/linux -I../../examples/lighting-app/linux/include -I../../src/app/util -I../../src/app/server -I../../examples/lighting-app/lighting-common -I../../examples/lighting-app/lighting-common/include -I../../src/app/gen -I../../src/app/util -I../../src/app -Istandalone/gen/src/app/include -I../../src/include -I../../src -Istandalone/gen/include -I../../src/lib -I../../config/standalone -I../../third_party/nlassert/repo/include -I../../third_party/nlio/repo/include -I../../src/lwip/standalone -I../../third_party/lwip/repo/lwip/src/include -I../../src/lwip/include -I../../src/setup_payload -c ../../examples/lighting-app/linux/main.cpp -o standalone/obj/examples/lighting-app/linux/chip-tool-server.main.cpp.o
../../examples/lighting-app/linux/main.cpp:182:50: error: no member named 'StartWiFiManagement' in 'chip::DeviceLayer::ConnectivityManagerImpl'
        chip::DeviceLayer::ConnectivityMgrImpl().StartWiFiManagement();
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
../../examples/lighting-app/linux/main.cpp:187:28: error: no member named 'ThreadStackMgrImpl' in namespace 'chip::DeviceLayer'
        chip::DeviceLayer::ThreadStackMgrImpl().InitThreadStack();
        ~~~~~~~~~~~~~~~~~~~^
2 errors generated.
erjiaqing commented 3 years ago

As a workaround, we can build it using ./gn_build.sh enable_linux_lighting_app_build=false