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

MSVC: 'cannot open file 'icudt.lib'' error for Debug Shared builds with ICU on Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.11
    • None
    •   * Windows 10 x64,
         * ICC 2018 Update 1,
         * MSVC 2017 15.5.0,
         * Windows SDK 10.0.16299.15,
         * Qt5-dev (4096e387f0592e3dfda5eb12b0d9c32b23d6b7db).

    Description

      Hello, everyone,

       

      For builds using ICC on Windows and MSVC got errors:

      Checking for ICU...
      Trying source 0 (type inline) of library icu ...
        => source failed condition 'config.win32 && !features.shared'.
      Trying source 1 (type inline) of library icu ...
      + cd /d C:\libQT-5.11-dev\build\config.tests\icu && C:\libQT-5.11-dev\build\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "LIBS += -Lc:\\libQT-5.11-dev\\build\\..\\..\\libICU-60.1\\MSVC64DH/lib -licuin -licuuc -licudt" "INCLUDEPATH *= c:\\libQT-5.11-dev\\build\\..\\..\\libICU-60.1\\MSVC64DH/include" C:/libQT-5.11-dev/build/config.tests/icu
      + cd /d C:\libQT-5.11-dev\build\config.tests\icu && set MAKEFLAGS=& jom
      > jom 1.1.2 - empower your cores
      >     cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zi -MDd -W0 -EHsc /Fdicu.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -DWIN64 -I. -IC:\libICU-60.1\MSVC64DH\include -IC:\libQT-5.11-dev\build\qtbase\mkspecs\win32-msvc -Fo @C:\Users\test\AppData\Local\Temp\main.obj.1120.16.jom
      > main.cpp
      >     link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:icu.exe @C:\Users\test\AppData\Local\Temp\icu.exe.1120.172.jom
      > LINK : fatal error LNK1104: cannot open file 'icudt.lib'
      > jom: C:\libQT-5.11-dev\build\config.tests\icu\Makefile [icu.exe] Error 1104
       => source failed verification.
      Trying source 2 (type inline) of library icu ...
        => source failed condition '!config.win32'.
      test config.corelib.libraries.icu FAILED
      

       

      which relate to code:

      "sources": [
          {
              "builds": {
                  "debug": "-lsicuind -lsicuucd -lsicudtd",
                  "release": "-lsicuin -lsicuuc -lsicudt"
              },
              "condition": "config.win32 && !features.shared"
          },
          { "libs": "-licuin -licuuc -licudt", "condition": "config.win32 && features.shared" },
          { "libs": "-licui18n -licuuc -licudata", "condition": "!config.win32" }

      in file 'qtbase\src\corelib\configure.json'.

       

      Reproduced for:

      • builds using <ICC|MSVC> with ICU with Debug Shared configuration,

      not reproduced for:

      • builds using <ICC|MSVC> with ICU with Release Shared configuration,
      • builds using <ICC|MSVC> with ICU with <Debug|Release> Static configurations.

       

      More precisely, there is missing condition for Debug Shared builds, similar to implemented for Debug Static builds. Since names of ICU binaries, built using MSVC with Debug Shared configuration, has 'd' ending, similar to built with Debug Static configuration.

       

      The last discussion on this relate to QTBUG-29478. Thus CC: kkohne, thiago, buddenha.

       

      Interested to continuing this discussion, taking into account current state of binaries naming in ICU build system.

      For builds using MSVC with Debug configuration, ICU build system add 'd' suffix to binaries names, see:

      ICULIBSUFFIX:=$(ICULIBSUFFIX)d#M#

      in file mh-msys-msvc.

       

      For builds using MSVC with Static layout, ICU build system add 's' prefix to binaries names, see:

      STATIC_PREFIX = s

      in file Makefile.inc.in, and

      LIBSICU = $(STATIC_PREFIX)$(ICUPREFIX)

      in file mh-msys-msvc.

       

      Such naming for builds using MSVC also could be found in other notable OSS projects (e.g. Boost use both 'd' suffix and 's' prefix, Qt use 'd' suffix only, etc.) But, surely, this has nothing common to standardization, like ANSI / ISO or something.

       

      In addition odd, that Qt build system distinguish Debug and Release ICU binary names for Static layout, but does not do this for Shared layout (i.e. Debug Shared builds expect Release naming for ICU binaries).

       

       

      Best,

      Alexander

       

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            sav sav
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes