Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added MinGW to CI and fixed local MinGW build #3826

Merged
merged 4 commits into from Feb 16, 2022
Merged

Conversation

firewave
Copy link
Collaborator

@firewave firewave commented Feb 12, 2022

I removed LDFLAGS from the documentation since the Makefile sets it implicitly.

Somehow the MinGW setup in the CI contains which and uname which are not available if I install MinGW locally. So even though the build works in the CI we need to adjust the detection and configuration in the Makefile. These are more reasons which would justify dropping the Makefile in favor of CMake (but I am not prepared to do that for several reasons...yet).

This is in preparation of natively running daca@home on Windows via MinGW.

@firewave
Copy link
Collaborator Author

The MinGW x86 build fails with

cli/threadexecutor.cpp: In member function 'unsigned int ThreadExecutor::check()':
cli/threadexecutor.cpp:421:87: error: no matching function for call to 'async(std::launch, unsigned int (__attribute__((stdcall)) &)(ThreadExecutor*), ThreadExecutor*)'
             threadFutures.emplace_back(std::async(std::launch::async, threadProc, this));
                                                                                       ^
In file included from cli/threadexecutor.cpp:54:
C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/future:1712:5: note: candidate: 'template<class _Fn, class ... _Args> std::future<typename std::result_of<typename std::decay<_Tp>::type(typename std::decay<_Args>::type ...)>::type> std::async(std::launch, _Fn&&, _Args&& ...)'
     async(launch __policy, _Fn&& __fn, _Args&&... __args)
     ^~~~~
C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/future:1712:5: note:   template argument deduction/substitution failed:
C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/future: In substitution of 'template<class _Fn, class ... _Args> std::future<typename std::result_of<typename std::decay<_Tp>::type(typename std::decay<_Args>::type ...)>::type> std::async(std::launch, _Fn&&, _Args&& ...) [with _Fn = unsigned int (__attribute__((stdcall)) &)(ThreadExecutor*); _Args = {ThreadExecutor*}]':
cli/threadexecutor.cpp:421:87:   required from here
C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/future:1712:5: error: function returning a function
C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/future:1745:5: note: candidate: 'template<class _Fn, class ... _Args> std::future<typename std::result_of<typename std::decay<_Tp>::type(typename std::decay<_Args>::type ...)>::type> std::async(_Fn&&, _Args&& ...)'
     async(_Fn&& __fn, _Args&&... __args)
     ^~~~~
C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/future:1745:5: note:   template argument deduction/substitution failed:
C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/future: In substitution of 'template<class _Fn, class ... _Args> std::future<typename std::result_of<typename std::decay<_Tp>::type(typename std::decay<_Args>::type ...)>::type> std::async(_Fn&&, _Args&& ...) [with _Fn = std::launch; _Args = {unsigned int (__attribute__((stdcall)) &)(ThreadExecutor*), ThreadExecutor*}]':
cli/threadexecutor.cpp:421:87:   required from here
C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/future:1745:5: error: no type named 'type' in 'class std::result_of<std::launch(unsigned int (__attribute__((stdcall)) *)(ThreadExecutor*), ThreadExecutor*)>'
mingw32-make: *** [Makefile:597: cli/threadexecutor.o] Error 1

@firewave firewave changed the title Mingw added MinGW to CI and fixed local MinGW build Feb 12, 2022
@firewave firewave marked this pull request as ready for review February 14, 2022 14:12
@danmar danmar merged commit aaa4425 into danmar:main Feb 16, 2022
@firewave firewave deleted the mingw branch February 16, 2022 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants