fbs icon indicating copy to clipboard operation
fbs copied to clipboard

Windows build/freeze: Missing DLL points to the incorrect download page

Open cfaester opened this issue 5 years ago • 10 comments

As per: https://github.com/mherrmann/fbs/blob/bd93efba6f9c515416035c42bfe84d04cb1fc454/fbs/freeze/windows.py#L40-L52

Missing DLL's for redist 2010, 2012, and 2015 points the user to download only the 2012 version. MSVCR100 refers to 2010. MSVCR110 is 2012. MSVCR140 is 2015

Apologies for no PR. I am not a Python programmer.

cfaester avatar Sep 16 '19 18:09 cfaester

I just had a similar problem in Windows 10. Trying the redistributable from that link just gave an error saying I had a newer version. Then I installed the redistributable 2015-2019 from this page: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads which seems to always point to the latest one so it might be a better link.

But my problem was with the api-ms-win-crt-multibyte-l1-1-0.dll file missing and I couldn't find it anywhere after installing the redistributable. Ultimately, I copied it from my fman install into the target/project folder for freeze to work.

charlieman avatar Sep 15 '20 19:09 charlieman

Just to chime in, I'm having the same msvcr100.dll problem (on a fresh install of Windows 10), and installing the 2015-2019 package does not seem to help. It ended up putting a bunch of other msvcr*.dll files in c:\Windows\System32\, including one called msvcr100_clr0400.dll, but not msvcr100.dll. Just for fun, I also tried installing the various other packages from that MSDN page (e.g., the MSVC 2012 redistributable packages, etc.) and at the end of the process still didn't have a copy of that DLL anywhere that I could see on %PATH%.

I'm by no means a Windows expert, but is there a particular reason that fbs freeze needs msvcr100.dll? From what I've been reading, it refers to a pretty old version of the MSVC runtime- is it actually needed in this day and age?

stevenbedrick avatar Sep 22 '20 18:09 stevenbedrick

@stevenbedrick you could try to remove the msvcr*.dll lines in your venv/lib/site-packages/fbs/fbs/freeze/windows.py file and see if it still works.

mherrmann avatar Sep 23 '20 04:09 mherrmann

Yup, I actually just commented out the call to _add_missing_dlls() and that seemed to do the trick- the resulting .exe file does run (at least on my Windows VM) and I was able to create an installer from it. No idea if it'll run anywhere else, yet- that's the next test. :-) But thanks!

So I guess my question at this point is what that function is doing, and if it's something that I might actually need at some point. My non-Windows-expert hunch is that perhaps on a naïve computer (i.e., one that doesn't have any of the visual studio stuff installed) I might expect to run into trouble running the resulting .exe, correct, since it doesn't include those DLLs and they presumably wouldn't be present on the system already?

stevenbedrick avatar Sep 23 '20 20:09 stevenbedrick

The DLLs are simply required on some people's systems. But maybe it's just an issue with older Windows 7 versions.

mherrmann avatar Sep 24 '20 07:09 mherrmann

Huh! Well, for now, it seems to be doing the trick, at least for my use case. Thanks so much for the reply and the help, and also for the really useful library! :-D

stevenbedrick avatar Sep 30 '20 17:09 stevenbedrick

I lost my job because of the DLL problem.

AlfredThor avatar Oct 13 '20 08:10 AlfredThor

I know what your talking about here these dlls are hard to find and really should always be included for windows in src/main/resources/windows

I had a few people on super old systems which had issues until i had all of the below files. msvcr110.dll msvcr100.dll api-ms-win-crt-multibyte-l1-1-0.dll

Needed for older cpu and integrated gpus libGLESv2.dll libEGL.dll

Like it makes no sense why you would need ANGLE support but having the libEGL.dll was absolutely the only thing needed for those few edge cases and it has not caused any issues for the newer stuff. https://forum.qt.io/topic/30957/where-is-libegl-dll/5

You should obviously find an official source for these files but in the off chance you cannot i have provided them here.

a few of these i found by grabbing other opensource projects compiled apps installing them and then checking installation path for these files and saving them. windows-dlls.zip

Once you get the winning combination you can then check them into git and as long as there in src/main/resources/windows when you freeze they should always be included.

meramsey avatar Mar 25 '21 12:03 meramsey

I had a few people on super old systems which had issues until i had all of the below files. msvcr110.dll msvcr100.dll api-ms-win-crt-multibyte-l1-1-0.dll

That was my experience as well. That's why fbs adds them to the frozen binary.

I haven't yet had the need for libGLESv2.dll or libEGL.dll. @whattheserver do you think your experience was specific to your app, or would it be applicable to all fbs apps?

mherrmann avatar Mar 26 '21 10:03 mherrmann

I had to dig through my notes but yeah i would say these should probably be in every app's windows version. I think the problem in my case was most apparent due the fact i heavily use QtWebengine and on older systems they may not have good OpenGL rendering or compatible dlls installed and these dlls are not like provided by Microsoft dev stuff or base install.

Qtwebengine and some of the other visual stuff which relies on: QSurfaceFormat

Some context https://github.com/pyinstaller/pyinstaller/issues/4322 https://stackoverflow.com/questions/42810699/failed-to-locate-library-libglesv2-dll

https://www.riverbankcomputing.com/pipermail/pyqt/2020-February/042531.html

Install a driver providing OpenGL 2.0 or higher, or, if this is not
>>>> possible, make sure the ANGLE Open GL ES 2.0 emulation libraries
>>>> (libEGL.dll, libGLESv2.dll and d3dcompiler_*.dll) are available in 
>>>> the
>>>> application executable's directory or in a location listed in PATH.
>>> 
>>> All of those DLLs are included in the wheel.

I spent months jumping through hoops as have others trying to get QTwebengine based apps to compile and work uniformly across both old and new systems which may not have the same OpenGL drivers or graphics cards.

Note that the above is just the Windows side of the fix.


There is also some really weird Linux ones too where if i compiled on old ones things would fail on newer ones due to the libz thing or the linux OpenGL loading the wrong library or being incompatible with the wayland/mesa/nvidia drivers,

OpenGL Some reference links if you feel like wandering that rabbithole lol https://bugs.launchpad.net/ubuntu/+source/qtwebengine-opensource-src/+bug/1857121 https://doc.qt.io/qt-5/qtwebengine-debugging.html https://stackoverflow.com/questions/34969990/kivy-does-not-detect-opengl-2-0 https://github.com/pal1000/save-legacy-intel-graphics https://github.com/qutebrowser/qutebrowser/issues/5490 https://docs.mesa3d.org/vmware-guest.html

the libz thing is also real issue which there was another open issue about i had commented on last year https://github.com/mherrmann/fbs/issues/185

I know its alot of information but these are real common issues with pyinstaller which if accounted for in fbs would make things for newcomers without good debugging and research skills experience alot smoother :)

meramsey avatar Mar 26 '21 12:03 meramsey