Suppress error about mismatching C++ ABI version
authorOlly Betts <olly@survex.com>
Tue, 8 Sep 2026 15:12:56 +0000 (15:12 +0000)
committerPeter Michael Green <plugwash@raspbian.org>
Tue, 8 Sep 2026 15:12:56 +0000 (15:12 +0000)
Forwarded: not-needed
Last-Update: 2022-07-18

In practice, the differences between recent ABI versions don't seem to be
incompatible since they apparently only affect obscure corner cases.  So
suppress this error so we don't have to rebuild the entire wx world in one
go.

Gbp-Pq: Name warn-for-compiler-abi-mismatch.patch

src/common/appbase.cpp

index 4c30c5fd3de955d8e59340d4fe1c940301f87cbf..31a6408d2bbdc2a74c6598e7b1437faf872b98fe 100644 (file)
@@ -867,6 +867,26 @@ bool wxAppConsoleBase::CheckBuildOptions(const char *optionsSignature,
         wxString prog = wxString::FromAscii(optionsSignature);
         wxString progName = wxString::FromAscii(componentName);
 
+       int l_off = lib.Find("compiler with C++ ABI ");
+       int p_off = prog.Find("compiler with C++ ABI ");
+       if (l_off != wxNOT_FOUND && p_off != wxNOT_FOUND) {
+           int space;
+           space = lib.find(',', l_off + 22);
+           lib.erase(l_off, space - l_off);
+           space = prog.find(',', p_off + 22);
+           prog.erase(p_off, space - p_off);
+           if (lib == prog) {
+               // The only difference is the ABI version, which apparently only
+               // affect obscure cases.  We used to warn here, so at least
+               // there was an indication of what's up if there is a problem
+               // due to ABI incompatibilities, but wxLogWarning() can result
+               // in a pop up dialog with some applications, which is just too
+               // intrusive, so just quietly ignore instead.
+               //wxLogWarning(msg.c_str());
+               return false;
+           }
+       }
+
         wxLogFatalError(wxT("Mismatch between the program and library build versions detected.\nThe library used %s,\nand %s used %s."),
                         lib, progName, prog);