Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package FreeFileSync for openSUSE:Factory 
checked in at 2026-06-02 16:08:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/FreeFileSync (Old)
 and      /work/SRC/openSUSE:Factory/.FreeFileSync.new.1937 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "FreeFileSync"

Tue Jun  2 16:08:26 2026 rev:32 rq:1356621 version:14.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/FreeFileSync/FreeFileSync.changes        
2026-03-30 18:36:03.446993808 +0200
+++ /work/SRC/openSUSE:Factory/.FreeFileSync.new.1937/FreeFileSync.changes      
2026-06-02 16:10:08.869374876 +0200
@@ -1,0 +2,8 @@
+Mon Jun  1 07:45:52 UTC 2026 - [email protected]
+
+- Add glib2-2.78-free_size-Fix-build-when-g_free-macro-is-defined.patch
+  * Based on https://freefilesync.org/forum/viewtopic.php?t=13050#p50762
+  * Fixes build on Factory/TW
+- Use gcc15 for Leap 16
+
+-------------------------------------------------------------------

New:
----
  glib2-2.78-free_size-Fix-build-when-g_free-macro-is-defined.patch

----------(New B)----------
  New:
- Add glib2-2.78-free_size-Fix-build-when-g_free-macro-is-defined.patch
  * Based on https://freefilesync.org/forum/viewtopic.php?t=13050#p50762
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ FreeFileSync.spec ++++++
--- /var/tmp/diff_new_pack.40yXI7/_old  2026-06-02 16:10:11.937501284 +0200
+++ /var/tmp/diff_new_pack.40yXI7/_new  2026-06-02 16:10:11.941501449 +0200
@@ -16,8 +16,8 @@
 #
 
 
-%if 0%{?suse_version} && 0%{?suse_version} < 1590
-%global force_gcc_version 12
+%if 0%{?suse_version} && 0%{?suse_version} < 1699
+%global force_gcc_version 15
 %endif
 
 Name:           FreeFileSync
@@ -37,13 +37,15 @@
 Patch1:         FreeFileSync-disable-in-app-updates.patch
 Patch2:         FreeFileSync-remove_ifdef_exceptions.patch
 Patch3:         FreeFileSync-gui.patch
+# PATCH-FIX-UPSTREAM 
glib2-2.78-free_size-Fix-build-when-g_free-macro-is-defined.patch -- based on 
https://freefilesync.org/forum/viewtopic.php?t=13050#p50762
+Patch4:         
glib2-2.78-free_size-Fix-build-when-g_free-macro-is-defined.patch
 BuildRequires:  boost-devel >= 1.54
-BuildRequires:  gcc%{?force_gcc_version}-c++ >= 12
+BuildRequires:  gcc%{?force_gcc_version}-c++ >= 15
 BuildRequires:  libcurl-devel
 BuildRequires:  libopenssl-devel
 BuildRequires:  libssh2-devel
 BuildRequires:  libstdc++6 >= 10.0.0
-BuildRequires:  libstdc++6 >= 12
+BuildRequires:  libstdc++6 >= 15
 BuildRequires:  unzip
 BuildRequires:  update-desktop-files
 BuildRequires:  wxGTK3-3_2-devel >= 3.2.0




++++++ glib2-2.78-free_size-Fix-build-when-g_free-macro-is-defined.patch ++++++
From: Fab Stz <[email protected]>
Date: Wed, 6 May 2026 10:40:28 +0200
Subject: Fix build when g_free macro is defined

In the build of glib-2.0 2.88.0-1, we have
- Checking for function "free_sized" : NO [on Debian] 
https://buildd.debian.org/status/fetch.php?pkg=glib2.0&arch=amd64&ver=2.88.0-1&stamp=1773702037&raw=0
- Checking for function "free_sized" : YES [on Ubuntu Resolute] 
https://launchpadlibrarian.net/852312891/buildlog_ubuntu-resolute-amd64.glib2.0_2.88.0-1_BUILDING.txt.gz

This directly impacts glib "/usr/include/glib-2.0/glib/gmem.h" at this point. 
Glib apparently "overrides" it's g_free function by this macro.

    #if G_GNUC_CHECK_VERSION (4, 1) && GLIB_VERSION_MAX_ALLOWED >= 
GLIB_VERSION_2_78 && defined(G_HAVE_FREE_SIZED)
    
    #define g_free(mem)                                                         
   \
      (__builtin_object_size ((mem), 0) != ((size_t) - 1)) ?                    
   \
        g_free_sized (mem, __builtin_object_size ((mem), 0)) : (g_free) (mem)
    
    #endif /* G_GNUC_CHECK_VERSION (4, 1) && && GLIB_VERSION_MAX_ALLOWED >= 
GLIB_VERSION_2_78 && defined(G_HAVE_FREE_SIZED) */
      
>From what I understand, g_free is defined as a macro when Glib2 version >= 
>2.78 & free_sized is available. This is the case in Ubuntu but not on Debian.

So on Ubuntu resolute the preprocessor will produce this incorrect syntax.

    [[maybe_unused]] auto scopeGuard167 = 
zen::makeGuard<zen::ScopeGuardRunMode::onExit >([&]{ ::(__builtin_object_size 
((contentType), 0) != ((size_t) - 1)) ? g_free_sized (contentType, 
__builtin_object_size ((contentType), 0)) : (g_free) (contentType); });;

I think the scope resolution operator "::" doesn't make sense in that case and 
is the cause of the error.
It is correct to use it though when g_free isn't defined as a macro in glib.

Origin: self
Forwarded: https://freefilesync.org/forum/viewtopic.php?p=50762#p50762
---
 FreeFileSync/Source/afs/ftp.cpp          | 8 ++++++++
 FreeFileSync/Source/base/icon_loader.cpp | 4 ++++
 zen/zstring.cpp                          | 4 ++++
 3 files changed, 16 insertions(+)

diff --git a/FreeFileSync/Source/afs/ftp.cpp b/FreeFileSync/Source/afs/ftp.cpp
index 5bfbc11..28c848d 100644
--- a/FreeFileSync/Source/afs/ftp.cpp
+++ b/FreeFileSync/Source/afs/ftp.cpp
@@ -121,7 +121,11 @@ Zstring ansiToUtfEncoding(const std::string_view& str) 
//throw SysError
                                 &error);       //GError** error
     if (!utfStr)
         throw SysError(formatGlibError("g_convert(" + std::string(str) + ", 
LATIN1 -> UTF-8)", error));
+#ifdef g_free
+    ZEN_ON_SCOPE_EXIT(g_free(utfStr));
+#else
     ZEN_ON_SCOPE_EXIT(::g_free(utfStr));
+#endif
 
     return {utfStr, bytesWritten};
 
@@ -150,7 +154,11 @@ std::string utfToAnsiEncoding(const Zstring& str) //throw 
SysError
                                  &error);         //GError** error
     if (!ansiStr)
         throw SysError(formatGlibError("g_convert(" + 
utfTo<std::string>(strNorm) + ", UTF-8 -> LATIN1)", error));
+#ifdef g_free
+    ZEN_ON_SCOPE_EXIT(g_free(ansiStr));
+#else
     ZEN_ON_SCOPE_EXIT(::g_free(ansiStr));
+#endif
 
     return {ansiStr, bytesWritten};
 
diff --git a/FreeFileSync/Source/base/icon_loader.cpp 
b/FreeFileSync/Source/base/icon_loader.cpp
index e8f813d..abf09fc 100644
--- a/FreeFileSync/Source/base/icon_loader.cpp
+++ b/FreeFileSync/Source/base/icon_loader.cpp
@@ -164,7 +164,11 @@ FileIconHolder fff::getIconByTemplatePath(const Zstring& 
templatePath, int maxSi
                                                       nullptr);             
//gboolean* result_uncertain
     if (!contentType)
         throw SysError(formatSystemError("g_content_type_guess(" + 
copyStringTo<std::string>(templatePath) + ')', L"", L"Unknown content type."));
+#ifdef g_free
+    ZEN_ON_SCOPE_EXIT(g_free(contentType));
+#else
     ZEN_ON_SCOPE_EXIT(::g_free(contentType));
+#endif
 
     GIcon* const fileIcon = ::g_content_type_get_icon(contentType);
     if (!fileIcon)
diff --git a/zen/zstring.cpp b/zen/zstring.cpp
index 488fd44..529f823 100644
--- a/zen/zstring.cpp
+++ b/zen/zstring.cpp
@@ -25,7 +25,11 @@ Zstring getUnicodeNormalForm_NonAsciiValidUtf(const Zstring& 
str, UnicodeNormalF
         gchar* strNorm = ::g_utf8_normalize(str.c_str(), str.length(), form == 
UnicodeNormalForm::nfc ? G_NORMALIZE_NFC : G_NORMALIZE_NFD);
         if (!strNorm)
             throw SysError(formatSystemError("g_utf8_normalize", L"", 
L"Conversion failed."));
+#ifdef g_free
+        ZEN_ON_SCOPE_EXIT(g_free(strNorm));
+#else
         ZEN_ON_SCOPE_EXIT(::g_free(strNorm));
+#endif
 
         const std::string_view strNormView(strNorm, strLength(strNorm));
 

Reply via email to