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

Wrong qmake lib/include detection from gcc on MSYS2

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.7.1
    • 5.7.0
    • Build tools: qmake
    • None
    • Windows 7 64bit
    • a8c98dcb89f2b3f8438555d8febe17d3542d0567

    Description

      The change https://codereview.qt-project.org/#/c/157817/ is not OK on MSYS2.

      While MSYS2 uses GCC (details below), it's still a Windows platform and the patch results in detecting wrong paths for QMAKE_DEFAULT_LIBDIRS and/or QMAKE_DEFAULT_INCDIRS.

      qmake builds correctly, but every time it is run, it prints "unable to access the specified path". Multiple times if creating a Makefile.

      Conditioning the gcc block like this "!win32:gcc {" fixes the error, so basically the patch is a regression that wasn't there on 5.6.x.

      When applying patches like this, please try to consider also the MSYS2 case, cause a few people relies on it (and cause it took me a week to figure this out...). Thanks

      $ gcc -v
      Using built-in specs.
      COLLECT_GCC=C:\msys64\mingw32\bin\gcc.exe
      COLLECT_LTO_WRAPPER=C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/5.3.0/lto-wrapper.exe
      Target: i686-w64-mingw32
      Configured with: ../gcc-5.3.0/configure --prefix=/mingw32 --with-local-prefix=/mingw32/local --build=i686-w64-mingw32 --host=i686-w64-mingw32 --target=i686-w64-mingw32 --with-native-system-header-dir=/mingw32/i686-w64-mingw32/include --libexecdir=/mingw32/lib --with-gxx-include-dir=/mingw32/include/c++/5.3.0 --enable-bootstrap --with-arch=i686 --with-tune=generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-version-specific-runtime-libs --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw32 --with-mpfr=/mingw32 --with-mpc=/mingw32 --with-isl=/mingw32 --with-pkgversion='Rev5, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld --disable-sjlj-exceptions --with-dwarf2
      Thread model: posix
      gcc version 5.3.0 (Rev5, Built by MSYS2 project)
      

      If it helps, the command run by default_pre.prf ( g++ -xc++ -E -v - ) gives this output:

      COLLECT_GCC_OPTIONS='-E' '-v' '-shared-libgcc' '-mtune=generic' '-march=i686'
       C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/5.3.0/cc1plus.exe -E -quiet -v -iprefix C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/5.3.0/ -D_REENTRANT - -mtune=generic -march=i686
      

      Attachments

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

        Activity

          People

            buddenha Oswald Buddenhagen
            mcallegari79 Massimo Callegari
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes