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

syncqt.pl do not work correctly when the line-ending of source code is LF, and msys perl is used

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 5.14.0
    • 5.12
    • Build tools: Other
    • None
    • Wihdows 10 / Git for Windows 2.22.0 64bit
    • Windows
    • b03ee91ebf31bf317e49cb1295a923bd7ed0d958

    Description

      When the line-ending of source code is LF, and msys perl is used, syncqt.pl do not work correctly. As a result, compilation fails, and the error message is very confusing one. Like this.

      qt5\qtbase\src\corelib\io\qfileselector.h(44): fatal error C1083: Cannot open include file: 'QtCore/QStringList': No such file or directory

       In this case, 'configure' command is executed and finished very normally in appearance. But some of the include files which should be generated by syncqt.pl, are missing.

      Maybe setting of my building environment is not so typical, but I think syncqt.pl is desired to be more robust. For beginners like me, it is difficult to know what syncqt.pl is, and why include file is missing.

      I believe troubles like this QTBUG-51324, is related to this issue. Because also in my case, as with QTBUG-51324, generated 'include/QtGui/QtGui' file strangely contained unnesesaly lines, such as '#include "qopengles2ext.h"'.

      To avoid future trouble, I propose to make syncqt.pl to be line-ending code independent.

      How to reproduce (my case)

      1. Install Git for Windows, and choose its configuration option, "Checkout as-is, Commit Unix-style line endings". (This option means "core.autocrlf=input" in git config. I also chose "Use Git Bash Only", but it may be not important. MinGW with msys perl and Git Bash will be automatically installed)

      2. At Git Bash prompt, clone qt from qt.io.

      > git clone git://code.qt.io/qt/qt5.git --branch 5.12

      > cd qt5

      > ./init-repository --module-subset=qtbase

      3. At cmd.exe prompt, set environmental variable for MSVC, make another dir and move to it, then execute 'configure' and 'nmake'.

      > ..\qt5\configure -opensource -confirm-license -make libs -release -developer-build -no-pch

      > nmake

      'configure' script finishes with no error. But several minutes after compilation is started, 'nmake' stops with following message,

      qt5\qtbase\src\corelib\io\qfileselector.h(44): fatal error C1083: Cannot open include file: 'QtCore/QStringList': No such file or directory

      4. Then execute 'nmake clean'. All of include files is generated. Compare generated 'include/QtGui/QtGui' file to ordinaly one. Unnesesaly lines, such as '#include "qopengles2ext.h"' is found.

      Possible Solution

      I found following line that would have been added to support windows platform, but it did not work for me.

      syncqt.pl:83

      $INPUT_RECORD_SEPARATOR = "\r\n" if ($^O eq "msys");

       

      I propose to make syncqt.pl to be line-ending code independent, like described in perlport. Please see atatched patch.

       

       

       

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-77192
          # Subject Branch Project Status CR V

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes