> When building Firebird 3.0 as part of LibreOffice (on Linux), it > occasionally happens that the build fails with > > ... > > rm -f ../../gen/examples/employee.fdb > > ./empbuild ../../gen/examples/employee.fdb > > creating database ../../gen/examples/employee.fdb > > Turning forced writes off > > Couldn't turn forced writes off (139) > > Makefile.examples:125: recipe for target '../../gen/examples/employee.fdb' > > failed
You probably need Michal Kubecek's patch.... OpenSuSE >= 13.1 adds minor version into ICU soname to cope with repeated upstream ABI breakages. We therefore need to make unicode_util functions adapt to this. --- src/common/unicode_util.cpp | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/common/unicode_util.cpp b/src/common/unicode_util.cpp index ba77825f4a64..89149c74410a 100644 --- a/src/common/unicode_util.cpp +++ b/src/common/unicode_util.cpp @@ -52,6 +52,8 @@ // The next major ICU version after 4.8 is 49. #define ICU_NEW_VERSION_MEANING 49 +// openSUSE >= 13.1 adds minor version to soname +#define ICU_VERSION_SUSE_HACK 51 using namespace Firebird; @@ -347,7 +349,9 @@ static void formatFilename(PathName& filename, const char* templateName, int majorVersion, int minorVersion) { string s; - if (majorVersion >= ICU_NEW_VERSION_MEANING) + if (majorVersion >= ICU_VERSION_SUSE_HACK) + s.printf("%d_%d", majorVersion, minorVersion); + else if (majorVersion >= ICU_NEW_VERSION_MEANING) s.printf("%d", majorVersion); else s.printf("%d%d", majorVersion, minorVersion); @@ -970,13 +974,20 @@ UnicodeUtil::ICU* UnicodeUtil::loadICU(const string& icuVersion, const string& c &majorVersion, &minorVersion); if (n == 1) - minorVersion = 0; + { + n = sscanf((*i == "default" ? version : *i).c_str(), "%d_%d", + &majorVersion, &minorVersion); + if (n == 1) + minorVersion = 0; + } else if (n != 2) continue; string configVersion; - if (majorVersion >= ICU_NEW_VERSION_MEANING) + if (majorVersion >= ICU_VERSION_SUSE_HACK) + configVersion.printf("%d_%d", majorVersion, minorVersion); + else if (majorVersion >= ICU_NEW_VERSION_MEANING) { minorVersion = 0; configVersion.printf("%d", majorVersion); @@ -1138,7 +1149,7 @@ UnicodeUtil::ConversionICU& UnicodeUtil::getConversionICU() LocalStatus ls; CheckStatusWrapper lastError(&ls); string version; - const int majorArray[] = {5, 4, 3, 6, 0}; + const int majorArray[] = {5, 51, 52, 53, 54, 55, 56, 57, 58, 59, 4, 3, 6, 0}; for (const int* major = majorArray; *major; ++major) { @@ -1180,7 +1191,9 @@ string UnicodeUtil::getDefaultIcuVersion() string rc; UnicodeUtil::ConversionICU& icu(UnicodeUtil::getConversionICU()); - if (icu.vMajor >= ICU_NEW_VERSION_MEANING) + if (icu.vMajor >= ICU_VERSION_SUSE_HACK) + rc.printf("%d_%d", icu.vMajor, icu.vMinor); + else if (icu.vMajor >= ICU_NEW_VERSION_MEANING) rc.printf("%d", icu.vMajor); else rc.printf("%d.%d", icu.vMajor, icu.vMinor); Regards Paul ------------------------------------------------------------------------------ The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel