Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.0.1, 6.1
-
None
-
Ubuntu 20.04 LTS
-
41e3d167d5e1dede286e6960037c5ac115eb692f (qt/qtbase/dev) c1781dd958f1c844c1de0b4735dc5e268d41f4be (qt/qtbase/6.1)
Description
- Run configure.
qtrob@rob-desktop:/tmp/qttest$ ~/dev/src/qtbase/configure
- 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!
- Remove all files and subdirectories from the directory you configured in.
- 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++
- Run configure.
qtrob@rob-desktop:/tmp/qttest$ ~/dev/src/qtbase/configure
- 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!
- Remove all files and subdirectories from the directory you configured in.
- 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
- relates to
-
QTBUG-90931 compiler given by CC/CXX is ignored by qmake
- Closed