Re: [Firebird-devel] Building Firebird 3.0 sometimes fails with aSIGSEGV in gfix

2016-10-27 Thread Stephan Bergmann
On 10/27/2016 10:27 AM, marius adrian popa wrote:
> Could you show the CFLAGS?
>
> It might be
> related 
> https://github.com/Obsidian-StudiosInc/os-xtoo/issues/1#issuecomment-188736865
>
> It seems frame-pointer generation is required for Firebird build.

The LibreOffice build system doesn't pass any CFLAGS into the Firebird 
configure, but it does pass in some CXXFLAGS (but none about 
optimization or -f[no-]omit-frame-pointer).  Firebird's config.log 
reports their ultimate values as

> CFLAGS=' -pthread'
> CXXFLAGS='  -fno-sized-deallocation -fno-delete-null-pointer-checks  
> -I/data/lo/core/external/boost/include 
> -I/data/lo/core/workdir/UnpackedTarball/boost 
> -L/data/lo/core/workdir/UnpackedTarball/boost/source/lib   
> -I/data/lo/core/workdir/UnpackedTarball/icu/source 
> -I/data/lo/core/workdir/UnpackedTarball/icu/source/i18n 
> -I/data/lo/core/workdir/UnpackedTarball/icu/source/common   
> -L/data/lo/core/workdir/UnpackedTarball/libtommath   -pthread'

The verbose 'make' output doesn't mention any -f[no-]omit-frame-pointer, 
and only mentions any -O, namely -O3, when compiling a small fraction of 
the source files, namely src/cloop/Expr.cpp, src/cloop/Generator.cpp, 
src/cloop/Lexer.cpp, src/cloop/Parser.cpp, src/cloop/Main.cpp, and 
src/tests/test1/CppTest.cpp.

--
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


Re: [Firebird-devel] Building Firebird 3.0 sometimes fails with aSIGSEGV in gfix

2016-10-27 Thread marius adrian popa
Could you show the CFLAGS?

It might be related
https://github.com/Obsidian-StudiosInc/os-xtoo/issues/1#issuecomment-188736865

It seems frame-pointer generation is required for Firebird build.

On Thu, Oct 27, 2016 at 11:18 AM, Paul Beach  wrote:

> > 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_MEANING49
> +// 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
> , );
>
> if (n == 1)
> -   minorVersion = 0;
> +   {
> +   n = sscanf((*i == "default" ? version :
> *i).c_str(), "%d_%d",
> +   , );
> +   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();
> 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
>
--
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/telerikFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Building Firebird 3.0 sometimes fails with aSIGSEGV in gfix

2016-10-27 Thread Paul Beach
> 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_MEANING49
+// 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
, );
 
if (n == 1)
-   minorVersion = 0;
+   {
+   n = sscanf((*i == "default" ? version : *i).c_str(), 
"%d_%d",
+   , );
+   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();
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