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

lupdate fails to build with NMC on Windows due to mixing MSVC runtimes via LLVM libraries

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 6.0.0
    • Fix Version/s: None
    • Component/s: Build System: CMake
    • Labels:
    • Environment:

      Description

      With the above mentioned Software Configuration, I keep running into the Error "ITERATOR_DEBUG_LEVELĀ  mismatch" and hundreds of connected errors with multiple Clang and LLVM Files.

      At the end, the VS Linker (Link.exe) says:
      LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
      qtbase\bin\lupdate.exe : fatal error LNK1319: 1044 mismatches detected

      This also happens when I do a build with all Tools being x86_64 and Host and Target are x86_64 - so it is not a bitness Issue.
      Obviously no Issue with pure Release builds.

      Build Script (CMD, VS CMD Prompt) (WIP once again thanks to that Issue):

      @echo off
      title BUILD QT-X86 DEV DEBUG AND RELEASE DYNAMIC MSVC
      :START
      set CL=/MP%NUMBER_OF_PROCESSORS% /cgthreads8 /utf-8 /nologo
      set LINK=/CGTHREADS:%NUMBER_OF_PROCESSORS%
      set LLVM_INSTALL_DIR=%SystemDrive%\Dev\LLVMx86\
      set PATH=%PATH%;%SystemDrive%\Dev\CMake\bin\;%SystemDrive%\Dev\Ninja\;%SystemDrive%\Dev\Perlx86\perl\bin\;%SystemDrive%\Dev\Pythonx86\;%SystemDrive%\Dev\LLVMx86\bin\;%SystemDrive%\Git\bin\
      
      cd %SystemDrive%\Dev\QtSrcx86DMSVC\ && ^
      cmake %SystemDrive%\Dev\QtSDev\qt5\ --debug-output --debug-find --log-level=DEBUG -G"Ninja" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX=%SystemDrive%\Dev\Qtx86DevDebugMSVC\ -DBUILD_WITH_PCH=OFF -DBUILD_qt3d=OFF -DBUILD_qtandroidextras=OFF -DBUILD_qtquick3d=OFF -DBUILD_qtquicktimeline=OFF -DBUILD_qtshadertools=OFF -DBUILD_qtvirtualkeyboard=OFF -DBUILD_qtwayland=OFF -DFEATURE_debug_and_release=OFF -DFEATURE_dynamicgl=ON -DFEATURE_icu=OFF -DFEATURE_opengl_dynamic=ON -DFEATURE_openssl=OFF -DFEATURE_openssl_linked=OFF && ^
      ninja -v -j%NUMBER_OF_PROCESSORS% 1>C:\Dev\qt6_cmake_debug_lupdate_error_%DATE:/=-%.log 2>&1
      

      See attached Log File for more Details about this Issue (as soon Jira starts working again...)

        Attachments

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

          Activity

            People

            Assignee:
            jbornema Joerg Bornemann
            Reporter:
            meermusik Oliver Niebuhr
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes