Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt 5.5.1 build failure on Windows (path length?)

Qt 5.5.1 build failure on Windows (path length?)

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
6 Posts 6 Posters 2.9k 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.
  • B Offline
    B Offline
    Braden
    wrote on last edited by
    #1

    I'm observing a compile failure on Windows when the Qt build gets to qtimageformats:

    	cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -W3 /Fd..\..\..\..\plugins\imageformats\qwebpd.pdb -DUNICODE -DWIN32 -DWIN64 -DQT_NO_EXCEPTIONS -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:\Users\mcdanb\Build\buildpackages\API\inc -I..\..\..\3rdparty\libwebp -I..\..\..\3rdparty\libwebp\src -I..\..\..\3rdparty\libwebp\src\dec -I..\..\..\3rdparty\libwebp\src\enc -I..\..\..\3rdparty\libwebp\src\dsp -I..\..\..\3rdparty\libwebp\src\mux -I..\..\..\3rdparty\libwebp\src\utils -I..\..\..\3rdparty\libwebp\src\webp -IC:\Users\mcdanb\Build\buildpackages\API\pkg_build\qt-everywhere-opensource-src-5.5.1\qtbase\include -IC:\Users\mcdanb\Build\buildpackages\API\pkg_build\qt-everywhere-opensource-src-5.5.1\qtbase\include\QtGui -IC:\Users\mcdanb\Build\buildpackages\API\pkg_build\qt-everywhere-opensource-src-5.5.1\qtbase\include\QtANGLE -IC:\Users\mcdanb\Build\buildpackages\API\pkg_build\qt-everywhere-opensource-src-5.5.1\qtbase\include\QtCore -I.moc\debug -IC:\Users\mcdanb\Build\buildpackages\API\pkg_build\qt-everywhere-opensource-src-5.5.1\qtbase\mkspecs\win32-msvc2013 -Fo.obj\debug\Users\mcdanb\Build\buildpackages\API\pkg_build\qt-everywhere-opensource-src-5.5.1\qtimageformats\src\3rdparty\libwebp\src\dec\alpha.obj ..\..\..\3rdparty\libwebp\src\dec\alpha.c
    alpha.c
    C:\Users\mcdanb\Build\buildpackages\API\pkg_build\qt-everywhere-opensource-src-5.5.1\qtimageformats\src\3rdparty\libwebp\src\dec\alpha.c : fatal error C1083: Cannot open compiler generated file: '.obj\debug\Users\mcdanb\Build\buildpackages\API\pkg_build\qt-everywhere-opensource-src-5.5.1\qtimageformats\src\3rdparty\libwebp\src\dec\alpha.obj': No such file or directory
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\cl.EXE"' : return code '0x1'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    

    This may (simply) be a path length issue. Upon investigation, the path:

    C:\Users\mcdanb\Build\buildpackages\API\pkg_build\qt-everywhere-opensource-src-5.5.1\qtimageformats\src\plugins\imageformats\webp\.obj\debug\Users\mcdanb\Build\buildpackages\API\pkg_build\qt-everywhere-opensource-src-5.5.1\qtimageformats\src\3rdparty\libwebp\src\dec
    

    …does, in fact, exist. But it wouldn't surprise me at all if it's simply too long for the Microsoft compiler to handle. My question is: why is the Qt build creating a path with all this redundancy in it? Surely this is a mistake…? What's gone sideways here that's caused this path to be generated?

    1 Reply Last reply
    0
    • jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Try with out of source build

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • ZenitFan219Z Offline
        ZenitFan219Z Offline
        ZenitFan219
        wrote on last edited by
        #3

        Try with this *.bat file (correct). Replace to yor Visual Studio version (I have a VS2015). You can change paths if it is impotant:

        REM Set up \Microsoft Visual Studio 2015
        CALL "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64
        ECHO ON
        
        SET _CD=%CD%
        SET _PATH=%PATH%
        
        SET QT_SOURCE=%_CD%\qt-everywhere-opensource-src-5.5.164
        SET QT_BUILD=%_CD%\msvc2013_64
        SET QT_DIST=%_CD%\vc2013_64_Shared
        
        
        CD /D %_CD%
        SET PATH=%_PATH%
        
        REM Building Qt
        
        SET PATH=C:\strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;c:\python27;%PATH%;
        CALL C:\Ruby22-x64\bin\setrbvars.bat
        ECHO ON
        
        SET PATH=%QT_SOURCE%\qtbase\bin;%QT_SOURCE%\gnuwin32\bin;%PATH%
        SET QMAKESPEC=win32-msvc2013
        
        RD /s /q %QT_BUILD%
        MKDIR %QT_BUILD%
        CD /D %QT_BUILD%
        PAUSE
        CALL %QT_SOURCE%\configure.bat -prefix %QT_DIST% -debug-and-release -opensource -confirm-license -no-icu -nomake tests -opengl desktop -no-compile-examples -no-plugin-manifests -no-audio-backend -no-native-gestures -skip qtandroidextras -skip qtactiveqt -skip qtconnectivity -skip qtdeclarative -skip qtlocation -skip qtmacextras -skip qtquick1 -skip qtquickcontrols -skip qtscript -skip qtsensors -skip qtserialport -skip qtwebengine -skip qtwebchannel -skip qtwayland -skip qtwebkit -skip qtwebkit-examples -skip qtwebsockets -skip qtx11extras -developer-build
        ECHO ON
        PAUSE
        

        *.bat file must be located out of source folder:

        -=folder
        -==<qt sources>
        -==<*.bat file>

        After Qt configures do not close console and enter:

        nmake
        

        Then:

        nmake install
        

        Qt will be installed to "--prefix"

        SivaS 1 Reply Last reply
        0
        • ZenitFan219Z ZenitFan219

          Try with this *.bat file (correct). Replace to yor Visual Studio version (I have a VS2015). You can change paths if it is impotant:

          REM Set up \Microsoft Visual Studio 2015
          CALL "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64
          ECHO ON
          
          SET _CD=%CD%
          SET _PATH=%PATH%
          
          SET QT_SOURCE=%_CD%\qt-everywhere-opensource-src-5.5.164
          SET QT_BUILD=%_CD%\msvc2013_64
          SET QT_DIST=%_CD%\vc2013_64_Shared
          
          
          CD /D %_CD%
          SET PATH=%_PATH%
          
          REM Building Qt
          
          SET PATH=C:\strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;c:\python27;%PATH%;
          CALL C:\Ruby22-x64\bin\setrbvars.bat
          ECHO ON
          
          SET PATH=%QT_SOURCE%\qtbase\bin;%QT_SOURCE%\gnuwin32\bin;%PATH%
          SET QMAKESPEC=win32-msvc2013
          
          RD /s /q %QT_BUILD%
          MKDIR %QT_BUILD%
          CD /D %QT_BUILD%
          PAUSE
          CALL %QT_SOURCE%\configure.bat -prefix %QT_DIST% -debug-and-release -opensource -confirm-license -no-icu -nomake tests -opengl desktop -no-compile-examples -no-plugin-manifests -no-audio-backend -no-native-gestures -skip qtandroidextras -skip qtactiveqt -skip qtconnectivity -skip qtdeclarative -skip qtlocation -skip qtmacextras -skip qtquick1 -skip qtquickcontrols -skip qtscript -skip qtsensors -skip qtserialport -skip qtwebengine -skip qtwebchannel -skip qtwayland -skip qtwebkit -skip qtwebkit-examples -skip qtwebsockets -skip qtx11extras -developer-build
          ECHO ON
          PAUSE
          

          *.bat file must be located out of source folder:

          -=folder
          -==<qt sources>
          -==<*.bat file>

          After Qt configures do not close console and enter:

          nmake
          

          Then:

          nmake install
          

          Qt will be installed to "--prefix"

          SivaS Offline
          SivaS Offline
          Siva
          wrote on last edited by Siva
          #4

          @ZenitFan219 Thanks for the minimalistic configure command line. It worked on VS2012 and VS2015 for me on a Qt 5.5.1 source - after many many failures.

          This overcame my earlier nmake builds errors on various attempts : "project ERROR: Unknown module(s) : quick" and "undefined reference to `QArrayData::deallocate" while building qilr

          I did get a minor copy command scripting error at the very end - quite trivial to fix manually.

          copy /y C:\repo\qt551winbld\qttranslations\translations\C:\repo\qt551winbld\qttranslations\translations\assistant_en.qm c:\qt551win\translations
          C:\repo\qt551winbld\qttranslations\translations\C:\repo\qt551winbld\qttranslations\translations\assistant_en.qm
          The filename, directory name, or volume label syntax is incorrect.
                  0 file(s) copied.
          
          1 Reply Last reply
          0
          • K Offline
            K Offline
            KennethBlevins
            wrote on last edited by
            #5

            I had the same issue. Use simple and helpful longpathtool.
            Worked like the charm. Try it.

            1 Reply Last reply
            0
            • L Offline
              L Offline
              LiamFlint
              wrote on last edited by
              #6

              Hello, are you fix this?
              LongPathTool is the most user-friendly solution for resolving issues with long paths file on Windows and Mac.

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