Mageia Bugzilla – Attachment 14097 Details for
Bug 31905
When starting FreeFileSync and choosing "compare" FreeFileSync exits
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
2nd patch : ffs_icon_loader.patch
ffs_icon_loader.patch (text/x-rpm-spec), 2.02 KB, created by
Philippe Didier
on 2023-10-26 17:30:46 CEST
(
hide
)
Description:
2nd patch : ffs_icon_loader.patch
Filename:
MIME Type:
Creator:
Philippe Didier
Created:
2023-10-26 17:30:46 CEST
Size:
2.02 KB
patch
obsolete
>Summary: Solve libglib2.0 problem in sketchy manner >Date: 2022-05-24 >Version: 11.21 >Author: bgstack15 >Message: >Warning! I have absolutely no idea what I am doing. Check https://freefilesync.org/forum/viewtopic.php?t=8780 for future developments. >In Devuan Ceres, starting in 2021-08 with libglib2.0-0=2.68.3-2 the file icon_loader.cpp fails to compile. By removing the static_cast, this file can compile. The built application throws all sorts of GLib-GObject-CRITICIAL messages but the application operates. >Downgrade to "deb [check-valid-until=no] https://snapshot.debian.org/archive/debian/20210801T144205Z/ unstable main non-free contrib" in /etc/apt/sources.list and install the exact libglib version necessary to compile without this patch. >$ sudo apt-get -V install libglib2.0-0=2.66.8-1 libglib2.0-bin=2.66.8-1 libglib2.0-data=2.66.8-1 libglib2.0-dev=2.66.8-1 libglib2.0-dev-bin=2.66.8-1 libglib2.0-0:i386=2.66.8-1 >Zenju tried addressing this for me, but it still does not compile, even with g++-12. So I still have to omit this macro call. > >UPDATE by Fab Stz on 2022-08-08: >Preprocessor output for `::g_object_ref(gicon); ` is: > ::((typename std::remove_reference<decltype (gicon)>::type) (g_object_ref) (gicon)); >Since commit https://gitlab.gnome.org/GNOME/glib/-/commit/5b2bee3f539056b42c802608f9f00cc9ddd64b79 >that is shipped starting from 2.67.0, the macro g_object_ref changed and is >also defined when __cplusplus is defined in some circumstances. > >Removing the scope resolution operator `::` permits the code to build. >There remains to check whether this is the correct fix. > >--- a/FreeFileSync/Source/base/icon_loader.cpp >+++ b/FreeFileSync/Source/base/icon_loader.cpp >@@ -227,7 +227,11 @@ > //the remaining icon types won't block! > assert(GDK_IS_PIXBUF(gicon) || G_IS_THEMED_ICON(gicon) || G_IS_EMBLEMED_ICON(gicon)); > >+#if (GLIB_CHECK_VERSION (2, 67, 0)) >+ g_object_ref(gicon); //pass ownership >+#else > ::g_object_ref(gicon); //pass ownership >+#endif > return FileIconHolder(gicon, maxSize); // > > }
Summary: Solve libglib2.0 problem in sketchy manner Date: 2022-05-24 Version: 11.21 Author: bgstack15 Message: Warning! I have absolutely no idea what I am doing. Check https://freefilesync.org/forum/viewtopic.php?t=8780 for future developments. In Devuan Ceres, starting in 2021-08 with libglib2.0-0=2.68.3-2 the file icon_loader.cpp fails to compile. By removing the static_cast, this file can compile. The built application throws all sorts of GLib-GObject-CRITICIAL messages but the application operates. Downgrade to "deb [check-valid-until=no] https://snapshot.debian.org/archive/debian/20210801T144205Z/ unstable main non-free contrib" in /etc/apt/sources.list and install the exact libglib version necessary to compile without this patch. $ sudo apt-get -V install libglib2.0-0=2.66.8-1 libglib2.0-bin=2.66.8-1 libglib2.0-data=2.66.8-1 libglib2.0-dev=2.66.8-1 libglib2.0-dev-bin=2.66.8-1 libglib2.0-0:i386=2.66.8-1 Zenju tried addressing this for me, but it still does not compile, even with g++-12. So I still have to omit this macro call. UPDATE by Fab Stz on 2022-08-08: Preprocessor output for `::g_object_ref(gicon); ` is: ::((typename std::remove_reference<decltype (gicon)>::type) (g_object_ref) (gicon)); Since commit https://gitlab.gnome.org/GNOME/glib/-/commit/5b2bee3f539056b42c802608f9f00cc9ddd64b79 that is shipped starting from 2.67.0, the macro g_object_ref changed and is also defined when __cplusplus is defined in some circumstances. Removing the scope resolution operator `::` permits the code to build. There remains to check whether this is the correct fix. --- a/FreeFileSync/Source/base/icon_loader.cpp +++ b/FreeFileSync/Source/base/icon_loader.cpp @@ -227,7 +227,11 @@ //the remaining icon types won't block! assert(GDK_IS_PIXBUF(gicon) || G_IS_THEMED_ICON(gicon) || G_IS_EMBLEMED_ICON(gicon)); +#if (GLIB_CHECK_VERSION (2, 67, 0)) + g_object_ref(gicon); //pass ownership +#else ::g_object_ref(gicon); //pass ownership +#endif return FileIconHolder(gicon, maxSize); // }
View Attachment As Raw
Actions:
View
Attachments on
bug 31905
:
14080
|
14094
|
14095
|
14096
| 14097 |
14098
|
14099
|
14100
|
14101
|
14102
|
14103
|
14104
|
14105