Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. MySensors Gateway on OrangePi 5

MySensors Gateway on OrangePi 5

Scheduled Pinned Locked Moved Development
5 Posts 3 Posters 41 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mauri
    wrote on last edited by
    #1

    Hi all
    I'm trying to compile the MySensors Gateway on my OrangePi 5.
    My configuration:

    ./configure --my-transport=rf24 --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-rf24-ce-pin=13 --my-rf24-cs-pin=15 --my-rf24-irq-pin=16 --my-mqtt-publish-topic-prefix=[prefix] --my-mqtt-subscribe-topic-prefix=[prefix] --my-mqtt-client-id=[client_id] --my-mqtt-user=[user] --my-mqtt-password=[pwd]
    

    Unfortunately I get compilation warnings and errors when running make:

    ./hal/transport/RF24/driver/RF24.cpp: In function ‘void RF24_registerReceiveCallback(RF24_receiveCallbackType)’:
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./hal/transport/RF24/driver/RF24.cpp:507:9: note: in expansion of macro ‘MY_CRITICAL_SECTION’
      507 |         MY_CRITICAL_SECTION {
          |         ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./hal/transport/RF24/driver/RF24.cpp:507:9: note: in expansion of macro ‘MY_CRITICAL_SECTION’
      507 |         MY_CRITICAL_SECTION {
          |         ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./hal/transport/RF24/driver/RF24.cpp:507:9: note: in expansion of macro ‘MY_CRITICAL_SECTION’
      507 |         MY_CRITICAL_SECTION {
          |         ^~~~~~~~~~~~~~~~~~~
    ./hal/transport/RF24/driver/RF24.cpp: At global scope:
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                  ^~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./hal/transport/RF24/driver/RF24.cpp:507:9: note: in expansion of macro ‘MY_CRITICAL_SECTION’
      507 |         MY_CRITICAL_SECTION {
          |         ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
       88 | static __inline__ void __hwLock()
          |                        ^~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h: In member function ‘void CircularBuffer<T>::clear()’:
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:53:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
       53 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:53:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
       53 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:53:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
       53 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h: At global scope:
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                  ^~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:53:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
       53 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
       88 | static __inline__ void __hwLock()
          |                        ^~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h: In member function ‘bool CircularBuffer<T>::empty() const’:
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:66:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
       66 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:66:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
       66 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:66:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
       66 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h: At global scope:
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                  ^~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:66:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
       66 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
       88 | static __inline__ void __hwLock()
          |                        ^~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h: In member function ‘bool CircularBuffer<T>::full() const’:
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:79:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
       79 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:79:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
       79 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:79:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
       79 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h: At global scope:
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                  ^~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:79:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
       79 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
       88 | static __inline__ void __hwLock()
          |                        ^~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h: In member function ‘uint8_t CircularBuffer<T>::available() const’:
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:92:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
       92 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:92:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
       92 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:92:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
       92 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h: At global scope:
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                  ^~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:92:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
       92 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
       88 | static __inline__ void __hwLock()
          |                        ^~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h: In member function ‘T* CircularBuffer<T>::getFront() const’:
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:106:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
      106 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:106:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
      106 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:106:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
      106 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h: At global scope:
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                  ^~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:106:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
      106 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
       88 | static __inline__ void __hwLock()
          |                        ^~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h: In member function ‘bool CircularBuffer<T>::pushFront(T*)’:
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:123:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
      123 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:123:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
      123 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:123:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
      123 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h: At global scope:
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                  ^~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:123:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
      123 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
       88 | static __inline__ void __hwLock()
          |                        ^~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h: In member function ‘T* CircularBuffer<T>::getBack() const’:
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:146:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
      146 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:146:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
      146 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:146:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
      146 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h: At global scope:
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                  ^~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:146:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
      146 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
       88 | static __inline__ void __hwLock()
          |                        ^~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h: In member function ‘bool CircularBuffer<T>::popBack()’:
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:161:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
      161 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:161:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
      161 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                          ^~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:161:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
      161 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h: At global scope:
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
      106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
          |                                                  ^~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
      113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
          |                             ^~~~~~~~~~~~
    ./drivers/CircularBuffer/CircularBuffer.h:161:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
      161 |                 MY_CRITICAL_SECTION {
          |                 ^~~~~~~~~~~~~~~~~~~
    ./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
       88 | static __inline__ void __hwLock()
          |                        ^~~~~~~~
    make: *** [Makefile:99: build/examples_linux/mysgw.o] Error 1
    

    The cpp / g++ compiler version:

    root@DESKTOP-GETBHUS:/mnt/d/temp/MySensors# gcc --version
    gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
    Copyright (C) 2021 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    

    Any idea how to fix this?

    Regards, M. Erni

    mfalkviddM 1 Reply Last reply
    0
    • M mauri

      Hi all
      I'm trying to compile the MySensors Gateway on my OrangePi 5.
      My configuration:

      ./configure --my-transport=rf24 --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-rf24-ce-pin=13 --my-rf24-cs-pin=15 --my-rf24-irq-pin=16 --my-mqtt-publish-topic-prefix=[prefix] --my-mqtt-subscribe-topic-prefix=[prefix] --my-mqtt-client-id=[client_id] --my-mqtt-user=[user] --my-mqtt-password=[pwd]
      

      Unfortunately I get compilation warnings and errors when running make:

      ./hal/transport/RF24/driver/RF24.cpp: In function ‘void RF24_registerReceiveCallback(RF24_receiveCallbackType)’:
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./hal/transport/RF24/driver/RF24.cpp:507:9: note: in expansion of macro ‘MY_CRITICAL_SECTION’
        507 |         MY_CRITICAL_SECTION {
            |         ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./hal/transport/RF24/driver/RF24.cpp:507:9: note: in expansion of macro ‘MY_CRITICAL_SECTION’
        507 |         MY_CRITICAL_SECTION {
            |         ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./hal/transport/RF24/driver/RF24.cpp:507:9: note: in expansion of macro ‘MY_CRITICAL_SECTION’
        507 |         MY_CRITICAL_SECTION {
            |         ^~~~~~~~~~~~~~~~~~~
      ./hal/transport/RF24/driver/RF24.cpp: At global scope:
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                  ^~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./hal/transport/RF24/driver/RF24.cpp:507:9: note: in expansion of macro ‘MY_CRITICAL_SECTION’
        507 |         MY_CRITICAL_SECTION {
            |         ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
         88 | static __inline__ void __hwLock()
            |                        ^~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h: In member function ‘void CircularBuffer<T>::clear()’:
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:53:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
         53 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:53:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
         53 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:53:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
         53 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h: At global scope:
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                  ^~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:53:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
         53 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
         88 | static __inline__ void __hwLock()
            |                        ^~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h: In member function ‘bool CircularBuffer<T>::empty() const’:
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:66:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
         66 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:66:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
         66 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:66:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
         66 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h: At global scope:
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                  ^~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:66:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
         66 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
         88 | static __inline__ void __hwLock()
            |                        ^~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h: In member function ‘bool CircularBuffer<T>::full() const’:
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:79:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
         79 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:79:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
         79 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:79:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
         79 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h: At global scope:
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                  ^~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:79:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
         79 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
         88 | static __inline__ void __hwLock()
            |                        ^~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h: In member function ‘uint8_t CircularBuffer<T>::available() const’:
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:92:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
         92 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:92:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
         92 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:92:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
         92 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h: At global scope:
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                  ^~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:92:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
         92 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
         88 | static __inline__ void __hwLock()
            |                        ^~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h: In member function ‘T* CircularBuffer<T>::getFront() const’:
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:106:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
        106 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:106:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
        106 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:106:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
        106 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h: At global scope:
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                  ^~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:106:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
        106 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
         88 | static __inline__ void __hwLock()
            |                        ^~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h: In member function ‘bool CircularBuffer<T>::pushFront(T*)’:
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:123:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
        123 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:123:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
        123 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:123:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
        123 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h: At global scope:
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                  ^~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:123:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
        123 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
         88 | static __inline__ void __hwLock()
            |                        ^~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h: In member function ‘T* CircularBuffer<T>::getBack() const’:
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:146:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
        146 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:146:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
        146 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:146:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
        146 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h: At global scope:
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                  ^~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:146:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
        146 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
         88 | static __inline__ void __hwLock()
            |                        ^~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h: In member function ‘bool CircularBuffer<T>::popBack()’:
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:161:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
        161 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: remove parentheses to default-initialize a variable
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:161:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
        161 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:58: note: or replace parentheses with braces to value-initialize a variable
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                          ^~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:161:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
        161 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h: At global scope:
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:106:50: error: ambiguating new declaration of ‘uint8_t __hwLock()’
        106 | #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
            |                                                  ^~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:113:29: note: in expansion of macro ‘ATOMIC_BLOCK’
        113 | #define MY_CRITICAL_SECTION ATOMIC_BLOCK
            |                             ^~~~~~~~~~~~
      ./drivers/CircularBuffer/CircularBuffer.h:161:17: note: in expansion of macro ‘MY_CRITICAL_SECTION’
        161 |                 MY_CRITICAL_SECTION {
            |                 ^~~~~~~~~~~~~~~~~~~
      ./hal/architecture/Linux/MyHwLinuxGeneric.h:88:24: note: old declaration ‘void __hwLock()’
         88 | static __inline__ void __hwLock()
            |                        ^~~~~~~~
      make: *** [Makefile:99: build/examples_linux/mysgw.o] Error 1
      

      The cpp / g++ compiler version:

      root@DESKTOP-GETBHUS:/mnt/d/temp/MySensors# gcc --version
      gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
      Copyright (C) 2021 Free Software Foundation, Inc.
      This is free software; see the source for copying conditions.  There is NO
      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
      

      Any idea how to fix this?

      Regards, M. Erni

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      Welcome to the forum @mauri

      Did you follow the instructions at https://www.mysensors.org/build/orange ?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mauri
        wrote on last edited by
        #3

        Thx for your tip.
        I already used the documentation you mentioned. The documentation is for OrangePi Zero but I try to compile MySensors for OrangePi 5.
        Therefore I used a different library for WiringPi: https://github.com/orangepi-xunlong/wiringOP/tree/next
        Also enabling SPI was different for OrangePi 5. SPI is working (at least I can see devices at /dev/spi... ).
        The problem that I have: I can't compile MySensors when I define MY_RF24_IRQ_PIN in configuration (see first post). When I don't use MY_RF24_IRQ_PIN, compilation works (with warnings).

        Hope this makes things more clear.

        Regards, Mauri

        1 Reply Last reply
        0
        • J Offline
          J Offline
          JeeLet
          wrote on last edited by
          #4

          search : MyHwLinuxGeneric.h parentheses declaration [-Wvexing-parse]

          ??? https://stackoverflow.com/questions/21624880/how-does-this-declaration-invoke-the-most-vexing-parse ???

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mauri
            wrote on last edited by
            #5

            Thx for the hint. Unfortunately this didn't help me to find a solution for the compilation error.
            I simply don't understand the lines 105 and 106 in (MyHwLinuxGeneric.h). Can anyone explain me the C magic going on there?

            #define ATOMIC_BLOCK for ( ATOMIC_BLOCK_CLEANUP, __hwLock(); \
                                       __atomic_loop ; __atomic_loop = 0 )
            

            I think the problem is the "new"/different compiler version being used on the OrangePi 5. On my Raspberry Pi the code compiled without any problem.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            13

            Online

            11.7k

            Users

            11.2k

            Topics

            113.0k

            Posts


            Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • MySensors
            • OpenHardware.io
            • Categories
            • Recent
            • Tags
            • Popular