Error compiling for RPI4 64 bit: RFM69_MAX_PACKET_LEN



  • Hi,

    Trying to compile MySensors MQTT GW for RPI4 64 bits.
    Overcame the initial error described here but now having a compiling error down the road.

    In file included from ./MySensors.h:377,
                     from examples_linux/mysgw.cpp:82:
    ./hal/transport/RFM69/driver/new/RFM69_new.cpp: In function ‘void RFM69_interruptHandling()’:
    ./hal/transport/RFM69/driver/new/RFM69_new.cpp:282:62: error: no matching function for call to ‘min(long unsigned int, unsigned int)’
                                              RFM69_MAX_PACKET_LEN);
                                                                  ^
    In file included from /usr/include/c++/8/algorithm:62,
                     from ./hal/architecture/Linux/drivers/core/Arduino.h:32,
                     from ./MySensors.h:39,
                     from examples_linux/mysgw.cpp:82:
    /usr/include/c++/8/bits/stl_algo.h:3456:5: note: candidate: ‘template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare)’
         min(initializer_list<_Tp> __l, _Compare __comp)
         ^~~
    /usr/include/c++/8/bits/stl_algo.h:3456:5: note:   template argument deduction/substitution failed:
    In file included from ./MySensors.h:377,
                     from examples_linux/mysgw.cpp:82:
    ./hal/transport/RFM69/driver/new/RFM69_new.cpp:282:62: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘long unsigned int’
                                              RFM69_MAX_PACKET_LEN);
                                                                  ^
    In file included from /usr/include/c++/8/algorithm:62,
                     from ./hal/architecture/Linux/drivers/core/Arduino.h:32,
                     from ./MySensors.h:39,
                     from examples_linux/mysgw.cpp:82:
    /usr/include/c++/8/bits/stl_algo.h:3450:5: note: candidate: ‘template<class _Tp> _Tp std::min(std::initializer_list<_Tp>)’
         min(initializer_list<_Tp> __l)
         ^~~
    /usr/include/c++/8/bits/stl_algo.h:3450:5: note:   template argument deduction/substitution failed:
    In file included from ./MySensors.h:377,
                     from examples_linux/mysgw.cpp:82:
    ./hal/transport/RFM69/driver/new/RFM69_new.cpp:282:62: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘long unsigned int’
                                              RFM69_MAX_PACKET_LEN);
                                                                  ^
    In file included from /usr/include/c++/8/bits/char_traits.h:39,
                     from /usr/include/c++/8/ios:40,
                     from /usr/include/c++/8/ostream:38,
                     from /usr/include/c++/8/iostream:39,
                     from examples_linux/mysgw.cpp:20:
    /usr/include/c++/8/bits/stl_algobase.h:243:5: note: candidate: ‘template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)’
         min(const _Tp& __a, const _Tp& __b, _Compare __comp)
         ^~~
    /usr/include/c++/8/bits/stl_algobase.h:243:5: note:   template argument deduction/substitution failed:
    In file included from ./MySensors.h:377,
                     from examples_linux/mysgw.cpp:82:
    ./hal/transport/RFM69/driver/new/RFM69_new.cpp:282:62: note:   deduced conflicting types for parameter ‘const _Tp’ (‘long unsigned int’ and ‘unsigned int’)
                                              RFM69_MAX_PACKET_LEN);
                                                                  ^
    In file included from /usr/include/c++/8/bits/char_traits.h:39,
                     from /usr/include/c++/8/ios:40,
                     from /usr/include/c++/8/ostream:38,
                     from /usr/include/c++/8/iostream:39,
                     from examples_linux/mysgw.cpp:20:
    /usr/include/c++/8/bits/stl_algobase.h:195:5: note: candidate: ‘template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)’
         min(const _Tp& __a, const _Tp& __b)
         ^~~
    /usr/include/c++/8/bits/stl_algobase.h:195:5: note:   template argument deduction/substitution failed:
    In file included from ./MySensors.h:377,
                     from examples_linux/mysgw.cpp:82:
    ./hal/transport/RFM69/driver/new/RFM69_new.cpp:282:62: note:   deduced conflicting types for parameter ‘const _Tp’ (‘long unsigned int’ and ‘unsigned int’)
                                              RFM69_MAX_PACKET_LEN);
                                                                  ^
    make: *** [Makefile:99: build/examples_linux/mysgw.o] Error 1
    
    

    My configure command is

    ./configure --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=MySensorsGW --my-transport=rfm69 --my-rfm69-cs-pin=24 --my-signing=software --my-signing-request-signatures --my-rfm69-frequency=433 --my-is-rfm69hw --soc=BCM2711
    

    This error might be related wit the fact that I commented some flags in the configure file (I admit I blindly followed some instructions in an older post and I have no idea (neither knowledge) about what consequences may come from this). Maybe this error is related?

    [Edit] Tried the same compilation in a RPI3 with 32bit OS and went fine, so I'm guessing this might be related with the fact I'm compiling for 64bit. Maybe MySensors isn't yet ready for 64bit?

    Any suggestion?

    Cheers,
    Joaoabs


  • Mod

    @joaoabs said in Error compiling for RPI4 64 bit: RFM69_MAX_PACKET_LEN:

    Maybe MySensors isn't yet ready for 64bit

    It won’t be until someone wants it badly enough, and has the time and skills to do whatever is needed.

    You seem to have made some progress. Hopefully you or someone else can figure out how to proceed.


Log in to reply
 

Suggested Topics

  • 2
  • 13
  • 2
  • 29
  • 10
  • 5
  • 12
  • 1

237
Online

9.9k
Users

10.4k
Topics

107.4k
Posts