Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1212

MINGW-64: 'no known conversion for argument 1 from 'qbs_filesystem_path_string_type ... to 'const string&'' errors for builds on Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 1.10.0
    • 1.10.0
    • API: C++
    • None

    Description

      Hello, everyone,

       

      For builds using mingw-w64 got error:

      cd src\lib\corelib\ && ( if not exist Makefile c:\libQT-5.11-dev\GCC64RH\bin\qmake.exe -o Makefile c:\QTBS-1.10.0-dev\build\src\lib\corelib\corelib.pro "QBS_INSTALL_PREFIX=c:\QTBS-1.10.0-dev\build\..\GCC64RH" ) && mingw32-make -f Makefile
      mingw32-make[1]: Entering directory 'c:/QTBS-1.10.0-dev/build/src/lib/corelib'
      mingw32-make -f Makefile.Release
      mingw32-make[2]: Entering directory 'c:/QTBS-1.10.0-dev/build/src/lib/corelib'
      g++ -c -fno-keep-inline-dllexport -O2 -std=gnu++11 -Wextra -Wall -W -fexceptions -mthreads -DUNICODE -D_UNICODE -DQBS_LIBRARY -DQT_NO_CAST_FROM_ASCII -DQT_NO_PROCESS_COMBINED_ARGUMENT_START -DQBS_VERSION=\"1.10.0\" -DQBS_RELATIVE_LIBEXEC_PATH=\"../bin\" -DSRCDIR=\"c:/QTBS-1.10.0-dev/build/src/lib/corelib\" -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -I..\..\..\src -I. -I..\..\lib -Ic:\libQT-5.11-dev\GCC64RH\include\QtCore\5.11.0 -Ic:\libQT-5.11-dev\GCC64RH\include\QtCore\5.11.0\QtCore -Ic:\libQT-5.11-dev\GCC64RH\include -Ic:\libQT-5.11-dev\GCC64RH\include\QtNetwork -Ic:\libQT-5.11-dev\GCC64RH\include\QtScript -Ic:\libQT-5.11-dev\GCC64RH\include\QtXml -Ic:\libQT-5.11-dev\GCC64RH\include\QtCore -Irelease -Ic:\libQT-5.11-dev\GCC64RH\mkspecs\win32-g++  -o release\filesaver.o tools\filesaver.cpp
      In file included from tools\filesaver.cpp:46:0:
      ./tools/iosutils.h: In function 'qbs_filesystem_path_string_type qbs::Internal::utf8_to_native_path(const string&)':
      ./tools/iosutils.h:78:10: error: 'wstring_convert' is not a member of 'std'
           std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
                ^~~~~~~~~~~~~~~
      ./tools/iosutils.h:78:10: note: suggested alternative: 'wstringstream'
           std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
                ^~~~~~~~~~~~~~~
                wstringstream
      ./tools/iosutils.h:78:51: error: expected primary-expression before '>' token
           std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
                                                         ^~
      ./tools/iosutils.h:78:54: error: 'converter' was not declared in this scope
           std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
                                                            ^~~~~~~~~
      tools\filesaver.cpp: In member function 'bool qbs::Internal::FileSaver::open()':
      tools\filesaver.cpp:66:59: error: no matching function for call to 'std::basic_ifstream<char>::basic_ifstream(qbs_filesystem_path_string_type)'
               std::ifstream file(utf8_to_native_path(m_filePath));
                                                                 ^
      In file included from tools\filesaver.cpp:48:0:
      C:/ProgramData/Mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/fstream:521:7: note: candidate: std::basic_ifstream<_CharT, _Traits>::basic_ifstream(std::basic_ifstream<_CharT, _Traits>&&) [with _CharT = char; _Traits = std::char_traits<char>]
             basic_ifstream(basic_ifstream&& __rhs)
             ^~~~~~~~~~~~~~
      C:/ProgramData/Mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/fstream:521:7: note:   no known conversion for argument 1 from 'qbs_filesystem_path_string_type {aka std::__cxx11::basic_string<wchar_t>}' to 'std::basic_ifstream<char>&&'
      C:/ProgramData/Mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/fstream:511:7: note: candidate: std::basic_ifstream<_CharT, _Traits>::basic_ifstream(const string&, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::__cxx11::string = std::__cxx11::basic_string<char>; std::ios_base::openmode = std::_Ios_Openmode]
             basic_ifstream(const std::string& __s,
             ^~~~~~~~~~~~~~
      C:/ProgramData/Mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/fstream:511:7: note:   no known conversion for argument 1 from 'qbs_filesystem_path_string_type {aka std::__cxx11::basic_string<wchar_t>}' to 'const string& {aka const std::__cxx11::basic_string<char>&}'
      C:/ProgramData/Mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/fstream:495:7: note: candidate: std::basic_ifstream<_CharT, _Traits>::basic_ifstream(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]
             basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in)
             ^~~~~~~~~~~~~~
      C:/ProgramData/Mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/fstream:495:7: note:   no known conversion for argument 1 from 'qbs_filesystem_path_string_type {aka std::__cxx11::basic_string<wchar_t>}' to 'const char*'
      C:/ProgramData/Mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/fstream:481:7: note: candidate: std::basic_ifstream<_CharT, _Traits>::basic_ifstream() [with _CharT = char; _Traits = std::char_traits<char>]
             basic_ifstream() : __istream_type(), _M_filebuf()
             ^~~~~~~~~~~~~~
      C:/ProgramData/Mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/fstream:481:7: note:   candidate expects 0 arguments, 1 provided
      tools\filesaver.cpp: In member function 'bool qbs::Internal::FileSaver::commit()':
      tools\filesaver.cpp:85:61: error: no matching function for call to 'std::basic_ofstream<char>::basic_ofstream(qbs_filesystem_path_string_type)'
           std::ofstream tempFile(utf8_to_native_path(tempFilePath));
                                                                   ^
      In file included from tools\filesaver.cpp:48:0:
      C:/ProgramData/Mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/fstream:725:7: note: candidate: std::basic_ofstream<_CharT, _Traits>::basic_ofstream(std::basic_ofstream<_CharT, _Traits>&&) [with _CharT = char; _Traits = std::char_traits<char>]
             basic_ofstream(basic_ofstream&& __rhs)
             ^~~~~~~~~~~~~~
      C:/ProgramData/Mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/fstream:725:7: note:   no known conversion for argument 1 from 'qbs_filesystem_path_string_type {aka std::__cxx11::basic_string<wchar_t>}' to 'std::basic_ofstream<char>&&'
      C:/ProgramData/Mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/fstream:715:7: note: candidate: std::basic_ofstream<_CharT, _Traits>::basic_ofstream(const string&, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::__cxx11::string = std::__cxx11::basic_string<char>; std::ios_base::openmode = std::_Ios_Openmode]
             basic_ofstream(const std::string& __s,
             ^~~~~~~~~~~~~~
      C:/ProgramData/Mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/fstream:715:7: note:   no known conversion for argument 1 from 'qbs_filesystem_path_string_type {aka std::__cxx11::basic_string<wchar_t>}' to 'const string& {aka const std::__cxx11::basic_string<char>&}'
      C:/ProgramData/Mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/fstream:697:7: note: candidate: std::basic_ofstream<_CharT, _Traits>::basic_ofstream(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]
             basic_ofstream(const char* __s,
             ^~~~~~~~~~~~~~
      C:/ProgramData/Mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/fstream:697:7: note:   no known conversion for argument 1 from 'qbs_filesystem_path_string_type {aka std::__cxx11::basic_string<wchar_t>}' to 'const char*'
      C:/ProgramData/Mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/fstream:682:7: note: candidate: std::basic_ofstream<_CharT, _Traits>::basic_ofstream() [with _CharT = char; _Traits = std::char_traits<char>]
             basic_ofstream(): __ostream_type(), _M_filebuf()
             ^~~~~~~~~~~~~~
      C:/ProgramData/Mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/fstream:682:7: note:   candidate expects 0 arguments, 1 provided
      mingw32-make[2]: *** [Makefile.Release:12268: release/filesaver.o] Error 1
      mingw32-make[2]: Leaving directory 'c:/QTBS-1.10.0-dev/build/src/lib/corelib'
      mingw32-make[1]: *** [Makefile:36: release] Error 2
      mingw32-make[1]: Leaving directory 'c:/QTBS-1.10.0-dev/build/src/lib/corelib'
      mingw32-make: *** [Makefile:47: sub-src-lib-corelib-corelib-pro-make_first] Error 2

      which relate to recently merged Change #198786.

       

      Reproduced for:
        - Qt5-dev builds using mingw-w64,

      not reproduced for:
        - Qt5-dev builds using mingw-w64 with reverted Change #198786,

        - Qt5-dev builds using ICC on Windows and MSVC.

       

      Best,

      Alexander

       

      Attachments

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

        Activity

          People

            jakepetroules Jake Petroules (DO NOT ASSIGN ISSUES)
            sav sav
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes