Qt 5.5.1 build failure on Windows (path length?)



  • 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?


  • Moderators

    Try with out of source build



  • 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"



  • @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.
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.