Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix arm cross compile error: default copy constructor deprecated if manual copy operator defined #12726

Merged
merged 3 commits into from
Dec 8, 2021

Conversation

andy31415
Copy link
Contributor

Problem

2021-12-08 04:23:40 INFO    clang++ -MMD -MF obj/third_party/connectedhomeip/src/app/clusters/test-cluster-server/all-clusters-common.test-cluster-server.cpp.o.d -Wconversion --target=aarch64-linux-gnu -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 -Wimplicit-fallthrough -Wheader-hygiene -Wformat-type-confusion -Wno-deprecated-declarations -Wno-unknown-warning-option -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter -fdiagnostics-color --sysroot=/opt/ubuntu-21.04-aarch64-sysroot -fno-strict-aliasing -D_REENTRANT -I/opt/ubuntu-21.04-aarch64-sysroot/usr/include/gio-unix-2.0 -I/opt/ubuntu-21.04-aarch64-sysroot/usr/include/libmount -I/opt/ubuntu-21.04-aarch64-sysroot/usr/include/blkid -I/opt/ubuntu-21.04-aarch64-sysroot/usr/include/glib-2.0 -I/opt/ubuntu-21.04-aarch64-sysroot/usr/lib/aarch64-linux-gnu/glib-2.0/include -std=gnu++14 -fno-rtti -Wnon-virtual-dtor -DCHIP_HAVE_CONFIG_H=1 -DCHIP_MINMDNS_USE_EPHEMERAL_UNICAST_PORT=1 -I../../examples/all-clusters-app/linux/third_party/connectedhomeip/zzz_generated/all-clusters-app -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 -I../../examples/all-clusters-app/linux/third_party/connectedhomeip/third_party/mbedtls/repo/include -I../../examples/all-clusters-app/linux/third_party/connectedhomeip/third_party/inipp/repo/inipp -I../../examples/all-clusters-app/linux/third_party/connectedhomeip/zzz_generated -c ../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/app/clusters/test-cluster-server/test-cluster-server.cpp -o obj/third_party/connectedhomeip/src/app/clusters/test-cluster-server/all-clusters-common.test-cluster-server.cpp.o
2021-12-08 04:23:40 INFO    In file included from ../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/app/clusters/test-cluster-server/test-cluster-server.cpp:23:
2021-12-08 04:23:40 INFO    In file included from ../../examples/all-clusters-app/linux/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h:26:
2021-12-08 04:23:40 INFO    In file included from ../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/app/EventLoggingTypes.h:20:
2021-12-08 04:23:40 INFO    In file included from ../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/app/ClusterInfo.h:22:
2021-12-08 04:23:40 INFO    ../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/app/ConcreteEventPath.h:37:25: error: definition of implicit copy constructor for 'ConcreteEventPath' is deprecated because it has a user-provided copy assignment operator [-Werror,-Wdeprecated-copy-with-user-provided-copy]
2021-12-08 04:23:40 INFO        ConcreteEventPath & operator=(const ConcreteEventPath & other)
2021-12-08 04:23:40 INFO                            ^
2021-12-08 04:23:40 INFO    ../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/app/EventLoggingTypes.h:125:7: note: in implicit copy constructor for 'chip::app::ConcreteEventPath' first required here
2021-12-08 04:23:40 INFO    class EventOptions
2021-12-08 04:23:40 INFO          ^
2021-12-08 04:23:40 INFO    ../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/app/clusters/test-cluster-server/test-cluster-server.cpp:460:67: note: in implicit copy constructor for 'chip::app::EventOptions' first required here
2021-12-08 04:23:40 INFO        if (CHIP_NO_ERROR != LogEvent(event, commandPath.mEndpointId, eventOptions, responseData.value))
2021-12-08 04:23:40 INFO   

Change overview

  • Add CI step to compile arm64
  • Replace the manual copy constructor implementation with just = default, explicitly allowing both constructor and operator=

Testing

Using ACT locally
CI will also validate this

@andy31415
Copy link
Contributor Author

Fast tracking: trivial change and the rest is CI updates. The change is CI-validated.

@andy31415 andy31415 merged commit a7dd25e into project-chip:master Dec 8, 2021
@github-actions
Copy link

github-actions bot commented Dec 8, 2021

PR #12726: Size comparison from 4684f29 to 1c97970

Increases (2 builds for esp32, p6)
platform target config section 4684f29 1c97970 change % change
esp32 all-clusters-app m5stack (read only) 958283 958287 4 0.0
.flash.text 952899 952903 4 0.0
p6 all-clusters-app default (read/write) 2349776 2349792 16 0.0
.text 1308040 1308056 16 0.0
Decreases (1 build for esp32)
platform target config section 4684f29 1c97970 change % change
esp32 all-clusters-app c3devkit (read only) 855576 855574 -2 -0.0
.flash.text 855576 855574 -2 -0.0
Full report (30 builds for efr32, esp32, k32w, mbed, nrfconnect, p6, qpg, telink)
platform target config section 4684f29 1c97970 change % change
efr32 lighting-app BRD4161A (read only) 794704 794704 0 0.0
(read/write) 122992 122992 0 0.0
.bss 121168 121168 0 0.0
.data 1820 1820 0 0.0
.text 794696 794696 0 0.0
BRD4161A+rpc (read only) 782316 782316 0 0.0
(read/write) 139672 139672 0 0.0
.bss 137744 137744 0 0.0
.data 1928 1928 0 0.0
.text 782308 782308 0 0.0
window-app BRD4161A (read only) 771640 771640 0 0.0
(read/write) 121128 121128 0 0.0
.bss 119344 119344 0 0.0
.data 1784 1784 0 0.0
.text 771632 771632 0 0.0
esp32 all-clusters-app c3devkit (read only) 855576 855574 -2 -0.0
(read/write) 1305994 1305994 0 0.0
.dram0.bss 67640 67640 0 0.0
.dram0.data 14124 14124 0 0.0
.flash.rodata 171192 171192 0 0.0
.flash.text 855576 855574 -2 -0.0
.iram0.text 62076 62076 0 0.0
m5stack (read only) 958283 958287 4 0.0
(read/write) 450236 450236 0 0.0
.dram0.bss 75000 75000 0 0.0
.dram0.data 34048 34048 0 0.0
.flash.rodata 209400 209400 0 0.0
.flash.text 952899 952903 4 0.0
.iram0.text 123451 123451 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 731932 731932 0 0.0
.bss 81240 81240 0 0.0
.data 1852 1852 0 0.0
.text 643040 643040 0 0.0
lock-app k32w061+debug (read/write) 622516 622516 0 0.0
.bss 71904 71904 0 0.0
.data 1820 1820 0 0.0
.text 542992 542992 0 0.0
shell k32w061+debug (read/write) 685608 685608 0 0.0
.bss 81604 81604 0 0.0
.data 1792 1792 0 0.0
.text 596412 596412 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2316008 2316008 0 0.0
.bss 186892 186892 0 0.0
.data 5232 5232 0 0.0
.heap 844320 844320 0 0.0
.text 1278584 1278584 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2298656 2298656 0 0.0
.bss 175704 175704 0 0.0
.data 5488 5488 0 0.0
.heap 855256 855256 0 0.0
.text 1261256 1261256 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2271568 2271568 0 0.0
.bss 174744 174744 0 0.0
.data 5488 5488 0 0.0
.heap 856216 856216 0 0.0
.text 1234168 1234168 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1140008 1140008 0 0.0
.bss 11756 11756 0 0.0
.data 4376 4376 0 0.0
.heap 1020312 1020312 0 0.0
.text 103392 103392 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2047808 2047808 0 0.0
.bss 156564 156564 0 0.0
.data 4864 4864 0 0.0
.heap 875016 875016 0 0.0
.text 1010408 1010408 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 896763 896763 0 0.0
bss 116176 116176 0 0.0
rodata 100132 100132 0 0.0
text 604900 604900 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 859803 859803 0 0.0
bss 112524 112524 0 0.0
rodata 91428 91428 0 0.0
text 579628 579628 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 822706 822706 0 0.0
bss 117552 117552 0 0.0
rodata 95388 95388 0 0.0
text 535272 535272 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 869199 869199 0 0.0
bss 113440 113440 0 0.0
rodata 96248 96248 0 0.0
text 584156 584156 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 795386 795386 0 0.0
bss 114848 114848 0 0.0
rodata 91540 91540 0 0.0
text 514620 514620 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497463 497463 0 0.0
bss 51820 51820 0 0.0
rodata 45852 45852 0 0.0
text 339492 339492 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 874099 874099 0 0.0
bss 113352 113352 0 0.0
rodata 97604 97604 0 0.0
text 587672 587672 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 867323 867323 0 0.0
bss 113228 113228 0 0.0
rodata 95740 95740 0 0.0
text 582892 582892 0 0.0
shell nrf52840dk_nrf52840 (read/write) 781611 781611 0 0.0
bss 109552 109552 0 0.0
rodata 74280 74280 0 0.0
text 523264 523264 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 696686 696686 0 0.0
bss 110532 110532 0 0.0
rodata 68920 68920 0 0.0
text 443904 443904 0 0.0
p6 all-clusters-app default (read/write) 2349776 2349792 16 0.0
.bss 113124 113124 0 0.0
.data 2512 2512 0 0.0
.heap 917704 917704 0 0.0
.text 1308040 1308056 16 0.0
light-app default (read/write) 2281080 2281080 0 0.0
.bss 100896 100896 0 0.0
.data 2328 2328 0 0.0
.heap 930120 930120 0 0.0
.text 1239344 1239344 0 0.0
lock-app default (read/write) 2257168 2257168 0 0.0
.bss 99776 99776 0 0.0
.data 2288 2288 0 0.0
.heap 931280 931280 0 0.0
.text 1215432 1215432 0 0.0
qpg lighting-app qpg6100+debug (read only) 511764 511764 0 0.0
(read/write) 122332 122332 0 0.0
.bss 82616 82616 0 0.0
.data 956 956 0 0.0
.text 506444 506444 0 0.0
lock-app qpg6100+debug (read only) 485948 485948 0 0.0
(read/write) 122336 122336 0 0.0
.bss 81752 81752 0 0.0
.data 912 912 0 0.0
.text 480628 480628 0 0.0
persistent-storage-app qpg6100+debug (read only) 108104 108104 0 0.0
(read/write) 122336 122336 0 0.0
.bss 36152 36152 0 0.0
.data 288 288 0 0.0
.text 102784 102784 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 800086 800086 0 0.0
bss 82756 82756 0 0.0
noinit 37160 37160 0 0.0
text 557192 557192 0 0.0

@vivien-apple
Copy link
Contributor

Closing #12721 then. Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants