-
Notifications
You must be signed in to change notification settings - Fork 230
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
MINGW/MSYS2 : Fetch binary dependencies from the build environnement itself instead of relying on binaries kept in Git #703
Comments
@j4reporting Using |
gcc in a mingw-w64 toolchain can be configured to not rely on winpthreads (e.g. my own linux-to-windows mingw-w64 cross-toolchains are as such), therefore, the unconditional copying of it in the makefiles can result in failures. |
@vsonnier I now realize that the copy commands are in the Makefiles. I don't know if this could be moved to the build-mingw.yml workflow file. @sezero mingw compilers distributed by the msys2 project, w64devkit, or provided by fedora and probably others are using posix threads. |
That I already know. But what they provide isn't the universal truth, that's what I'm saying. |
I have never claimed that. My prefered method would be to link the static library instead. If you want to link the shared library then something like this should work, I would not use MINGW_PREFIX though. Make it specific for MSYS2 for now.
|
Unnecessary dependence to winpthreads dll itself is a disadvantage, imo.
Existence check looks ok to me |
I've commited @j4reporting suggestion:
- MINGW_PATH = ${MINGW_PREFIX}
+LIBWINPTHREAD = $(MSYSTEM_PREFIX)/bin/libwinpthread-1.dll
dll:
if [ -f $(LIBWINPTHREAD) ]; then \
cp $(LIBWINPTHREAD) . ; \
fi For now, this is Good Enough (TM) for me. Feel free to improve later if you feel like it. Thanks for your help ! |
A follow-up of 7cf09be :
We added
libwinpthread-1.dll
as a binary dependency for MSYS2/MINGW and stored a given version (MSYS2) in/Windows/misc/[x64|x86]
, in the same way we keep SDL2 and audio codec binaries.As @j4reporting reported (pun intended) this is not very clean because this dll may have an adherence on the undelaying Mingw/MSYS2 runtime, even built static, so strictly speaking is not "portable" from one build to another.
An improvement would be to fetch 'libwinpthread-1.dll' from the current Mingw distribution used in
Makefile.w[32|64]
to garantee conststency.The text was updated successfully, but these errors were encountered: