-
Notifications
You must be signed in to change notification settings - Fork 171
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
Building using MSys2's MinGW toolchain #853
Comments
I'm not sure... The DLL output you see in the first example is typically what I encounter. The DLLs are included based on the The toolchain you're using is different between the two examples. Both nvim-qt.exe are different. WHY? A few guesses: different GCC versions, different build options were used to generate the GCC binary, different linker, etc. |
Marking as closed. I don't think there is an issue here. Feel free to keep commenting. |
By which method, first one or second one?
For both the methods, the contents of
I used the same commands (as mentioned in the Wiki) to build in both the cases. But yes, maybe the compiler/linker versions are different. But surely the difference won't be as much so as to require so many additional DLLs? |
This looks like a configuration issue with your system. Building with Windows + MinGW + Qt is non-trivial. Usually Qt has specific compiler version requirements on Windows. Be careful of package version compatibility. You can see the typical set of DLLs by looking at the pre-compiled binary. Here are the DLLs included with the latest MinGW build of
I don't follow.
I would not assume this. You've downloaded two different versions of the compiler, and potentially two different versions of Qt. Both could impact static vs dynamic linkage, libraries consumed, etc. |
My bad, I missed mentioning that I copied the additional DLLs from the I will try cross checking the compiler/linker versions and installing the specific ones in Msys2. |
I got the following information:
It looks like all the tools have a higher version on MSys2. Should I be looking for anything else? |
What's the issue here? You've got a working build, right? Everything looks good, I'm still not sure exactly what is going wrong. Based on what you've described, my next best guess is In both cases |
Yes, I've got a working build, I'm not denying that. But let's say I want to isolate whatever I've built and use it. What I'll do is, grab the nvim-qt.exe from the build/bin folder, and grab the contents of the build/windeployqt folder, and put these together. Now, I double click the executable and launch it. For the first method (Qt Installer), everything works fine, neovim-qt launches. But for the second method (Msys2), this procedure does not work. I get missing DLLs error when I try to double click the executable. To make this work, I have to copy those additional DLLs as shown in the screenshot. |
At first glance the differences are:
I cannot verify this without looking into the msys2 Qt build - but a lot of these libraries are Qt dependencies and Qt supports building then internally or using available libraries. My guess is that the Qt version built in msys2 is using separate dlls for these libraries instead of the version built inside Qt. This is a Qt build option, This is the mingw qt5 build recipe https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-qt5/PKGBUILD#L10 I have not checked in detail but it seems there is a static and non-static variant and the later uses dlls built by other recipes. This issue is not new, e.g. check this SO question. |
Thanks for the detailed writeup @equalsraf! I understand now. For experiment's sake, I did install the |
So I built neovim-qt using two methods -
pacman -S mingw-w64-x86_64-{libtool,cmake,perl,python2,ninja,diffutils,pkg-config,make,qt5,gcc}
.Both builds were successful. However, there is one problem. The binary created from the second method requires way more number of DLLs in the exe directory. See the screenshot below:
First method:
Second method:
Why is this so? Aren't both methods using the same MinGW toolchain after all?
The text was updated successfully, but these errors were encountered: