Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-90914

configure can't find compiler although CC/CXX are given

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.1.0 Alpha
    • 6.0.1, 6.1
    • Build tools: Other
    • None
    • Ubuntu 20.04 LTS
    • 41e3d167d5e1dede286e6960037c5ac115eb692f (qt/qtbase/dev) c1781dd958f1c844c1de0b4735dc5e268d41f4be (qt/qtbase/6.1)

    Description

      1. Run configure.
        qtrob@rob-desktop:/tmp/qttest$ ~/dev/src/qtbase/configure
        
      2. Check config.summary for the automatically detected compiler:
        qtrob@rob-desktop:/tmp/qttest$ head -n3 config.summary 
        
        Building for: linux-g++ (x86_64, CPU features: mmx sse sse2)
        Compiler: gcc 9.3.0
        

        Fine!

      3. Remove all files and subdirectories from the directory you configured in.
      4. Set environment variables for using clang compilers:
        qtrob@rob-desktop:/tmp/qttest$ export CC=/usr/lib/llvm-10/bin/clang
        qtrob@rob-desktop:/tmp/qttest$ export CXX=/usr/lib/llvm-10/bin/clang++
        
      5. Run configure.
        qtrob@rob-desktop:/tmp/qttest$ ~/dev/src/qtbase/configure
        
      6. Check config.summary for the automatically detected compiler:
        qtrob@rob-desktop:/tmp/qttest$ head -n3 config.summary 
        
        Building for: linux-clang (x86_64, CPU features: mmx sse sse2)
        Compiler: clang 10.0.0
        

        Fine!

      7. Remove all files and subdirectories from the directory you configured in.
      8. Run configure with setting a platform.
        qtrob@rob-desktop:/tmp/qttest$ ~/dev/src/qtbase/configure -platform linux-clang
        

        Now configure can't find clang anymore:

        '/usr/bin/cmake' '-DQT_QMAKE_TARGET_MKSPEC=linux-clang' '-DCMAKE_C_COMPILER=clang' '-DCMAKE_CXX_COMPILER=clang++' '-G' 'Ninja' '/home/qtrob/dev/src/qtbase'
        -- The CXX compiler identification is unknown
        -- The C compiler identification is unknown
        -- The ASM compiler identification is unknown
        -- Didn't find assembler
        CMake Error at CMakeLists.txt:32 (project):
          The CMAKE_CXX_COMPILER:
        
            clang++
        
          is not a full path and was not found in the PATH.
        
          Tell CMake where to find the compiler by setting either the environment
          variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
          to the compiler, or to the compiler name if it is in the PATH.
        
        
        CMake Error at CMakeLists.txt:32 (project):
          The CMAKE_C_COMPILER:
        
            clang
        
          is not a full path and was not found in the PATH.
        
          Tell CMake where to find the compiler by setting either the environment
          variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
          the compiler, or to the compiler name if it is in the PATH.
        
        
        CMake Error at CMakeLists.txt:32 (project):
          No CMAKE_ASM_COMPILER could be found.
        
          Tell CMake where to find the compiler by setting either the environment
          variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
          to the compiler, or to the compiler name if it is in the PATH.
        
        
        -- Warning: Did not find file Compiler/-ASM
        -- Configuring incomplete, errors occurred!
        See also "/tmp/qttest/CMakeFiles/CMakeOutput.log".
        See also "/tmp/qttest/CMakeFiles/CMakeError.log".
        CMake Error at /home/qtrob/dev/src/qtbase/cmake/QtProcessConfigureArgs.cmake:797 (message):
          CMake exited with code 1.
        

      configure should always use the compilers from CC and CXX. Explicitly specifying such compilers and a platform should not lead into the situation that configure can't find any compiler.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              jbornema Joerg Bornemann
              rlohning Robert Löhning
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes