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. Error while building QT6 for cross-compiling
QtWS25 Last Chance

Error while building QT6 for cross-compiling

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 1.9k 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.
  • G Offline
    G Offline
    guille31794
    wrote on last edited by
    #1

    Dear all,

    I'm into a raspberry pi project, but my board actually can't compile the project itself because it lacks of ram. I'm following this wiki that seemed very accesible to me: https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi
    And I got stuck in Building QT6 for host machine step, at line:

    cmake ../qt5/ -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=$HOME/qt-host
    

    First of all the wiki doen't say that I need cmake, but it's obvious I need it. Then goes my error:

    Configuring submodule 'qttools'
    CMake Error at /usr/lib/llvm-13/lib/cmake/clang/ClangTargets.cmake:737 (message):
      The imported target "clangBasic" references the file
    
         "/usr/lib/llvm-13/lib/libclangBasic.a"
    
      but this file does not exist.  Possible reasons include:
    
      * The file was deleted, renamed, or moved to another location.
    
      * An install or uninstall procedure did not complete successfully.
    
      * The installation package was faulty and contained
    
         "/usr/lib/llvm-13/lib/cmake/clang/ClangTargets.cmake"
    
      but not all the files it references.
    
    Call Stack (most recent call first):
      /usr/lib/cmake/clang-13/ClangConfig.cmake:20 (include)
      qttools/cmake/FindWrapLibClang.cmake:14 (find_package)
      qtbase/cmake/QtFindPackageHelpers.cmake:130 (find_package)
      qttools/configure.cmake:17 (qt_find_package)
      qtbase/cmake/QtFeature.cmake:573 (include)
      qttools/src/CMakeLists.txt:21 (qt_feature_evaluate_features)
    
    
    -- Configuring incomplete, errors occurred!
    
    

    I'm not attaching the log files because they are very extensive, but if needed I'll copy around here.

    My objective is just to complete de wiki and to compile and run my project at the raspi.

    Thanks in advance!

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mchinand
      wrote on last edited by mchinand
      #2

      @guille31794 said in Error while building QT6 for cross-compiling:

      /usr/lib/llvm-13/lib/libclangBasic.a

      See if installing the package mentioned here fixes your issue: https://askubuntu.com/questions/1220739/llvm-dev-package-missing-libclangbasic

      G 1 Reply Last reply
      2
      • M mchinand

        @guille31794 said in Error while building QT6 for cross-compiling:

        /usr/lib/llvm-13/lib/libclangBasic.a

        See if installing the package mentioned here fixes your issue: https://askubuntu.com/questions/1220739/llvm-dev-package-missing-libclangbasic

        G Offline
        G Offline
        guille31794
        wrote on last edited by guille31794
        #3

        @mchinand It seems it worked for this particular file, but now it lacks of:

        /usr/lib/llvm-13/lib/libRemoteIndexProto.a
        

        So I'll continue the thread until I can compile.

        EDIT:

        I don't know why I was missing several packages in clang and llvm in their latest versions. After installing then manually, everything worked fine as it should.
        So thank you very much for the idea and help. I used:

        sudo apt install clang-tools-14 clang-format-14 clang-tidy-14
        sudo apt install llvm-14-dev llvm-14-linker-tools llvm-14-tools llvm-14-runtime
        

        And also previous versions, 13 and 12.

        1 Reply Last reply
        2
        • C Offline
          C Offline
          ChrisW67
          wrote on last edited by
          #4

          @guille31794 said in Error while building QT6 for cross-compiling:

          First of all the wiki doen't say that I need cmake, but it's obvious I need it. Then goes my error:

          From the page you linked:

          At its most basic setup, we need at least the following components in a host machine to cross-compile Qt:
          ...

          • CMake toolchain. CMake is the recommended build generator for Qt 6. Inside this toolchain file, we will specify in detail about the exact specifications of our cross-compiled Qt build. We will store this toolchain.cmake file on our $HOME directory.
          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