Essentially it boils down to Mozilla's redefining relloc() to moz_xrealloc() using #defines. It occurs in gfx/graphite2/src/Collider.cpp when including C++ headers. It should not happen during a normal compile because they are the first things included in the file, but because of unified building something includes code that does the moz_xrealloc redefine.
Because the #define is just changing the function name it tries to call "std::moz_xrealloc()" which does not exist in the std:: namespace.
This is the temporary fix I did to get it to build:
Code: Select all
diff --git a/gfx/graphite2/src/Collider.cpp b/gfx/graphite2/src/Collider.cpp
index 035bb9a..3b57beb 100644
--- a/gfx/graphite2/src/Collider.cpp
+++ b/gfx/graphite2/src/Collider.cpp
@@ -24,6 +24,9 @@ Mozilla Public License (http://mozilla.org/MPL) or the GNU General Public
License, as published by the Free Software Foundation, either version 2
of the License or (at your option) any later version.
*/
+#ifdef realloc
+#undef realloc
+#endif
#include <algorithm>
#include <limits>
#include <cmath>
If this turns out to be a problem with all clang 17 compilers should I remove this file from unified building or try to locate the file(s) defining moz_xrealloc and remove them from the unified build? Or should I just add something ugly like this?