aws/aws-iot-device-sdk-cpp

Build failed on trunk in MacOS

ek9852 opened this issue · 2 comments

Build failed on trunk (b7d3f41) on MBP
Log:
aws-iot-device-sdk-cpp/cli/../include/mqtt/Subscribe.hpp:50:13: error: explicitly defaulted copy constructor is implicitly deleted
[-Werror,-Wdefaulted-function-deleted]
SubscribePacket(const SubscribePacket &) = default;
^
aws-iot-device-sdk-cpp/cli/../include/mqtt/Subscribe.hpp:39:33: note: copy constructor of 'SubscribePacket' is implicitly deleted
because base class 'awsiotsdk::mqtt::Packet' has a deleted copy constructor
class SubscribePacket : public Packet {
^
aws-iot-device-sdk-cpp/cli/../include/mqtt/Packet.hpp:118:39: note: copy constructor of 'Packet' is implicitly deleted because field
'packet_id_' has a deleted copy constructor
std::atomic_uint_fast16_t packet_id_; ///< Message sequence identifier. Handled automatically by the MQTT client
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/atomic:1085:7: note: copy constructor of
'atomic' is implicitly deleted because base class '__atomic_base' has a deleted copy constructor
: public __atomic_base<_Tp>
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/atomic:1004:7: note: copy constructor of
'__atomic_base<unsigned short, true>' is implicitly deleted because base class '__atomic_base<unsigned short, false>' has a deleted copy constructor
: public __atomic_base<_Tp, false>
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/atomic:984:5: note: '__atomic_base' has been
explicitly marked deleted here
__atomic_base(const __atomic_base&) = delete;

It seems like SubscribePacket is only used while wrapped in a shared_ptr so the copy constructor may not be needed at all. Does it build for you if the copy constructor is deleted instead? We can take a PR that removes it.

Seems remove all those copy/move constructor (not just SubscribePacket class in that file ) fixed that problem.

But still get a lot of similar problem in other header files.

/Users/kmok/workspaces/aws-iot-device-sdk-cpp/include/mqtt/Publish.hpp:174:13: error: explicitly defaulted copy constructor is implicitly deleted
[-Werror,-Wdefaulted-function-deleted]
PubackPacket(const PubackPacket &) = default;
^
/Users/kmok/workspaces/aws-iot-device-sdk-cpp/include/mqtt/Publish.hpp:165:30: note: copy constructor of 'PubackPacket' is implicitly deleted because base
class 'awsiotsdk::mqtt::Packet' has a deleted copy constructor
class PubackPacket : public Packet {
^
/Users/kmok/workspaces/aws-iot-device-sdk-cpp/include/mqtt/Packet.hpp:118:39: note: copy constructor of 'Packet' is implicitly deleted because field
'packet_id_' has a deleted copy constructor
std::atomic_uint_fast16_t packet_id_; ///< Message sequence identifier. Handled automatically by the MQTT client
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/atomic:1085:7: note: copy constructor of
'atomic' is implicitly deleted because base class '__atomic_base' has a deleted copy constructor
: public __atomic_base<_Tp>
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/atomic:1004:7: note: copy constructor of
'__atomic_base<unsigned short, true>' is implicitly deleted because base class '__atomic_base<unsigned short, false>' has a deleted copy constructor
: public __atomic_base<_Tp, false>
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/atomic:984:5: note: '__atomic_base' has been
explicitly marked deleted here
__atomic_base(const atomic_base&) = delete;
^
In file included from /Users/kmok/workspaces/aws-iot-device-sdk-cpp/tests/unit/src/mqtt/PublishTests.cpp:24:
In file included from /Users/kmok/workspaces/aws-iot-device-sdk-cpp/tests/unit/include/MockNetworkConnection.hpp:32:
In file included from /Users/kmok/workspaces/aws-iot-device-sdk-cpp/tests/unit/include/TestHelper.hpp:27:
In file included from /Users/kmok/workspaces/aws-iot-device-sdk-cpp/include/mqtt/Client.hpp:32:
/Users/kmok/workspaces/aws-iot-device-sdk-cpp/include/mqtt/Publish.hpp:176:13: error: explicitly defaulted move constructor is implicitly deleted
[-Werror,-Wdefaulted-function-deleted]
PubackPacket(PubackPacket &&) = default;
^
/Users/kmok/workspaces/aws-iot-device-sdk-cpp/include/mqtt/Publish.hpp:165:30: note: move constructor of 'PubackPacket' is implicitly deleted because base
class 'awsiotsdk::mqtt::Packet' has a deleted move constructor
class PubackPacket : public Packet {
^
/Users/kmok/workspaces/aws-iot-device-sdk-cpp/include/mqtt/Packet.hpp:118:39: note: copy constructor of 'Packet' is implicitly deleted because field
'packet_id
' has a deleted copy constructor
std::atomic_uint_fast16_t packet_id
; ///< Message sequence identifier. Handled automatically by the MQTT client
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/atomic:1085:7: note: copy constructor of
'atomic' is implicitly deleted because base class '__atomic_base' has a deleted copy constructor
: public __atomic_base<_Tp>
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/atomic:1004:7: note: copy constructor of
'__atomic_base<unsigned short, true>' is implicitly deleted because base class '__atomic_base<unsigned short, false>' has a deleted copy constructor
: public __atomic_base<_Tp, false>
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/atomic:984:5: note: '__atomic_base' has been
explicitly marked deleted here
__atomic_base(const atomic_base&) = delete;
^
In file included from /Users/kmok/workspaces/aws-iot-device-sdk-cpp/tests/unit/src/mqtt/PublishTests.cpp:24:
In file included from /Users/kmok/workspaces/aws-iot-device-sdk-cpp/tests/unit/include/MockNetworkConnection.hpp:32:
In file included from /Users/kmok/workspaces/aws-iot-device-sdk-cpp/tests/unit/include/TestHelper.hpp:27:
In file included from /Users/kmok/workspaces/aws-iot-device-sdk-cpp/include/mqtt/Client.hpp:32:
/Users/kmok/workspaces/aws-iot-device-sdk-cpp/include/mqtt/Publish.hpp:178:27: error: explicitly defaulted copy assignment operator is implicitly deleted
[-Werror,-Wdefaulted-function-deleted]
PubackPacket &operator=(const PubackPacket &) & = default;
^
/Users/kmok/workspaces/aws-iot-device-sdk-cpp/include/mqtt/Publish.hpp:165:30: note: copy assignment operator of 'PubackPacket' is implicitly deleted because
base class 'awsiotsdk::mqtt::Packet' has a deleted copy assignment operator
class PubackPacket : public Packet {
^
/Users/kmok/workspaces/aws-iot-device-sdk-cpp/include/mqtt/Packet.hpp:118:39: note: copy assignment operator of 'Packet' is implicitly deleted because field
'packet_id
' has a deleted copy assignment operator
std::atomic_uint_fast16_t packet_id
; ///< Message sequence identifier. Handled automatically by the MQTT client
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/atomic:1085:7: note: copy assignment operator of
'atomic' is implicitly deleted because base class '__atomic_base' has a deleted copy assignment operator
: public __atomic_base<_Tp>
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/atomic:1004:7: note: copy assignment operator of
'__atomic_base<unsigned short, true>' is implicitly deleted because base class '__atomic_base<unsigned short, false>' has a deleted copy assignment
operator
: public __atomic_base<_Tp, false>
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/atomic:985:20: note: 'operator=' has been explicitly
marked deleted here
__atomic_base& operator=(const atomic_base&) = delete;
^
In file included from /Users/kmok/workspaces/aws-iot-device-sdk-cpp/tests/unit/src/mqtt/PublishTests.cpp:24:
In file included from /Users/kmok/workspaces/aws-iot-device-sdk-cpp/tests/unit/include/MockNetworkConnection.hpp:32:
In file included from /Users/kmok/workspaces/aws-iot-device-sdk-cpp/tests/unit/include/TestHelper.hpp:27:
In file included from /Users/kmok/workspaces/aws-iot-device-sdk-cpp/include/mqtt/Client.hpp:32:
/Users/kmok/workspaces/aws-iot-device-sdk-cpp/include/mqtt/Publish.hpp:180:27: error: explicitly defaulted move assignment operator is implicitly deleted
[-Werror,-Wdefaulted-function-deleted]
PubackPacket &operator=(PubackPacket &&) & = default;
^
/Users/kmok/workspaces/aws-iot-device-sdk-cpp/include/mqtt/Publish.hpp:165:30: note: move assignment operator of 'PubackPacket' is implicitly deleted because
base class 'awsiotsdk::mqtt::Packet' has a deleted move assignment operator
class PubackPacket : public Packet {
^
/Users/kmok/workspaces/aws-iot-device-sdk-cpp/include/mqtt/Packet.hpp:118:39: note: copy assignment operator of 'Packet' is implicitly deleted because field
'packet_id
' has a deleted copy assignment operator
std::atomic_uint_fast16_t packet_id
; ///< Message sequence identifier. Handled automatically by the MQTT client
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/atomic:1085:7: note: copy assignment operator of
'atomic' is implicitly deleted because base class '__atomic_base' has a deleted copy assignment operator
: public __atomic_base<_Tp>
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/atomic:1004:7: note: copy assignment operator of
'__atomic_base<unsigned short, true>' is implicitly deleted because base class '__atomic_base<unsigned short, false>' has a deleted copy assignment
operator
: public atomic_base<_Tp, false>
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/atomic:985:20: note: 'operator=' has been explicitly
marked deleted here
atomic_base& operator=(const atomic_base&) = delete;
^
18 errors generated.
make[2]: *** [tests/unit/CMakeFiles/aws-iot-unit-tests.dir/src/ResponseCodeTests.cpp.o] Error 1
make[2]: *** [cli/CMakeFiles/aws-iot.dir/cli.cpp.o] Error 1
make[1]: *** [cli/CMakeFiles/aws-iot.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
18 errors generated.
18 errors generated.
18 errors generated.
make[2]: *** [tests/integration/CMakeFiles/aws-iot-integration-tests.dir/src/MultipleClients.cpp.o] Error 1
make[2]: *** [tests/unit/CMakeFiles/aws-iot-unit-tests.dir/src/ConfigCommonTests.cpp.o] Error 1
18 errors generated.
18 errors generated.
make[2]: *** [tests/integration/CMakeFiles/aws-iot-integration-tests.dir/src/AutoReconnect.cpp.o] Error 1
18 errors generated.
make[2]: *** [tests/integration/CMakeFiles/aws-iot-integration-tests.dir/src/PubSub.cpp.o] Error 1
make[2]: *** [samples/JobsAgent/CMakeFiles/jobs-agent.dir/JobsAgentOperations.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [tests/integration/CMakeFiles/aws-iot-integration-tests.dir/src/MultipleSubAutoReconnect.cpp.o] Error 1
In file included from /Users/kmok/workspaces/aws-iot-device-sdk-cpp/tests/unit/src/discovery/DiscoveryTests.cpp:31:
/Users/kmok/workspaces/aws-iot-device-sdk-cpp/include/discovery/Discovery.hpp:55:13: error: explicitly defaulted move constructor is implicitly deleted
[-Werror,-Wdefaulted-function-deleted]
DiscoverRequestData(DiscoverRequestData &&) = default;
^
/Users/kmok/workspaces/aws-iot-device-sdk-cpp/include/discovery/Discovery.hpp:46:31: note: move constructor of 'DiscoverRequestData' is implicitly deleted
because field 'discovery_response
' has a deleted move constructor
DiscoveryResponse discovery_response
; ///< Response received in Discover request
^
/Users/kmok/workspaces/aws-iot-device-sdk-cpp/include/discovery/DiscoveryResponse.hpp:106:9: note: 'DiscoveryResponse' has been explicitly marked deleted here
DiscoveryResponse(DiscoveryResponse &&) = delete;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
18 errors generated.
make[2]: *** [tests/unit/CMakeFiles/aws-iot-unit-tests.dir//
/samples/JobsAgent/JobsAgentOperations.cpp.o] Error 1
20 errors generated.
make[2]: *** [tests/unit/CMakeFiles/aws-iot-unit-tests.dir/src/discovery/DiscoveryTests.cpp.o] Error 1
18 errors generated.
make[2]: *** [tests/integration/CMakeFiles/aws-iot-integration-tests.dir/src/JobsTest.cpp.o] Error 1
make[1]: *** [tests/integration/CMakeFiles/aws-iot-integration-tests.dir/all] Error 2
18 errors generated.
make[2]: *** [samples/ShadowDelta/CMakeFiles/shadow-delta-sample.dir/ShadowDelta.cpp.o] Error 1
make[1]: *** [samples/ShadowDelta/CMakeFiles/shadow-delta-sample.dir/all] Error 2
18 errors generated.
make[2]: *** [tests/unit/CMakeFiles/aws-iot-unit-tests.dir/src/util/JsonParserTests.cpp.o] Error 1
18 errors generated.
make[2]: *** [samples/PubSub/CMakeFiles/pub-sub-sample.dir/PubSub.cpp.o] Error 1
make[1]: *** [samples/PubSub/CMakeFiles/pub-sub-sample.dir/all] Error 2
18 errors generated.
18 errors generated.
make[2]: *** [samples/Jobs/CMakeFiles/jobs-sample.dir/JobsSample.cpp.o] Error 1
make[1]: *** [samples/Jobs/CMakeFiles/jobs-sample.dir/all] Error 2
make[2]: *** [samples/JobsAgent/CMakeFiles/jobs-agent.dir/JobsAgent.cpp.o] Error 1
make[1]: *** [samples/JobsAgent/CMakeFiles/jobs-agent.dir/all] Error 2
18 errors generated.
make[2]: *** [tests/unit/CMakeFiles/aws-iot-unit-tests.dir/src/MockNetworkConnection.cpp.o] Error 1
18 errors generated.
make[2]: *** [tests/unit/CMakeFiles/aws-iot-unit-tests.dir/src/jobs/JobsTests.cpp.o] Error 1
18 errors generated.
make[2]: *** [tests/unit/CMakeFiles/aws-iot-unit-tests.dir/src/mqtt/ClientTests.cpp.o] Error 1
18 errors generated.
make[2]: *** [tests/unit/CMakeFiles/aws-iot-unit-tests.dir/src/jobs/JobsAgentTests.cpp.o] Error 1
18 errors generated.
make[2]: *** [tests/unit/CMakeFiles/aws-iot-unit-tests.dir/src/shadow/ShadowTests.cpp.o] Error 1
18 errors generated.
make[2]: *** [tests/unit/CMakeFiles/aws-iot-unit-tests.dir/src/ClientCoreTests.cpp.o] Error 1
18 errors generated.
make[2]: *** [tests/unit/CMakeFiles/aws-iot-unit-tests.dir/src/mqtt/PublishTests.cpp.o] Error 1
18 errors generated.
make[2]: *** [tests/unit/CMakeFiles/aws-iot-unit-tests.dir/src/mqtt/ConnectTests.cpp.o] Error 1
18 errors generated.
make[2]: *** [tests/unit/CMakeFiles/aws-iot-unit-tests.dir/src/mqtt/SubscribeTests.cpp.o] Error 1
make[1]: *** [tests/unit/CMakeFiles/aws-iot-unit-tests.dir/all] Error 2
make: *** [all] Error 2