Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Failed call: "QT_INSTALL_PREFIX"
Qt 6.12 LTS is out! See what's new in the release blog

Failed call: "QT_INSTALL_PREFIX"

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
5 Posts 2 Posters 5.7k Views 1 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.
  • A Offline
    A Offline
    AndrzejB
    wrote on last edited by AndrzejB
    #1

    I try compile https://invent.kde.org/frameworks/syntax-highlighting
    My apt Qt6 install version is 6.2.4
    KDE framework for syntax highlight requires version 6.4.0
    I install from sources to /usr/local/Qt-6.4.0/
    If I run cmake .. of syntax-highlighting
    is error

    $ cmake ..
    
    CMake Warning at /usr/local/share/ECM/modules/ECMQueryQt.cmake:97 (message):
      Failed call: "QT_INSTALL_PREFIX"
    Call Stack (most recent call first):
      /usr/local/share/ECM/kde-modules/KDEInstallDirs6.cmake:199 (ecm_query_qt)
      /usr/local/share/ECM/kde-modules/KDEInstallDirs.cmake:15 (include)
      CMakeLists.txt:12 (include)
    
    
    CMake Error at /usr/local/share/ECM/modules/ECMQueryQt.cmake:98 (message):
      Qt6 qtpaths call failed: 101
    Call Stack (most recent call first):
      /usr/local/share/ECM/kde-modules/KDEInstallDirs6.cmake:199 (ecm_query_qt)
      /usr/local/share/ECM/kde-modules/KDEInstallDirs.cmake:15 (include)
      CMakeLists.txt:12 (include)
    
    
    -- Configuring incomplete, errors occurred!
    See also "/home/andrzej/wazne/gitmy/syntax-highlighting/build/CMakeFiles/CMakeOutput.log".
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      How did you point cmake to your custom Qt build ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A Offline
        A Offline
        AndrzejB
        wrote on last edited by
        #3

        QT_INSTALL_PREFIX was probably in cmake was:

        find_package(ECM 5.240.0 REQUIRED NO_MODULE)
        

        I changed it to

        find_package(ECM REQUIRED NO_MODULE)
        

        Next I install from sources Qt 6.5.2 with standard prefix /usr
        and changed

        set(REQUIRED_QT_VERSION 6.4.0)
        find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED COMPONENTS Core Network Test)
        

        to

        find_package(Qt6 NO_MODULE REQUIRED COMPONENTS Core Network Test)
        

        now is not QT_INSTALL_PREFIX, still error with CorePrivate

        -- Performing Test HAVE_STDATOMIC - Success
        -- Found WrapAtomic: TRUE  
        CMake Error at /usr/lib/cmake/Qt6Core/Qt6CoreVersionlessTargets.cmake:37 (message):
          Some (but not all) targets in this export set were already defined.
        
          Targets Defined: Qt::Core
        
          Targets not yet defined: Qt::CorePrivate
        
        Call Stack (most recent call first):
          /usr/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:55 (include)
          /usr/lib/cmake/Qt6/Qt6Config.cmake:157 (find_package)
          CMakeLists.txt:46 (find_package)
        
        
        -- Configuring incomplete, errors occurred!
        See also "/home/andrzej/wazne/gitmy/syntax-highlighting/build/CMakeFiles/CMakeOutput.log".
        

        note: if I change Qt6 to Qt5 is without cmake errors, but unfortunately in .cpp code is used QList.data() which is error in Qt5

        1 Reply Last reply
        0
        • A Offline
          A Offline
          AndrzejB
          wrote on last edited by
          #4

          After

          sudo apt install qtbase5-private-dev qt6-tools-dev qt6-l10n-tools
          

          error changed to

          CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt6Network/Qt6NetworkPlugins.cmake:5 (__qt_internal_include_plugin_packages):
            Unknown CMake command "__qt_internal_include_plugin_packages".
          Call Stack (most recent call first):
            /usr/lib/x86_64-linux-gnu/cmake/Qt6Network/Qt6NetworkConfig.cmake:131 (include)
            /usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake:219 (find_package)
            CMakeLists.txt:49 (find_package)
          
          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            You can't mix two different Qt major versions.

            From the looks of it, you did not point CMake to your custom Qt installation. Check CMAKE_PREFIX_PATH.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            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
            • Unsolved