Unable to compile Raspberry Pi Gateway when signing enable
-
Hello
I'm trying to build a Raspberry Pi gateway with signing enable
I run./configure --my-transport=rf24 --my-gateway=ethernet --my-port=5003 --my-rf24-encryption-enabled --my-signing=software --my-signing-request-signatures make
Then I get an error not founding the min function. The log is included after. I'm running raspian stretch
Any idea of what is missing ?
Thank's for your help
Here is the output
./configure --my-transport=rf24 --my-gateway=ethernet --my-port=5003 --my-rf24-encryption-enabled --my-signing=software --my-signing-request-signatures [SECTION] Detecting target machine. [OK] machine detected: SoC=BCM2836, Type=rpi2, CPU=armv7l. [SECTION] Detecting SPI driver. [OK] SPI driver detected:BCM. [SECTION] Gateway configuration. [OK] Type: ethernet. [OK] Transport: rf24. [OK] Signing: Enabled - Using key from config file. [OK] Encryption: Enabled - Using key from config file. [OK] CPPFLAGS: -DMY_SIGNING_REQUEST_SIGNATURES -DMY_SIGNING_SOFT -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RF24_ENABLE_ENCRYPTION -DMY_PORT=5003 [SECTION] Detecting init system. [OK] Init system detected: systemd. [SECTION] Saving configuration. [OK] Saved. [SECTION] Cleaning previous builds. [OK] Finished. make gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_SIGNING_REQUEST_SIGNATURES -DMY_SIGNING_SOFT -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RF24_ENABLE_ENCRYPTION -DMY_PORT=5003 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/log.c -o build/drivers/Linux/log.o gcc -MT build/drivers/Linux/config.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_SIGNING_REQUEST_SIGNATURES -DMY_SIGNING_SOFT -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RF24_ENABLE_ENCRYPTION -DMY_PORT=5003 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/config.c -o build/drivers/Linux/config.o g++ -MT build/drivers/Linux/StdInOutStream.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_SIGNING_REQUEST_SIGNATURES -DMY_SIGNING_SOFT -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RF24_ENABLE_ENCRYPTION -DMY_PORT=5003 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/StdInOutStream.cpp -o build/drivers/Linux/StdInOutStream.o g++ -MT build/drivers/Linux/noniso.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_SIGNING_REQUEST_SIGNATURES -DMY_SIGNING_SOFT -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RF24_ENABLE_ENCRYPTION -DMY_PORT=5003 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/noniso.cpp -o build/drivers/Linux/noniso.o g++ -MT build/drivers/Linux/GPIO.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_SIGNING_REQUEST_SIGNATURES -DMY_SIGNING_SOFT -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RF24_ENABLE_ENCRYPTION -DMY_PORT=5003 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/GPIO.cpp -o build/drivers/Linux/GPIO.o g++ -MT build/drivers/Linux/SPIDEV.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_SIGNING_REQUEST_SIGNATURES -DMY_SIGNING_SOFT -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RF24_ENABLE_ENCRYPTION -DMY_PORT=5003 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/SPIDEV.cpp -o build/drivers/Linux/SPIDEV.o g++ -MT build/drivers/Linux/EthernetClient.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_SIGNING_REQUEST_SIGNATURES -DMY_SIGNING_SOFT -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RF24_ENABLE_ENCRYPTION -DMY_PORT=5003 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/EthernetClient.cpp -o build/drivers/Linux/EthernetClient.o g++ -MT build/drivers/Linux/Print.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_SIGNING_REQUEST_SIGNATURES -DMY_SIGNING_SOFT -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RF24_ENABLE_ENCRYPTION -DMY_PORT=5003 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/Print.cpp -o build/drivers/Linux/Print.o g++ -MT build/drivers/Linux/SerialPort.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_SIGNING_REQUEST_SIGNATURES -DMY_SIGNING_SOFT -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RF24_ENABLE_ENCRYPTION -DMY_PORT=5003 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/SerialPort.cpp -o build/drivers/Linux/SerialPort.o g++ -MT build/drivers/Linux/Stream.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_SIGNING_REQUEST_SIGNATURES -DMY_SIGNING_SOFT -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RF24_ENABLE_ENCRYPTION -DMY_PORT=5003 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/Stream.cpp -o build/drivers/Linux/Stream.o g++ -MT build/drivers/Linux/IPAddress.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_SIGNING_REQUEST_SIGNATURES -DMY_SIGNING_SOFT -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RF24_ENABLE_ENCRYPTION -DMY_PORT=5003 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/IPAddress.cpp -o build/drivers/Linux/IPAddress.o g++ -MT build/drivers/Linux/compatibility.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_SIGNING_REQUEST_SIGNATURES -DMY_SIGNING_SOFT -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RF24_ENABLE_ENCRYPTION -DMY_PORT=5003 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/compatibility.cpp -o build/drivers/Linux/compatibility.o g++ -MT build/drivers/Linux/interrupt.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_SIGNING_REQUEST_SIGNATURES -DMY_SIGNING_SOFT -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RF24_ENABLE_ENCRYPTION -DMY_PORT=5003 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/interrupt.cpp -o build/drivers/Linux/interrupt.o g++ -MT build/drivers/Linux/SoftEeprom.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_SIGNING_REQUEST_SIGNATURES -DMY_SIGNING_SOFT -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RF24_ENABLE_ENCRYPTION -DMY_PORT=5003 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/SoftEeprom.cpp -o build/drivers/Linux/SoftEeprom.o g++ -MT build/drivers/Linux/EthernetServer.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_SIGNING_REQUEST_SIGNATURES -DMY_SIGNING_SOFT -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RF24_ENABLE_ENCRYPTION -DMY_PORT=5003 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/Linux/EthernetServer.cpp -o build/drivers/Linux/EthernetServer.o g++ -MT build/examples_linux/mysgw.o -MMD -MP -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_SIGNING_REQUEST_SIGNATURES -DMY_SIGNING_SOFT -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_RF24_ENABLE_ENCRYPTION -DMY_PORT=5003 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/BCM -c examples_linux/mysgw.cpp -o build/examples_linux/mysgw.o In file included from ./MySensors.h:148:0, from examples_linux/mysgw.cpp:82: ./core/MySigningAtsha204Soft.cpp: In function ‘bool signerAtsha204SoftGetNonce(MyMessage&)’: ./core/MySigningAtsha204Soft.cpp:173:55: error: no matching function for call to ‘min(unsigned int, int)’ msg.set(_signing_verifying_nonce, MIN(MAX_PAYLOAD, 32)); ^ In file included from /usr/include/c++/6/algorithm:62:0, from ./drivers/Linux/Arduino.h:32, from ./MySensors.h:39, from examples_linux/mysgw.cpp:82: /usr/include/c++/6/bits/stl_algo.h:3453:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare) min(initializer_list<_Tp> __l, _Compare __comp) ^~~ /usr/include/c++/6/bits/stl_algo.h:3453:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:148:0, from examples_linux/mysgw.cpp:82: ./core/MySigningAtsha204Soft.cpp:173:55: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’ msg.set(_signing_verifying_nonce, MIN(MAX_PAYLOAD, 32)); ^ In file included from /usr/include/c++/6/algorithm:62:0, from ./drivers/Linux/Arduino.h:32, from ./MySensors.h:39, from examples_linux/mysgw.cpp:82: /usr/include/c++/6/bits/stl_algo.h:3447:5: note: candidate: template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>) min(initializer_list<_Tp> __l) ^~~ /usr/include/c++/6/bits/stl_algo.h:3447:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:148:0, from examples_linux/mysgw.cpp:82: ./core/MySigningAtsha204Soft.cpp:173:55: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’ msg.set(_signing_verifying_nonce, MIN(MAX_PAYLOAD, 32)); ^ In file included from /usr/include/c++/6/bits/char_traits.h:39:0, from /usr/include/c++/6/ios:40, from /usr/include/c++/6/ostream:38, from /usr/include/c++/6/iostream:39, from examples_linux/mysgw.cpp:20: /usr/include/c++/6/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^~~ /usr/include/c++/6/bits/stl_algobase.h:243:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:148:0, from examples_linux/mysgw.cpp:82: ./core/MySigningAtsha204Soft.cpp:173:55: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’) msg.set(_signing_verifying_nonce, MIN(MAX_PAYLOAD, 32)); ^ In file included from /usr/include/c++/6/bits/char_traits.h:39:0, from /usr/include/c++/6/ios:40, from /usr/include/c++/6/ostream:38, from /usr/include/c++/6/iostream:39, from examples_linux/mysgw.cpp:20: /usr/include/c++/6/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^~~ /usr/include/c++/6/bits/stl_algobase.h:195:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:148:0, from examples_linux/mysgw.cpp:82: ./core/MySigningAtsha204Soft.cpp:173:55: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’) msg.set(_signing_verifying_nonce, MIN(MAX_PAYLOAD, 32)); ^ ./core/MySigningAtsha204Soft.cpp: In function ‘void signerAtsha204SoftPutNonce(MyMessage&)’: ./core/MySigningAtsha204Soft.cpp:190:89: error: no matching function for call to ‘min(unsigned int, int)’ (void)memcpy((void *)_signing_nonce, (const void *)msg.getCustom(), MIN(MAX_PAYLOAD, 32)); ^ In file included from /usr/include/c++/6/algorithm:62:0, from ./drivers/Linux/Arduino.h:32, from ./MySensors.h:39, from examples_linux/mysgw.cpp:82: /usr/include/c++/6/bits/stl_algo.h:3453:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare) min(initializer_list<_Tp> __l, _Compare __comp) ^~~ /usr/include/c++/6/bits/stl_algo.h:3453:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:148:0, from examples_linux/mysgw.cpp:82: ./core/MySigningAtsha204Soft.cpp:190:89: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’ (void)memcpy((void *)_signing_nonce, (const void *)msg.getCustom(), MIN(MAX_PAYLOAD, 32)); ^ In file included from /usr/include/c++/6/algorithm:62:0, from ./drivers/Linux/Arduino.h:32, from ./MySensors.h:39, from examples_linux/mysgw.cpp:82: /usr/include/c++/6/bits/stl_algo.h:3447:5: note: candidate: template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>) min(initializer_list<_Tp> __l) ^~~ /usr/include/c++/6/bits/stl_algo.h:3447:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:148:0, from examples_linux/mysgw.cpp:82: ./core/MySigningAtsha204Soft.cpp:190:89: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’ (void)memcpy((void *)_signing_nonce, (const void *)msg.getCustom(), MIN(MAX_PAYLOAD, 32)); ^ In file included from /usr/include/c++/6/bits/char_traits.h:39:0, from /usr/include/c++/6/ios:40, from /usr/include/c++/6/ostream:38, from /usr/include/c++/6/iostream:39, from examples_linux/mysgw.cpp:20: /usr/include/c++/6/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^~~ /usr/include/c++/6/bits/stl_algobase.h:243:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:148:0, from examples_linux/mysgw.cpp:82: ./core/MySigningAtsha204Soft.cpp:190:89: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’) (void)memcpy((void *)_signing_nonce, (const void *)msg.getCustom(), MIN(MAX_PAYLOAD, 32)); ^ In file included from /usr/include/c++/6/bits/char_traits.h:39:0, from /usr/include/c++/6/ios:40, from /usr/include/c++/6/ostream:38, from /usr/include/c++/6/iostream:39, from examples_linux/mysgw.cpp:20: /usr/include/c++/6/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^~~ /usr/include/c++/6/bits/stl_algobase.h:195:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:148:0, from examples_linux/mysgw.cpp:82: ./core/MySigningAtsha204Soft.cpp:190:89: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’) (void)memcpy((void *)_signing_nonce, (const void *)msg.getCustom(), MIN(MAX_PAYLOAD, 32)); ^ ./core/MySigningAtsha204Soft.cpp: In function ‘bool signerAtsha204SoftSignMsg(MyMessage&)’: ./core/MySigningAtsha204Soft.cpp:229:50: error: no matching function for call to ‘min(unsigned int, int)’ MIN(MAX_PAYLOAD-mGetLength(msg), 32)); ^ In file included from /usr/include/c++/6/algorithm:62:0, from ./drivers/Linux/Arduino.h:32, from ./MySensors.h:39, from examples_linux/mysgw.cpp:82: /usr/include/c++/6/bits/stl_algo.h:3453:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare) min(initializer_list<_Tp> __l, _Compare __comp) ^~~ /usr/include/c++/6/bits/stl_algo.h:3453:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:148:0, from examples_linux/mysgw.cpp:82: ./core/MySigningAtsha204Soft.cpp:229:50: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’ MIN(MAX_PAYLOAD-mGetLength(msg), 32)); ^ In file included from /usr/include/c++/6/algorithm:62:0, from ./drivers/Linux/Arduino.h:32, from ./MySensors.h:39, from examples_linux/mysgw.cpp:82: /usr/include/c++/6/bits/stl_algo.h:3447:5: note: candidate: template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>) min(initializer_list<_Tp> __l) ^~~ /usr/include/c++/6/bits/stl_algo.h:3447:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:148:0, from examples_linux/mysgw.cpp:82: ./core/MySigningAtsha204Soft.cpp:229:50: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’ MIN(MAX_PAYLOAD-mGetLength(msg), 32)); ^ In file included from /usr/include/c++/6/bits/char_traits.h:39:0, from /usr/include/c++/6/ios:40, from /usr/include/c++/6/ostream:38, from /usr/include/c++/6/iostream:39, from examples_linux/mysgw.cpp:20: /usr/include/c++/6/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^~~ /usr/include/c++/6/bits/stl_algobase.h:243:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:148:0, from examples_linux/mysgw.cpp:82: ./core/MySigningAtsha204Soft.cpp:229:50: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’) MIN(MAX_PAYLOAD-mGetLength(msg), 32)); ^ In file included from /usr/include/c++/6/bits/char_traits.h:39:0, from /usr/include/c++/6/ios:40, from /usr/include/c++/6/ostream:38, from /usr/include/c++/6/iostream:39, from examples_linux/mysgw.cpp:20: /usr/include/c++/6/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^~~ /usr/include/c++/6/bits/stl_algobase.h:195:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:148:0, from examples_linux/mysgw.cpp:82: ./core/MySigningAtsha204Soft.cpp:229:50: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’) MIN(MAX_PAYLOAD-mGetLength(msg), 32)); ^ ./core/MySigningAtsha204Soft.cpp: In function ‘bool signerAtsha204SoftVerifyMsg(MyMessage&)’: ./core/MySigningAtsha204Soft.cpp:283:55: error: no matching function for call to ‘min(unsigned int, int)’ MIN(MAX_PAYLOAD-mGetLength(msg), 32))) { ^ In file included from /usr/include/c++/6/algorithm:62:0, from ./drivers/Linux/Arduino.h:32, from ./MySensors.h:39, from examples_linux/mysgw.cpp:82: /usr/include/c++/6/bits/stl_algo.h:3453:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare) min(initializer_list<_Tp> __l, _Compare __comp) ^~~ /usr/include/c++/6/bits/stl_algo.h:3453:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:148:0, from examples_linux/mysgw.cpp:82: ./core/MySigningAtsha204Soft.cpp:283:55: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’ MIN(MAX_PAYLOAD-mGetLength(msg), 32))) { ^ In file included from /usr/include/c++/6/algorithm:62:0, from ./drivers/Linux/Arduino.h:32, from ./MySensors.h:39, from examples_linux/mysgw.cpp:82: /usr/include/c++/6/bits/stl_algo.h:3447:5: note: candidate: template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>) min(initializer_list<_Tp> __l) ^~~ /usr/include/c++/6/bits/stl_algo.h:3447:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:148:0, from examples_linux/mysgw.cpp:82: ./core/MySigningAtsha204Soft.cpp:283:55: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’ MIN(MAX_PAYLOAD-mGetLength(msg), 32))) { ^ In file included from /usr/include/c++/6/bits/char_traits.h:39:0, from /usr/include/c++/6/ios:40, from /usr/include/c++/6/ostream:38, from /usr/include/c++/6/iostream:39, from examples_linux/mysgw.cpp:20: /usr/include/c++/6/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^~~ /usr/include/c++/6/bits/stl_algobase.h:243:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:148:0, from examples_linux/mysgw.cpp:82: ./core/MySigningAtsha204Soft.cpp:283:55: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’) MIN(MAX_PAYLOAD-mGetLength(msg), 32))) { ^ In file included from /usr/include/c++/6/bits/char_traits.h:39:0, from /usr/include/c++/6/ios:40, from /usr/include/c++/6/ostream:38, from /usr/include/c++/6/iostream:39, from examples_linux/mysgw.cpp:20: /usr/include/c++/6/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^~~ /usr/include/c++/6/bits/stl_algobase.h:195:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:148:0, from examples_linux/mysgw.cpp:82: ./core/MySigningAtsha204Soft.cpp:283:55: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’) MIN(MAX_PAYLOAD-mGetLength(msg), 32))) { ^ ./core/MySigningAtsha204Soft.cpp: In function ‘void signerCalculateSignature(MyMessage&, bool)’: ./core/MySigningAtsha204Soft.cpp:307:48: error: no matching function for call to ‘min(uint8_t&, int)’ uint8_t bytes_to_include = MIN(bytes_left, 32); ^ In file included from /usr/include/c++/6/algorithm:62:0, from ./drivers/Linux/Arduino.h:32, from ./MySensors.h:39, from examples_linux/mysgw.cpp:82: /usr/include/c++/6/bits/stl_algo.h:3453:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare) min(initializer_list<_Tp> __l, _Compare __comp) ^~~ /usr/include/c++/6/bits/stl_algo.h:3453:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:148:0, from examples_linux/mysgw.cpp:82: ./core/MySigningAtsha204Soft.cpp:307:48: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned char’ uint8_t bytes_to_include = MIN(bytes_left, 32); ^ In file included from /usr/include/c++/6/algorithm:62:0, from ./drivers/Linux/Arduino.h:32, from ./MySensors.h:39, from examples_linux/mysgw.cpp:82: /usr/include/c++/6/bits/stl_algo.h:3447:5: note: candidate: template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>) min(initializer_list<_Tp> __l) ^~~ /usr/include/c++/6/bits/stl_algo.h:3447:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:148:0, from examples_linux/mysgw.cpp:82: ./core/MySigningAtsha204Soft.cpp:307:48: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned char’ uint8_t bytes_to_include = MIN(bytes_left, 32); ^ In file included from /usr/include/c++/6/bits/char_traits.h:39:0, from /usr/include/c++/6/ios:40, from /usr/include/c++/6/ostream:38, from /usr/include/c++/6/iostream:39, from examples_linux/mysgw.cpp:20: /usr/include/c++/6/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^~~ /usr/include/c++/6/bits/stl_algobase.h:243:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:148:0, from examples_linux/mysgw.cpp:82: ./core/MySigningAtsha204Soft.cpp:307:48: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned char’ and ‘int’) uint8_t bytes_to_include = MIN(bytes_left, 32); ^ In file included from /usr/include/c++/6/bits/char_traits.h:39:0, from /usr/include/c++/6/ios:40, from /usr/include/c++/6/ostream:38, from /usr/include/c++/6/iostream:39, from examples_linux/mysgw.cpp:20: /usr/include/c++/6/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^~~ /usr/include/c++/6/bits/stl_algobase.h:195:5: note: template argument deduction/substitution failed: In file included from ./MySensors.h:148:0, from examples_linux/mysgw.cpp:82: ./core/MySigningAtsha204Soft.cpp:307:48: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned char’ and ‘int’) uint8_t bytes_to_include = MIN(bytes_left, 32); ^ ./core/MySigningAtsha204Soft.cpp: In function ‘bool signerAtsha204SoftVerifyMsg(MyMessage&)’: ./core/MySigningAtsha204Soft.cpp:289:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ Makefile:98 : la recette pour la cible « build/examples_linux/mysgw.o » a échouée make: *** [build/examples_linux/mysgw.o] Erreur 1
-
Hello
A fix was done in the source code. It's ok
Still in dev branch
-
For reference, https://github.com/mysensors/MySensors/issues/1246 is linked to the code fix