Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Compile Qt Sources for Linux 32-bit
Forum Updated to NodeBB v4.3 + New Features

Compile Qt Sources for Linux 32-bit

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
8 Posts 5 Posters 5.9k 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.
  • E Offline
    E Offline
    EnormousSoft
    wrote on last edited by EnormousSoft
    #1

    Host os = Xubuntu 18.04.2 64-bit
    Qt sources = 5.12.1
    Qt creator = 4.8.2

    $ ./configure -platform linux-g++-32
    
    Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
    
    WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.
    
    Either ensure that llvm-config is in your PATH environment variable, or set LLVM_INSTALL_DIR to the location of your llvm installation.
    On Linux systems you may be able to install libclang from a package. On macOS you could use Homebrew's llvm package.
    On Windows you need to set LLVM_INSTALL_DIR to the installation path.
    
    ERROR: The OpenGL functionality tests failed!
    You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
    QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.
    
    Check config.log for details.
    
    Checking for pkg-config ... no
    Checking for xkbcommon >= 0.5.0... no
    xkbcommon .............................. no
    
    WARNING: Cross compiling without sysroot. Disabling pkg-config
    
    ERROR: Feature 'xcb' was enabled, but the pre-condition 'features.thread && features.xkbcommon && libs.xcb' failed.
    

    I want to build applications for linux 32-bit, How?

    1 Reply Last reply
    0
    • E Offline
      E Offline
      EnormousSoft
      wrote on last edited by EnormousSoft
      #7

      For linux x64 64-bit on linux x64 64-bit :

      sudo apt install make g++ libgl1-mesa-dev pkg-config libxkbcommon-dev libxkbcommon-dev
      
      ./configure -qt-xcb
      

      For linux x86 32-bit on linux x64 64-bit :

      sudo apt install make g++-multilib libgl1-mesa-dev:i386 libglu1-mesa-dev:i386 pkg-config:i386 libxkbcommon-dev:i386 libxkbcommon-dev:i386
      
      ./configure -platform linux-g++-32 -qt-xcb
      

      Note: For Windows Vista 7 8 8.1 10 use last Qt release, but for Windows XP use Qt 5.6.3

      For Windows x86 32-bit on Linux 64-bit :

      sudo apt install make g++ mingw-w64
      
      ./configure -opengl desktop -xplatform win32-g++ -device-option CROSS_COMPILE=/usr/bin/i686-w64-mingw32-
      

      For Windows x64 64-bit on Linux x64 64-bit :

      sudo apt install make g++ mingw-w64
      
      ./configure -opengl desktop -xplatform win32-g++ -device-option CROSS_COMPILE=/usr/bin/x86_64-w64-mingw32-
      

      Note: For Android you need download NDK and SDK

      For Android ARM v7 :

      sudo apt install make g++ openjdk-11-jdk
      
      ./configure -xplatform android-clang -android-ndk "./android-ndk-r19c" -android-sdk "./sdk" -android-ndk-host linux-x86_64 -android-toolchain-version 4.9 -android-ndk-platform android-28 -skip qttranslations -skip qtserialport -android-arch armeabi-v7a
      

      For Android x86 :

      sudo apt install make g++ openjdk-11-jdk
      
      ./configure -xplatform android-clang -android-ndk "./android-ndk-r19c" -android-sdk "./sdk" -android-ndk-host linux-x86_64 -android-toolchain-version 4.9 -android-ndk-platform android-28 -skip qttranslations -skip qtserialport -android-arch x86
      

      More parameters can be added :

      ./configure -opensource -confirm-license -nomake examples -nomake tests -release -prefix "./install-path"
      

      More packages can be installed :

      sudo apt install gperf bison flex
      

      Bug in build Qt 5.12 for Windows x86 :
      Fix it by edit "./qtbase/src/corelib/global/qrandom.cpp" from "#if defined(Q_PROCESSOR_X86) && QT_COMPILER_SUPPORTS_HERE(RDRND)" to "#if 0"

      Bug in Android SDK :
      Fix it by edit "./sdk/tools/bin/sdkmanager" from " DEFAULT_JVM_OPTS='"-Dcom.android.sdklib.toolsdir=$APP_HOME"' " to " DEFAULT_JVM_OPTS='"-Dcom.android.sdklib.toolsdir=$APP_HOME" -XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee' "

      1 Reply Last reply
      4
      • E Offline
        E Offline
        EnormousSoft
        wrote on last edited by EnormousSoft
        #2
        This post is deleted!
        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #3

          Hi
          You also need all the required dependencies.
          https://doc.qt.io/qt-5/build-sources.html

          1 Reply Last reply
          2
          • E Offline
            E Offline
            EnormousSoft
            wrote on last edited by
            #4

            All requirements have been successfully installed, but the error still exists.
            If use "-no-opengl" everything successfully without error
            And also i can compile 32-bit "Widget" applications successfully
            But without "-opengl" I could not run 32-bit "Widget" applications, becouse the "libqxcb.so" file not found !!!
            How to fix it ?

            JonBJ jsulmJ 2 Replies Last reply
            0
            • E EnormousSoft

              All requirements have been successfully installed, but the error still exists.
              If use "-no-opengl" everything successfully without error
              And also i can compile 32-bit "Widget" applications successfully
              But without "-opengl" I could not run 32-bit "Widget" applications, becouse the "libqxcb.so" file not found !!!
              How to fix it ?

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by JonB
              #5

              @EnormousSoft
              Google for libqxcb.so ? E.g.

              • https://forum.qt.io/topic/48556/libqxcb-so-not-found
              • https://forum.qt.io/topic/91223/qt-not-generating-libqxcb-so-inside-platforms
              • https://github.com/probonopd/linuxdeployqt/issues/64
              • https://askubuntu.com/questions/308128/failed-to-load-platform-plugin-xcb-while-launching-qt5-app-on-linux-without (this one looks good)

              ?

              1 Reply Last reply
              4
              • E EnormousSoft

                All requirements have been successfully installed, but the error still exists.
                If use "-no-opengl" everything successfully without error
                And also i can compile 32-bit "Widget" applications successfully
                But without "-opengl" I could not run 32-bit "Widget" applications, becouse the "libqxcb.so" file not found !!!
                How to fix it ?

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #6

                @EnormousSoft Add -v parameter to configure and take a look at the output - it should tell more about the problem (missing headers/libs probably).

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

                1 Reply Last reply
                3
                • E Offline
                  E Offline
                  EnormousSoft
                  wrote on last edited by EnormousSoft
                  #7

                  For linux x64 64-bit on linux x64 64-bit :

                  sudo apt install make g++ libgl1-mesa-dev pkg-config libxkbcommon-dev libxkbcommon-dev
                  
                  ./configure -qt-xcb
                  

                  For linux x86 32-bit on linux x64 64-bit :

                  sudo apt install make g++-multilib libgl1-mesa-dev:i386 libglu1-mesa-dev:i386 pkg-config:i386 libxkbcommon-dev:i386 libxkbcommon-dev:i386
                  
                  ./configure -platform linux-g++-32 -qt-xcb
                  

                  Note: For Windows Vista 7 8 8.1 10 use last Qt release, but for Windows XP use Qt 5.6.3

                  For Windows x86 32-bit on Linux 64-bit :

                  sudo apt install make g++ mingw-w64
                  
                  ./configure -opengl desktop -xplatform win32-g++ -device-option CROSS_COMPILE=/usr/bin/i686-w64-mingw32-
                  

                  For Windows x64 64-bit on Linux x64 64-bit :

                  sudo apt install make g++ mingw-w64
                  
                  ./configure -opengl desktop -xplatform win32-g++ -device-option CROSS_COMPILE=/usr/bin/x86_64-w64-mingw32-
                  

                  Note: For Android you need download NDK and SDK

                  For Android ARM v7 :

                  sudo apt install make g++ openjdk-11-jdk
                  
                  ./configure -xplatform android-clang -android-ndk "./android-ndk-r19c" -android-sdk "./sdk" -android-ndk-host linux-x86_64 -android-toolchain-version 4.9 -android-ndk-platform android-28 -skip qttranslations -skip qtserialport -android-arch armeabi-v7a
                  

                  For Android x86 :

                  sudo apt install make g++ openjdk-11-jdk
                  
                  ./configure -xplatform android-clang -android-ndk "./android-ndk-r19c" -android-sdk "./sdk" -android-ndk-host linux-x86_64 -android-toolchain-version 4.9 -android-ndk-platform android-28 -skip qttranslations -skip qtserialport -android-arch x86
                  

                  More parameters can be added :

                  ./configure -opensource -confirm-license -nomake examples -nomake tests -release -prefix "./install-path"
                  

                  More packages can be installed :

                  sudo apt install gperf bison flex
                  

                  Bug in build Qt 5.12 for Windows x86 :
                  Fix it by edit "./qtbase/src/corelib/global/qrandom.cpp" from "#if defined(Q_PROCESSOR_X86) && QT_COMPILER_SUPPORTS_HERE(RDRND)" to "#if 0"

                  Bug in Android SDK :
                  Fix it by edit "./sdk/tools/bin/sdkmanager" from " DEFAULT_JVM_OPTS='"-Dcom.android.sdklib.toolsdir=$APP_HOME"' " to " DEFAULT_JVM_OPTS='"-Dcom.android.sdklib.toolsdir=$APP_HOME" -XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee' "

                  1 Reply Last reply
                  4
                  • E Offline
                    E Offline
                    evgen48
                    wrote on last edited by
                    #8

                    @EnormousSoft said in Compile Qt Sources for Linux 32-bit:

                    For linux x86 32-bit on linux x64 64-bit :
                    sudo apt install make g++-multilib libgl1-mesa-dev:i386 libglu1-mesa-dev:i386 pkg-config:i386 libxkbcommon-dev:i386 libxkbcommon-dev:i386

                    ./configure -platform linux-g++-32 -qt-xcb

                    also need to add :

                    sudo apt install -y libharfbuzz-dev:i386
                    

                    otherwise got an error

                    CMake Error at qtbase/cmake/FindWrapSystemHarfbuzz.cmake:56 (target_link_libraries):
                      The link interface of target "WrapSystemHarfbuzz::WrapSystemHarfbuzz"
                      contains:
                    
                        PkgConfig::PC_HARFBUZZ
                    
                      but the target was not found.  Possible reasons include:
                    
                        * There is a typo in the target name.
                        * A find_package call is missing for an IMPORTED target.
                        * An ALIAS target is missing.
                    
                    1 Reply Last reply
                    1

                    • Login

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