This is an attempt to fix #4084 by adding some extra dependencies to #4088.
Notably, `libtiff`
https://packages.msys2.org/packages/mingw-w64-x86_64-libtiff
also depends on `jbigkit, libwebp` and `zstd`. In addition, `libwebp`
https://packages.msys2.org/packages/mingw-w64-x86_64-libwebp
has an additional dependency on `giflib`.
I'll try the resulting artifact and update this PR if any extra dependencies are still needed. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/4094
-- Commit Summary --
* Windows: Add new dependencies to GTK bundle * Windows: Include gspawn-win64-helper*.exe binaries into GTK bundle * Add some more dependencies
-- File Changes --
M scripts/gtk-bundle-from-msys2.sh (10)
-- Patch Links --
https://github.com/geany/geany/pull/4094.patch https://github.com/geany/geany/pull/4094.diff
No more dependency problems but I still get
<img width="444" alt="Screenshot 2024-12-02 at 23 33 36" src="https://github.com/user-attachments/assets/348b15e7-aba8-4049-977d-f2e6faa83054">
From some stackoverflow pages, it seems like some libstdc++ symbol that is missing. But libstdc++ is installed.
@eht16 Just wondering, doesn't the Windows CI get libstdc++ from somewhere else? In the image below, you can see libstdc++ as installed from the artifact of this PR and below is what is inside msys.
<img width="754" alt="Screenshot 2024-12-04 at 14 02 43" src="https://github.com/user-attachments/assets/6d97e1a2-96df-445e-a7bc-08e80a5b7799">
They have different sizes. When I try to replace the version in Program Files with the msys one, I get
<img width="432" alt="Screenshot 2024-12-04 at 14 05 55" src="https://github.com/user-attachments/assets/0b116b58-c331-4e8f-b487-2848ecf75127">
To me it seems that msys is built against one version of libstdc++ and Geany uses some other from somewhere else.
@techee pushed 1 commit.
110c7b492e8595851131eeb5c381418799e8ae34 Revert "CI: Copy used C++ runtime library into the GTK bundle"
To me it seems that msys is built against one version of libstdc++ and Geany uses some other from somewhere else.
Exactly this happens because of
https://github.com/geany/geany/pull/4094/commits/110c7b492e8595851131eeb5c38...
I think it would be best if Geany was compiled against the msys version of libstdc++ if possible so both the dependencies and geany are linked against the same library.
@techee pushed 1 commit.
b316d932f9ca33557a4c13bd6d743eb4c97c018e Set LD_LIBRARY_PATH to msys libraries before system libraries
@techee pushed 1 commit.
5baef11edc4b5815171ae0f270a3f04abc80e173 Build libLerc.dll with the system libstdc++ and use it instead of the msys version
@techee pushed 1 commit.
7394d9e94cb4bdbcc7d7136c221048fb75450bc5 Use libLerc compiled against the same libstdc++ as Geany
@techee pushed 0 commits.
OK, one thing that works is to build libLerc
https://github.com/Esri/lerc/tree/master
(which is the one throwing the error) manually and link the official msys libstdc++ statically to it and ship this library in the Geany installer instead of the msys one. I tried this manually without modifying the build scripts and Geany launches. So if there's not a better way, this could be one way forward.
But I see red squares instead of some UI elements - this used to happen because of missing librsvg because these are SVG images but librsvg seems to be present.
<img width="670" alt="Screenshot 2024-12-07 at 11 32 03" src="https://github.com/user-attachments/assets/450d9537-355a-42d5-aa63-98bf3217016a">
There's this error message when bundling - possibly just missing some more dependencies for librsvg: ``` 002a:err:module:import_dll Library bcryptprimitives.dll (which is needed by L"Z:\build\gtk-bundle\bin\librsvg-2-2.dll") not found 002a:err:module:import_dll Library librsvg-2-2.dll (which is needed by L"Z:\build\gtk-bundle\lib\gdk-pixbuf-2.0\2.10.0\loaders\pixbufloader_svg.dll") not found 002a:err:module:import_dll Library bcryptprimitives.dll (which is needed by L"Z:\build\gtk-bundle\lib\gdk-pixbuf-2.0\2.10.0\loaders\pixbufloader_svg.dll") not found g_module_open() failed for Z:\build\gtk-bundle\lib\gdk-pixbuf-2.0\2.10.0\loaders\pixbufloader_svg.dll: 'Z:\build\gtk-bundle\lib\gdk-pixbuf-2.0\2.10.0\loaders\pixbufloader_svg.dll': Module not found. ```
OK, one thing that works is to build libLerc
https://github.com/Esri/lerc/tree/master
(which is the one throwing the error) manually and link the official msys libstdc++ statically to it and ship this library in the Geany installer instead of the msys one. I tried this manually without modifying the build scripts and Geany launches. So if there's not a better way, this could be one way forward.
Just to clarify my confusion: using the original libstdc++ (https://github.com/geany/geany/commit/110c7b492e8595851131eeb5c381418799e8ae...) the Lerc error still persisted? Even if and the rest still works, I'm happy to remove this hack. Maybe the toolchain changed since I added it a year ago.
I'm wondering why I don't see these errors, I think the only difference is that I'm on oldish Windows 7.
Regarding librsvg: I see the red boxes as well, not sure why. librsvg is included and at least its direct dependencies as well. I'll try to have a deeper look but this might take some days.
Just to clarify my confusion: using the original libstdc++ (https://github.com/geany/geany/commit/110c7b492e8595851131eeb5c381418799e8ae...) the Lerc error still persisted?
No, it was gone, but instead I got the error in libgeany as described in https://github.com/geany/geany/pull/4094#issuecomment-2517303194
Even if and the rest still works, I'm happy to remove this hack. Maybe the toolchain changed since I added it a year ago.
I'm afraid that depending on which libstdc++ version you use, you either get the libgeany error or the libLerc error.
So what I did is that I compiled libLerc myself, statically linking the msys libstdc++ with which it works, so even when Geany is distributed with the other libstdc++, libLerc doesn't need it at the runtime. It would be possible to perform this as part of the CI build if there's no other way to get Geany running (it's just a few files to compile so not much more extra time, it just needs `cmake` and for static linking I used something like ` CXXFLAGS="-static-libstdc++" cmake ..`).
Just wondering, what is this "posix" libstdc++ version? Is it something that is provided officially by the msys project? If so, we could maybe report the problem there. I also noticed that the libLerc msys binary
https://packages.msys2.org/packages/mingw-w64-x86_64-lerc
was built more than 2 years ago and maybe rebuilding it against the current msys libstdc++ will fix the problem.
I'm wondering why I don't see these errors, I think the only difference is that I'm on oldish Windows 7.
No idea :-/
Closed #4094.
@eht16 I'm closing this PR in favor of #4088 as I don't plan to work on this myself (I just needed some working build so I could test the LSP plugin). You can grab the extra dependencies from the patch from this PR.
Reopened #4094.
@techee pushed 1 commit.
4058b40ae6245fa312618b74330af2344a4f270e Also link Geany binary statically against libstdc++
@techee pushed 1 commit.
a2715f69369917427eb185172ac5c2a6f8da59cb Add LDFLAGS=-static-libstdc++ to configure
@techee pushed 1 commit.
dd104b2e67c4ee35add9c84b6da61029f564259c Desperate attempt to link libstdc++ during install
Closed #4094.
github-comments@lists.geany.org