Skip to content

Commit

Permalink
Fix platform build race - platform builds include app/AttributeAccess…
Browse files Browse the repository at this point in the history
…Interface.h (#10659)

* Add dependency to app buildconfig into platform.

Without it, I see builds failing with:

```
g++ -MMD -MF
standalone/obj/src/lib/dnssd/dnssd.Discovery_ImplPlatform.cpp.o.d
-target x86_64-apple-macos10.15 -O0 -g2 -fno-common -ffunction-sections
-fdata-sections -fno-exceptions -fno-unwind-tables
-fno-asynchronous-unwind-tables -fPIC -Wall -Werror -Wextra -Wshadow
-Wunreachable-code -Wvla -Wno-deprecated-declarations
-Wno-unknown-warning-option -Wno-maybe-uninitialized
-Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi
-Wno-cast-function-type -fdiagnostics-color -fno-strict-aliasing
-I/usr/local/Cellar/[email protected]/1.1.1l_1/include -fobjc-arc -std=gnu++14
-fno-rtti -Wnon-virtual-dtor -DCHIP_HAVE_CONFIG_H=1 -I../../src/include
-I../../src -Istandalone/gen/include -I../../zzz_generated/app-common
-I../../config/standalone -I../../third_party/nlassert/repo/include
-I../../third_party/nlio/repo/include -c
../../src/lib/dnssd/Discovery_ImplPlatform.cpp -o
standalone/obj/src/lib/dnssd/dnssd.Discovery_ImplPlatform.cpp.o
551
In file included from ../../src/lib/dnssd/Discovery_ImplPlatform.cpp:34:
552
In file included from ../../src/include/platform/CHIPDeviceLayer.h:29:
553
In file included from
../../src/include/platform/ConnectivityManager.h:27:
554
In file included from ../../src/app/AttributeAccessInterface.h:22:
555
In file included from
../../src/app/MessageDef/AttributeDataElement.h:26:
556
../../src/app/MessageDef/AttributePath.h:29:10: fatal error:
'app/AppBuildConfig.h' file not found
557
```

* Fix typo in path

* Also add dependency from Darwin platform to avoid:

```
g++ -MMD -MF
obj/third_party/connectedhomeip/src/platform/Darwin/Darwin.PosixConfig.cpp.o.d
-target x86_64-apple-macos10.15 -O0 -g2 -fno-common -ffunction-sections
-fdata-sections -fno-exceptions -fno-unwind-tables
-fno-asynchronous-unwind-tables -fPIC -Wall -Werror -Wextra -Wshadow
-Wunreachable-code -Wvla -Wno-deprecated-declarations
-Wno-unknown-warning-option -Wno-maybe-uninitialized
-Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi
-Wno-cast-function-type -fdiagnostics-color -fno-strict-aliasing
-fsanitize=thread -fobjc-arc
-I/usr/local/Cellar/[email protected]/1.1.1l_1/include -std=gnu++14 -fno-rtti
-Wnon-virtual-dtor -DCHIP_HAVE_CONFIG_H=1
-I../../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/include
-I../../../examples/all-clusters-app/linux/third_party/connectedhomeip/src
-Igen/include
-I../../../examples/all-clusters-app/linux/third_party/connectedhomeip/zzz_generated/app-common
-I../../../examples/all-clusters-app/linux/third_party/connectedhomeip/config/standalone
-I../../../examples/all-clusters-app/linux/third_party/connectedhomeip/third_party/nlassert/repo/include
-I../../../examples/all-clusters-app/linux/third_party/connectedhomeip/third_party/nlio/repo/include
-c
../../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/platform/Darwin/PosixConfig.cpp
-o
obj/third_party/connectedhomeip/src/platform/Darwin/Darwin.PosixConfig.cpp.o
245
In file included from
../../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/platform/Darwin/PosixConfig.cpp:27:
246
In file included from
../../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/include/platform/internal/CHIPDeviceLayerInternal.h:22:
247
In file included from
../../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/include/platform/CHIPDeviceLayer.h:29:
248
In file included from
../../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/include/platform/ConnectivityManager.h:27:
249
In file included from
../../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/app/AttributeAccessInterface.h:22:
250
In file included from
../../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/app/MessageDef/AttributeDataElement.h:26:
251
../../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/app/MessageDef/AttributePath.h:29:10:
fatal error: 'app/AppBuildConfig.h' file not found
252
```
  • Loading branch information
andy31415 authored Oct 20, 2021
1 parent 4518e79 commit f04c428
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/platform/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ if (chip_device_platform != "none") {

public_deps = [
":platform_base",
"${chip_root}/src/app:app_buildconfig",
"${chip_root}/src/crypto",
"${chip_root}/src/lib/support",
]
Expand Down
5 changes: 4 additions & 1 deletion src/platform/Darwin/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ static_library("Darwin") {
"${chip_root}/src/setup_payload",
]

public_deps = [ "${chip_root}/src/platform:platform_base" ]
public_deps = [
"${chip_root}/src/app:app_buildconfig",
"${chip_root}/src/platform:platform_base",
]

public_configs = [ ":darwin_config" ]

Expand Down

0 comments on commit f04c428

Please sign in to comment.