-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Windows 10 x64 issue with Fiddle and libui #32
Comments
Hi!
I thought I might have forgotten to include the dll in the gem in the 0.0.10 release, but when I unzipped the gem file (actually a zip file), the dll file was included. Then I removed existing libui gem and installed the libui gem from the remote rubygem server on Windows, and it worked. So it is not that I forgot to put in the dll. And I see some of your glimmer-dsl-libui examples worked on Windows. |
Thanks for confirming that it works on Windows. Something must be wrong with my Windows setup (I installed it on my Mac via VirtualBox). It is Windows 10 Pro (OS Built 19043.1237). I will keep digging. Perhaps, I will try with a real Windows PC too once I get ahold of one over the weekend. |
But I don't know what's wrong with your libui installation. |
I tested this on my windows 10 laptop, via the ruby one click installer, in a cmd.exe shell. I could install libui 0.0.10 just fine; the examples also work (I noticed that I broke one of I have not tested it in msys2/mingw. However had, that error actually seems familiar I do not know how your error can be solved, but I think that error may not happen always. What I can, however had, say is that libui 0.0.10 works on my win10 laptop. One main reason So I think this issue is most likely more pertaining to something in the setup and msys2/mingw. |
I haven't had a chance to try a real Windows PC, but I uninstalled Ruby and tried to reinstall without msys as version 3.0.2, 2.7.4, 2.6.8 to no avail. Loading libui always resulted in that Fiddle error claiming the dll is not there when in fact it is there. My Windows 10 installation in VirtualBox is definitely x64. Here are the specs; Device name DESKTOP-OG3UV1I And, my Ruby definitely is x64 too. For example, here is what the 2.6 version says when I run
I will see if I get a chance in the near future to try on a real Windows PC instead of VirtualBox on the Mac. But, at least the specs above might give you a way to reproduce the problem by downloading the same exact version of Windows 10 from Microsoft and running on VirtualBox on the Mac. |
OK, I finally got a chance to try in a real Windows PC, and it worked, but I discovered many issues with Glimmer DSL for LibUI and its examples on Windows, which need to be fixed. |
Hi I am using Windows 10 (64-bit) on Ubuntu,
installed Ruby 3.0.2 (64-bit) with RubyInstaller, and updated pacman and all gem packages to the latest as of 2021-10-12.
glimmer-dsl- libui works. Please see the screenshot. (Indeed, as you said, some of the samples don't seem to work as expected. However, there was no error that the dll was not found. |
I fixed most of the Windows issues in Glimmer DSL for LibUI v0.2.13 except a few that seemed caused by libui, which I reported under API Gotchas Since this GitHub issue does not happen outside of VirtualBox running on a X64 Mac, I will close for now, but it could be reopened in the future if someone else encounters it (especially if under other circumstances). That said, please keep in mind that Windows 11 was recently released as well as Mac ARM (Aarch64) and Linux Aarch64. I wonder how LibUI will fare in these new environments. |
I see. |
My machine is not Mac ARM (Aarch64). It is an old MacBook Pro 2015 x64, so that is not my issue for sure. I only mentioned that as a side-note to keep in mind for the future of LibUI. I heard all Mac ARM (Aarch64) have a backwards compatibility layer to continue to work with x86-64 software, but it would be interesting if libui (C library) would support ARM directly in the future like you said. |
I read it wrong. Sorry. |
Good news! I got examples/basic_transform.rb working in Windows just like Mac and Linux. It turned out to be an ordering issue for transforms on Windows (if you put skew and translate after rotate and scale, it ends up looking just like on Mac and Linux) Thankfully, I got everything fixed on Windows (except for minor gotchas that I noted). |
Great! |
I ran into that issue too just today after I reinstalled my win10 laptop. Very strange. I'll try the manual way in a moment. |
@rubyFeedback |
Heya kojix2, I think I may be able to add some info actually. So my laptop has some issue ... I think this is not directly related to windows per se, but something to do with the chipset. Anyway, I actually noticed that I used a Windows Home installation. So, on that laptop I installed Fedora, which works fine. And on my second desktop machine I now have installed Windows Pro (or Enterprise, but either way NOT the home version). And on that same machine (running an Intel chipset, and NOT Windows Home), I just tested libui + fiddle, and on a first installation it works. \o/ No problem on that computer. I can not say whether this has something to do with Microsoft Home windows (perhaps some dll is missing or different there), or whether it has to do with the chipset in use, but I wanted to just give that feedback here in the event that someone else runs into such an error. So the two parts I would recommend others to look out for is: (a) Home version versus pro/enterprise windows AND (b) chipset in use (I think some chipsets cause more issues, just as my lenovo laptop shows. I never have these issues on my desktop computers ... one of them I bought just recently and no issue there either, but the old chipset from 2014 had issues; booting sometimes stopped for no reason at all. I don't know whether this may impact fiddle or not, but perhaps the information may be useful for someone in the future) |
@rubyFeedback I will reopen this issue. To:all |
@kojix2 I tried your suggestion to run binary C libui examples in the Windows environment that I had trouble with in the past (Windows 10 Pro x64 running in VirtualBox on top of Mac Catalina x64 or Big Sur x64) [Windows 10 on a real machine had no issues] The examples ran successfully. I was able to run histogram and control gallery from these groups:
This must be a Ruby issue then? |
Thanks @AndyObtiva Then it might be a Ruby problem. At least, we might be able to do something about it.
He also said that dll problems can be investigated with Dependency, but I am not familiar with this. I know you are busy, but you could check it out if you would like to. |
My mind is blown!!! I ran Dependencies (https://github.com/lucasg/Dependencies/releases/download/v1.11.1/Dependencies_x64_Release_.without.peview.exe.zip), loaded libui.dll with it, and it said it loaded fine: Next, I tried running glimmer-dsl-libui meta-example, and IT WORKED!!! I don't know how! I am worried that Dependencies might have brought over the dlls that are missing (if any)! I don't know. Oh well! So much for this issue. If I encounter on another machine or virtual machine, I will report again. But, there might be another reason. I've installed .NET Framework 3.5.1 and WiX Toolset at one point. I wonder if that helped though I might have done so before I initially tested LibUI. At least, I've resolved the issue on VirtualBox for the first time though. That is very good news! |
Hi, i got a solution for my Issue #48 - maybe this fix also this Error: |
This issue is closed because it was confirmed that there is a case of missing dlls when libui does not work on Windows. However, there may still be other people who cannot get libui to work on Windows. If so, please create a new issue as this is a different issue. |
One thing I neglected to mention originally was that I also installed something called the WiX Toolset (I added to my previous comment), which enables building Windows installers for applications. It might have as well brought the Visual C++ Redistributable with it. I wouldn’t be surprised if it did. That said, to be honest, I don’t think this issue is resolved if it is confirmed that dll’s are sometimes missing. After all, the fix expects developers to install a developer toolkit (the VC++ redistributable). That means, they cannot just install the LibUI Ruby gem and expect it to work (one of the strongest selling points of LibUI). Also, the issue is a bit unpredictable since it seems LibUI does work out of the box on some Windows systems of non-developers. I think more attention needs to be spent on ensuring the LibUI Ruby gem works out of the box on Windows. For example, by trying to include more binaries for Windows just in case they are missing. Keep in mind that Ruby developers use a dynamic programming language because they seek convenience above all else. They usually don’t care about memory and speed so much as long as they are reasonably within the limits of their machine. The developers who care so much about things other than convenience don’t use Ruby to begin with. They just resort to C, C++, Objective C, Swift, Java or Crystal instead. But when using Ruby, it is for tasks that are not too memory, disk, or performance sensitive. And, that constitutes more than 80% of software engineer business tasks these days. That’s why Rails is so successful despite obviously not being as optimal as using Java or C++ in performance. Anyways, in summary, it is very important to keep convenience as one of the top goals in any Ruby library. Thank you for keeping LibUI alive and as convenient as it is for use. I look forward to continued attention to supporting productivity with it. |
I can think of a solution in two directions. (1) To raise an error when Fiddle detects a missing DLL and display it in LibUI to prompt the user to install Visual C++ Redistributable. However, according to kou, Fiddle is unable to detect missing DLLs due to Windows limitations. Therefore, this method is not possible at the moment. But there may be a way we don't know of. (2) To include frequently missing libraries in gem. This is also an issue of the C libui and depends on what the future release of libui-ng will be. There might be a way to use a custom libui.dll with Ruby's LibUI, but I don't want to do that because it would be too complicated for me I totally agree with you about the culture of Ruby and the benefits of the ecosystem. It certainly feels that way. |
I reported it to Upstream... |
I tried libui on Windows 10 x64 after installing Ruby 3.0.2 x64 via Ruby Windows Installer (and running
gem install glimmer-dsl-libui
to install gem + dependencies) and I keep getting this error upon loading libui:I double checked the dll file path and the dll file does exist.
I installed both the Ruby MSYS and MING toolchains by the way. I did see an odd error in the beginning:
I am not sure if they are related at all.
Do you have any idea what is going on?
The text was updated successfully, but these errors were encountered: