Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Cross compile Qt 5.5.0 for raspberry CM3 lite
Forum Updated to NodeBB v4.3 + New Features

Cross compile Qt 5.5.0 for raspberry CM3 lite

Scheduled Pinned Locked Moved Unsolved General and Desktop
coss-compileraspberrycm3
5 Posts 4 Posters 1.7k 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.
  • F Offline
    F Offline
    Franckynos
    wrote on 12 Dec 2017, 13:32 last edited by
    #1

    Hi,

    I try to corss-compile Qt for raspberry like as find in this tutorial :

    https://visualgdb.com/tutorials/raspberry/qt/embedded/

    The "configure" step works but when I try to do "make"

    I have this error

    In file included from C:/Users/franck/Downloads/qt-everywhere-opensource-src-5.5.0/qtbase/src/3rdparty/pcre/sljit/sljitUtils.c:111:0,
                     from C:/Users/franck/Downloads/qt-everywhere-opensource-src-5.5.0/qtbase/src/3rdparty/pcre/sljit/sljitLir.c:240,
                     from C:/Users/franck/Downloads/qt-everywhere-opensource-src-5.5.0/qtbase/src/3rdparty/pcre/pcre_jit_compile.c:62,
                     from C:/Users/franck/Downloads/qt-everywhere-opensource-src-5.5.0/qtbase/src/3rdparty/pcre/pcre16_jit_compile.c:43:
    C:/Users/franck/Downloads/qt-everywhere-opensource-src-5.5.0/qtbase/src/3rdparty/pcre/sljit/sljitUtils.c:113:42: error: '__PTHREAD_SPINS' undeclared here (not in a function)
     static pthread_mutex_t allocator_mutex = PTHREAD_MUTEX_INITIALIZER;
                                              ^
    make[3]: *** [.obj/pcre16_jit_compile.obj] Error 1
    make[3]: Leaving directory `/c/Users/franck/Downloads/qt-build/qtbase/src/3rdparty/pcre'
    make[2]: *** [sub-3rdparty-pcre-make_first] Error 2
    make[2]: Leaving directory `/c/Users/franck/Downloads/qt-build/qtbase/src'
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory `/c/Users/franck/Downloads/qt-build/qtbase'
    make: *** [module-qtbase-make_first] Error 2
    

    There is a problem with static pthread_mutex_t allocator_mutex = PTHREAD_MUTEX_INITIALIZER; but i don't understand why ? In the sljitUtils.c file I have :

    #if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
    
    #include <pthread.h>
    
    //UNDER IS LINE 113
    static pthread_mutex_t allocator_mutex = PTHREAD_MUTEX_INITIALIZER; 
    
    static SLJIT_INLINE void allocator_grab_lock(void)
    {
    	pthread_mutex_lock(&allocator_mutex);
    }
    
    static SLJIT_INLINE void allocator_release_lock(void)
    {
    	pthread_mutex_unlock(&allocator_mutex);
    }
    
    #endif /* SLJIT_EXECUTABLE_ALLOCATOR */
    

    Someone can help me to compile Qt for raspberry under windows?

    Thanks

    J 1 Reply Last reply 12 Dec 2017, 13:47
    0
    • F Franckynos
      12 Dec 2017, 13:32

      Hi,

      I try to corss-compile Qt for raspberry like as find in this tutorial :

      https://visualgdb.com/tutorials/raspberry/qt/embedded/

      The "configure" step works but when I try to do "make"

      I have this error

      In file included from C:/Users/franck/Downloads/qt-everywhere-opensource-src-5.5.0/qtbase/src/3rdparty/pcre/sljit/sljitUtils.c:111:0,
                       from C:/Users/franck/Downloads/qt-everywhere-opensource-src-5.5.0/qtbase/src/3rdparty/pcre/sljit/sljitLir.c:240,
                       from C:/Users/franck/Downloads/qt-everywhere-opensource-src-5.5.0/qtbase/src/3rdparty/pcre/pcre_jit_compile.c:62,
                       from C:/Users/franck/Downloads/qt-everywhere-opensource-src-5.5.0/qtbase/src/3rdparty/pcre/pcre16_jit_compile.c:43:
      C:/Users/franck/Downloads/qt-everywhere-opensource-src-5.5.0/qtbase/src/3rdparty/pcre/sljit/sljitUtils.c:113:42: error: '__PTHREAD_SPINS' undeclared here (not in a function)
       static pthread_mutex_t allocator_mutex = PTHREAD_MUTEX_INITIALIZER;
                                                ^
      make[3]: *** [.obj/pcre16_jit_compile.obj] Error 1
      make[3]: Leaving directory `/c/Users/franck/Downloads/qt-build/qtbase/src/3rdparty/pcre'
      make[2]: *** [sub-3rdparty-pcre-make_first] Error 2
      make[2]: Leaving directory `/c/Users/franck/Downloads/qt-build/qtbase/src'
      make[1]: *** [sub-src-make_first] Error 2
      make[1]: Leaving directory `/c/Users/franck/Downloads/qt-build/qtbase'
      make: *** [module-qtbase-make_first] Error 2
      

      There is a problem with static pthread_mutex_t allocator_mutex = PTHREAD_MUTEX_INITIALIZER; but i don't understand why ? In the sljitUtils.c file I have :

      #if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
      
      #include <pthread.h>
      
      //UNDER IS LINE 113
      static pthread_mutex_t allocator_mutex = PTHREAD_MUTEX_INITIALIZER; 
      
      static SLJIT_INLINE void allocator_grab_lock(void)
      {
      	pthread_mutex_lock(&allocator_mutex);
      }
      
      static SLJIT_INLINE void allocator_release_lock(void)
      {
      	pthread_mutex_unlock(&allocator_mutex);
      }
      
      #endif /* SLJIT_EXECUTABLE_ALLOCATOR */
      

      Someone can help me to compile Qt for raspberry under windows?

      Thanks

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 12 Dec 2017, 13:47 last edited by
      #2

      @Franckynos Why don't you use a more recent Qt version?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • F Offline
        F Offline
        Franckynos
        wrote on 12 Dec 2017, 14:07 last edited by
        #3

        Because I haven't info for newest version but i'll try

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 12 Dec 2017, 14:49 last edited by
          #4

          Hi
          You can also cheat and just download it ;)
          http://www.qtrpi.com/home
          (only 5.7 but might not matter if you just want to test it out)

          O 1 Reply Last reply 4 May 2023, 13:52
          1
          • M mrjj
            12 Dec 2017, 14:49

            Hi
            You can also cheat and just download it ;)
            http://www.qtrpi.com/home
            (only 5.7 but might not matter if you just want to test it out)

            O Offline
            O Offline
            ocgltd
            wrote on 4 May 2023, 13:52 last edited by
            #5

            Problem still exists in Qt 5.15.9

            Would be nice if someone can post how they solved it (and moving to a later Qt5 version is not an option because 5.15.9 is the latest at this time)

            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