Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Raspberry PI4 Bullseye QT5.15.2 => QTCreator error: ‘__PTHREAD_MUTEX_INITIALIZER’
Forum Updated to NodeBB v4.3 + New Features

Raspberry PI4 Bullseye QT5.15.2 => QTCreator error: ‘__PTHREAD_MUTEX_INITIALIZER’

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 2 Posters 346 Views
  • 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.
  • S Offline
    S Offline
    Salvator
    wrote on 19 Apr 2022, 11:50 last edited by
    #1

    Hi @all,
    I have crosscompile with out problems, than I configure the QTCreator for my new Kit.
    Device PI4, OS => Bullseye, toolchain => cross-pi-gcc-10.2.0-2
    QT-Version 5.15.2

    It lokks fine, but when I compile my project I get this error:

    /home/Salva/rpi4-qt/tools/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/include/c++/10.2.0/ext/concurrence.h:122: Fehler: ‘__PTHREAD_MUTEX_INITIALIZER’ was not declared in this scope; did you mean ‘PTHREAD_MUTEX_INITIALIZER’?
    In file included from /home/Salva/rpi4-qt/tools/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/include/c++/10.2.0/arm-linux-gnueabihf/bits/gthr-default.h:35,
    from /home/Salva/rpi4-qt/tools/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/include/c++/10.2.0/arm-linux-gnueabihf/bits/gthr.h:148,
    from /home/Salva/rpi4-qt/tools/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/include/c++/10.2.0/ext/atomicity.h:35,
    from /home/Salva/rpi4-qt/tools/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/include/c++/10.2.0/bits/basic_string.h:39,
    from /home/Salva/rpi4-qt/tools/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/include/c++/10.2.0/string:55,
    from ../../../rpi4-qt/qt5.15/include/QtCore/qbytearray.h:52,
    from ../../../rpi4-qt/qt5.15/include/QtCore/qstring.h:50,
    from ../../../rpi4-qt/qt5.15/include/QtCore/qcoreapplication.h:44,
    from ../../../rpi4-qt/qt5.15/include/QtCore/QCoreApplication:1,
    from ../Reader/main.cpp:1:
    /home/Salva/rpi4-qt/tools/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/include/c++/10.2.0/ext/concurrence.h:122:34: error: ‘__PTHREAD_MUTEX_INITIALIZER’ was not declared in this scope; did you mean ‘PTHREAD_MUTEX_INITIALIZER’?
    122 | __gthread_mutex_t _M_mutex = __GTHREAD_MUTEX_INIT;
    | ^~~~~~~~~~~~~~~~~~~~

    Do anybody hve an idea what can be wrong?
    The same project compiles fine for PI3, OS => Buster and toolchain => cross-pi-gcc-8..0-2 with the same
    QT-Version 5.15.2 .

    Thank you for helping hand

    Salva

    O 1 Reply Last reply 4 May 2023, 13:34
    0
    • S Salvator
      19 Apr 2022, 11:50

      Hi @all,
      I have crosscompile with out problems, than I configure the QTCreator for my new Kit.
      Device PI4, OS => Bullseye, toolchain => cross-pi-gcc-10.2.0-2
      QT-Version 5.15.2

      It lokks fine, but when I compile my project I get this error:

      /home/Salva/rpi4-qt/tools/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/include/c++/10.2.0/ext/concurrence.h:122: Fehler: ‘__PTHREAD_MUTEX_INITIALIZER’ was not declared in this scope; did you mean ‘PTHREAD_MUTEX_INITIALIZER’?
      In file included from /home/Salva/rpi4-qt/tools/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/include/c++/10.2.0/arm-linux-gnueabihf/bits/gthr-default.h:35,
      from /home/Salva/rpi4-qt/tools/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/include/c++/10.2.0/arm-linux-gnueabihf/bits/gthr.h:148,
      from /home/Salva/rpi4-qt/tools/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/include/c++/10.2.0/ext/atomicity.h:35,
      from /home/Salva/rpi4-qt/tools/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/include/c++/10.2.0/bits/basic_string.h:39,
      from /home/Salva/rpi4-qt/tools/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/include/c++/10.2.0/string:55,
      from ../../../rpi4-qt/qt5.15/include/QtCore/qbytearray.h:52,
      from ../../../rpi4-qt/qt5.15/include/QtCore/qstring.h:50,
      from ../../../rpi4-qt/qt5.15/include/QtCore/qcoreapplication.h:44,
      from ../../../rpi4-qt/qt5.15/include/QtCore/QCoreApplication:1,
      from ../Reader/main.cpp:1:
      /home/Salva/rpi4-qt/tools/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/include/c++/10.2.0/ext/concurrence.h:122:34: error: ‘__PTHREAD_MUTEX_INITIALIZER’ was not declared in this scope; did you mean ‘PTHREAD_MUTEX_INITIALIZER’?
      122 | __gthread_mutex_t _M_mutex = __GTHREAD_MUTEX_INIT;
      | ^~~~~~~~~~~~~~~~~~~~

      Do anybody hve an idea what can be wrong?
      The same project compiles fine for PI3, OS => Buster and toolchain => cross-pi-gcc-8..0-2 with the same
      QT-Version 5.15.2 .

      Thank you for helping hand

      Salva

      O Offline
      O Offline
      ocgltd
      wrote on 4 May 2023, 13:34 last edited by
      #2

      @Salvator Would love to see an answer to this...same issue here

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved