-
Notifications
You must be signed in to change notification settings - Fork 609
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 add new dependencies #4088
base: master
Are you sure you want to change the base?
Conversation
GCC version mismatch? What is the GCC version of the MinGW-w64 cross compiler on Linux? MSYS2 UCRT64 GCC is 14.2.0 |
@eht16 @techee Look at the PKGBUILD of mingw-w64-libtiff: https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-libtiff/PKGBUILD You don't have to resolve the conflicts between the two libstdc++ libraries. You only have to build your own libtiff. This is how I configure it: ./configure --prefix=$HOME/tiff --disable-static --enable-shared --disable-cxx --disable-jbig --disable-lerc --disable-libdeflate --disable-lzma --disable-zstd --disable-webp The resulted $HOME/tiff/libtiff-6.dll is very small. The only dependency is libjpeg-8.dll. Note: I'm using MSYS2 UCRT64. After adding libjpeg-8.dll from MSYS2 UCRT64 and my own libtiff-6.dll, Geany runs just fine. You don't have to go as minimal as me. You only need --disable-lerc, this will enough to get rid of the annoying libstdc++ issue. |
BTW, the issue of SVG images still remains: |
OK, that's one option too. Probably pretty much the same result as building liblerc against the libstdc++ that Geany uses as I suggested in #4094 (comment) and which works as well. |
@chadchoi Anyway, since you got the latest version of Geany running, you should be able to test the LSP plugin by getting the artifact from https://github.com/geany/geany-plugins/actions/runs/12283983695/ and installing geany-plugins from there (no need to install Geany itself, you'd have to fight with the libstdc++ problem again). As far as I can tell, it works, but I didn't use it for real development so I'm interested in any feedback. |
I have your version up and running. We should continue the discussion about it on #4082. |
@techee It turns out that I was right.
MSYS2 UCRT64 GCC is 14.2.0, the latest version of MinGW-w64 cross compiler on Debian is 12.0, see: |
But how does it matter to the actual problem? The discussion in msys2/MINGW-packages#22847 and your various comments are pretty off topic. Do you know how to fix the CI builders and fix the librsvg problem or do you have any insight into the problem? If so, I'm all ears. If not, please reduce the amount of noise around. |
Which noise? This PR is about fixing the problems of missing dlls, isn't it? We are discussing the problem of the mismatch of two versions of libstdc++. It has nothing to do with the malfunctioning of librsvg! |
I think you don't understand what's going on. There are 2 problems:
|
I think it's you that mixing different problems. The problem with librsvg should have its own issue and its own PR. You are reusing this unrelated PR to discussion about it. The discussion about librsvg here is off-topic and you are wrong!
And it's completely unrelated. The issue I posted, #4084, is about missing of dlls caused Geany to fail to run. This PR is supposed to solve that. This means on this PR you only need to care about the missing dlls to have Geany running. The red squares caused by librsvg is completely unrelated and deserves its own issue and its own PR!
Nonsense. The MSYS2 MinGW-w64 are all using POSIX thread model. The mismatch is about different GCC versions, not different thread models! |
Isn't it clear that if Geany uses libraries using msys/mingw then any problems in that are not part of Geany and should be raised at that project, not part of Geany? |
Well, we don't have a separate issue for that so I discussed it here.
You are simply wrong. By default, mingw libstdc++ uses the win32 thread model. @eht16 had to start using the "posix" variant of libstdc++ in 354c7ba because Scintilla started using some features that require it. However, now, Geany also has the libLerc dependency and that library was build against the standard win32 thread libstdc++ so there are mismatches between symbols. For more, see e.g. https://stackoverflow.com/questions/17242516/mingw-w64-threads-posix-vs-win32 @chadchoi I'm ending all discussions with you by this - explaining things over and over to you is tedious and, more importantly, I don't like your behavior. You simply don't know much, based on your github profile you are very new to open source development but behave as if you knew everything best (typical sign of not knowing much). My advice to you is to change your behavior, otherwise you won't be taken seriously anywhere. Or instead of kicking around, start doing something useful and e.g. provide a patch fixing the problems. |
@elextr Good to see you! |
I have unsubscribed. Please don't tag me anymore. Thanks. |
Debian offers the MinGW-w64 cross compiler in both POSIX and Win32 thread model variants, and you chose to use the Win32 variant? Well, this is simple. You simply need to switch to use the POSIX variant of the MinGW-w64 cross compiler, easy peasy. Your wording is wrong. You said I have no idea why you chose the Win32 thread model variant from the beginning. It's very unpopular. No one uses it. Popular MinGW-w64 distros like winlibs.com doesn't even provide Win32 thread model builds. People all use POSIX thread model for maximum compatibility. BTW, Github Actions does provide MSYS2 in their CI. Why don't you simply use that for your Windows builds? Why cross compile from Linux but still need to grab MSYS2 packages to extract for libraries? If you managed to cross compile from Linux, why don't you cross compile everything you need instead of stealing prebuilt libraries from MSYS2 packages? Why do you make everything that complicated? I can't get it. BTW, MSYS2 in CI: https://www.msys2.org/docs/ci/ Note: The |
You got it wrong - it's the other way round - we use the posix variant.
No, once again, we use the posix variant.
If so, libLerc coming from mingw should work out of the box with Geany's posix libstd++, shouldn't it? Instead, I had to recompile it against the posix libstdc++ to make it work. So I assumed that mingw uses the win32 variant by default. Do you have any link to some official msys2 documentation stating that the "posix" variant is default?
Let's repeat the same sentence again: we don't use the win32 variant.
Probably a question for @eht16 (I'm not a maintainer of the Windows build, I don't know much about it. I maintain the macOS port). I assume the build time is lower (see below). Also, we are not Windows developers but Linux developers. The Windows variant in Geany is just a "bonus" and I think anyone here tries to avoid Windows as much as possible.
That's pretty simple - compilation time. We create the Windows installer as part of our CI so every pull request builds the Windows binaries. Imagine how long it would take to cross-compile all the dependencies and we'd probably have to start paying for the CPU time.
Yes.
I don't think there's some general problem with the loaders - the cache-generating binary works all right for all other loaders and there was no problem before for SVG either. But after the October 16 commit I mentioned, this stopped working. What I suspect is going on is this: msys2/MINGW-packages#22880 (comment) i.e. that the actual librsvg library gets statically linked to the loader. That explains the huge binary size and also the sudden So I'd like to learn why such a change was made and whether it was intentional. On linux (and macOS too) loaders are small libraries that don't contain the actual library code so this is definitely not a standard way to create them. |
It really seems to be the case: But the libstdc++ coming from the debian cross compiler differs from the libstdc++ coming from mingw. Not really sure what's going on. In any case we will probably have to compile libLerc by ourselves unless someone has a better solution. |
So Github user @chadchoi was right. They said it's not thread models mismatch but libstdc++ versions mismatch. As I know, you can't upgrade your cross compiler because Debian is Debian, they never provide up-to-date packages. Building your own libLerc with your cross compiler is the only solution. |
Please keep in mind that the pixbuf loader for SVG is developed by librsvg and not the gdk-pixbuf project. This is the reason why it looks odd compared to other pixbuf loaders. librsvg is written in Rust. This is what happens when you introduce Rust into a C project. The binary generated by Rust tends to boom in size. This is normal. I don't think librsvg was linked statically into the loader as you have guessed. |
I was apparently wrong in this case, sorry.
That's clear (I already had my share of issues with this particular library and the macOS port). But there are 2 libraries - the actual librsvg library and the loader which is just a very thin library. I haven't checked in what language the loader is written but on my Debian linux it looks this way - pretty much like all the rest:
But of course it's hard to compare, maybe on Windows there's some extra boilerplate code that has to be added. After checking msys2/MINGW-packages@a2aaa55#diff-0db33fcf01a542992efe526a1612edefac816309632a06fc2b7348ce2ae5b66c and subsequent commits in more detail, they switch from autotools to meson and there may be so many things that meson does differently that there's probably no easy way to figure out, what it is. So while hacky, updating the cache manually will probably be the only option for now. |
And add ".exe" suffix to "glib-compile-schemas" call as newer Wine versions require the extension.
This reverts commit 354c7ba. After upgrading the Docker base image to Debian Trixie and so using newer cross compiler toolchain versions, this hack might not be necessary any longer.
Oh, what a fun. I'll try to answer the questions raised in the various issues: Why not using the native MSYS2 Github actions?At the time of creating the current setup, the MSYS2 Github action didn't exist yet or at least I wasn't aware of it. Additionally, we would rely even more on the Github infrastructure. This might be ok but should be considered at least. Why do you use "mingw64" and not "ucrt"?Because we always built with mingw64, I think even before "ucrt" existed. Why do you use the "posix" variant of the toolchain and not "win32"?See my (not so :D) famous change in 110c7b4 when we had trouble with newer C++ features used in Scintilla but not support by the "win32" variant. The SVG red squares issueI updated the Docker base image used for the cross compilation to Debian Trixie (this is not yet officially released, it's the Debian Testing version) as it offers newer Wine and mingw64 toolchain versions. If we want to go this way, this might be an alternative to manually updating the cache file. To test this, I created (and merged to get a new Docker base image) geany/infrastructure#12 and updated this PR with the necessary changes (576540c). The Lerc and stdc++ incompatibilityAs said above, it might be the necessity for the "posix" version of the stdc++ library is gone and we can use the default variant. Unfortunately, I cannot test these changes on Windows. Even only the first change (update of the base image) crashes on startup with the following error: I'm not sure if this happens because of the change or because of my old Windows 7 machine which might be finally too old for recent builds. This would be ok if it works on newer systems.
I hope I didn't miss to address any important question. Otherwise, just ask. |
Yeah, in the future I'm leaving this to our official Windows expert - you :-)
I'd say we want to go this way because this really fixes all of our issues - not only SVG (which works now), but the libstdc++ problem as well, see below.
Would probably be good.
Victory! Both of the builds work on my machine! So yeah, the libLerc (and previous "win32 vs posix" Geany issue) were probably just caused by old libstdc++ libraries used by the cross compiler. Since both of the versions work, I think it would be better to use the second version (i.e. without the copy of the posix libstdc++ from the cross-compiler).
Just wondering, have you tried https://reactos.org ? I haven't but if you manage to get it running, it might offer a more usable environment than the old Windows 7. |
Fine, still a little hacky as Debian Trixie is not yet released but better than our existing and maybe coming workarounds :).
Will do tomorrow.
Yeah, finally :).
In #4094, you added even more dependencies. Those are not necessary now?
I did, maybe two years ago. At that time, the installer didn't start or something like that. But I'll give it another chance, good idea. The good thing is, I can finally burn down that Windows 7 VM. The only reason for its existance is gone :). |
I don't remember what I was doing or trying to do :-). These should be enough. Maybe one dependency you might consider is
The bad thing is that I would become the only guy around with working Windows, making me "the official Windows tester" ;-) |
To save you some time, I just tried it but the default build is 32bit only and doesn't even allow starting the msys2 installer. There seems to be a 64bit nightly version at https://iso.reactos.org/livecd/ which I haven't tried but I think 64bit is still experimental and possibly not stable. |
Newer Wine versions require the extension. Relates to geany/geany#4088 and geany/infrastructure#12.
Done in geany/geany-plugins#1399.
Alright, I just added it. But as you know, I can't test it :).
I don't think so. I think I will finally look for a new Windows maintainer. And until one is found or even if not, the quality of the Windows releases might decrease. IMO this is OK as there are probably more users on the other platforms and maintaining the Windows build isn't that easy due to the nature of this system.
Ha, noticed the same two hours ago :). On a side note, in theory we could generate the installer as a 64bit exectuable. Though I didn't find yet a way to also make the included uninstaller 64bit. |
Hmm, I don't see any difference so it can probably be dropped. I think it's because of the Adwaita icon theme which doesn't provide many mime type icons (the theme I use on macOS has many more mime type icons https://github.com/geany/geany-osx/tree/master/Papirus/16x16/mimetypes) |
I don't think there will be crowds of people wanting to do that ;-)
I believe there aren't any major problems though - or any new problems at least. Those various things like problems with file encodings have probably always been there and some things are probably GTK related and nothing we can fix in Geany. So I think the main issue is to have CI running and being able to make releases (which you could also do using CI or a local docker image if you don't have access to a real Windows machine - I can survive testing the result from time to time ;-) |
Ok. I think we could still keep it in, maybe it gives other advantages as well.
Don't destroy all my hopes to get out of the Windows hell :)
Actually, right now we have to make releases from the CI as I cannot build natively on Windows anymore. And I got it almost running already, will PR it soonish. |
ReactOS is a toy. Please don't consider it as something serious. |
Closes #4084.