Re: [Firebird-devel] MacOS build sometimes hangs

2019-11-28 Thread Alex Peshkoff via Firebird-devel

On 2019-11-28 17:34, Adriano dos Santos Fernandes wrote:

On 28/11/2019 05:44, Alex Peshkoff via Firebird-devel wrote:

On 2019-11-27 21:37, Adriano dos Santos Fernandes wrote:

On 26/11/2019 20:08, Adriano dos Santos Fernandes wrote:

Hi!

You can see here https://github.com/FirebirdSQL/firebird/runs/321529377
that sometimes MacOS build hangs.

This is during the build but is when some FB utility is called.

I had this many times in Travis and GitHub Actions.


I've used to see that hang (hmm... not sure exactly that - at least
hang in build_file) sometimes, on 2.5 as far as I remember. "My" hang
was caused by missing EOF marker in a stream. I did not pay much
attention to it cause it always used to be gone after full rebuild.
Now looks like we have that during clean build process - and on a
rather specific platform.


And in Linux, both v3 and master segfaults in Ubuntu 16.04 and 18.04 in
GitHub.

I had many problems with v3 in the past, when gfix was exiting, but I
thought it was fixed, at least in my machines.

I checked the Ubuntu 16.04 environment and it has g++ (Ubuntu
5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609.


Ubuntu 16.04?
I have it on my notebook which I use sometimes for development - when 
work not at home. Particularly I was using it actively during the summer.
I have g++ (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609 (16.04.12 
instead 11) but I do not think this is a reason of missing segfaults.

Also I've rechecked right now the build of fb4 - no problems.




Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build sometimes hangs

2019-11-28 Thread Paul Beach


> On 28/11/2019 05:57, Paul Beach wrote:
> >> More or less related question. As far as I know latest builds done by 
> >> Paul Beach were done using llvm. gcc had some problems. May be try llvm 
> >> instead it?
> > Alex is correct, LLVM/Clang is now the default compiler on MacOS, and
> > thats what we currently use to build Firebird.
> >
> >
> But look:
> 
> Travis:
> 
> $ g++ --version
> Configured with:
> --prefix=/Applications/Xcode-9.2.app/Contents/Developer/usr
> --with-gxx-include-dir=/usr/include/c++/4.2.1
> Apple LLVM version 9.0.0 (clang-900.0.39.2)
> Target: x86_64-apple-darwin16.7.0
> Thread model: posix
> InstalledDir:
> /Applications/Xcode-9.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
> 
> $ clang++ --version
> Apple LLVM version 9.0.0 (clang-900.0.39.2)
> Target: x86_64-apple-darwin16.7.0
> Thread model: posix
> InstalledDir:
> /Applications/Xcode-9.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
> 
> 
> 
> GitHub:
> 
> $ g++ --version
> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
> --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/
> include/c++/4.2.1
> Apple clang version 11.0.0 (clang-1100.0.33.8)
> Target: x86_64-apple-darwin19.0.0
> Thread model: posix
> InstalledDir:
> /Applications/Xcode_11.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
> 
> $ clang++ --version
> Apple clang version 11.0.0 (clang-1100.0.33.8)
> Target: x86_64-apple-darwin19.0.0
> Thread model: posix
> InstalledDir:
> /Applications/Xcode_11.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
> 
> 
> 
> g++ in both env. seems just the frontend, using LLVM/clang backend.
> Is this still problematic and should use clang frontend as well?

Nope g++ is invoked on my MacBook Pro running High Sierra 10.13.6
which then defaults to LLVM/Clang

gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

So this is not the cause of the hangs by the look of it.

Regards
Paul




Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build sometimes hangs

2019-11-28 Thread Adriano dos Santos Fernandes
On 28/11/2019 05:44, Alex Peshkoff via Firebird-devel wrote:
> On 2019-11-27 21:37, Adriano dos Santos Fernandes wrote:
>> On 26/11/2019 20:08, Adriano dos Santos Fernandes wrote:
>>> Hi!
>>>
>>> You can see here https://github.com/FirebirdSQL/firebird/runs/321529377
>>> that sometimes MacOS build hangs.
>>>
>>> This is during the build but is when some FB utility is called.
>>>
>>> I had this many times in Travis and GitHub Actions.
>>>
>
> I've used to see that hang (hmm... not sure exactly that - at least
> hang in build_file) sometimes, on 2.5 as far as I remember. "My" hang
> was caused by missing EOF marker in a stream. I did not pay much
> attention to it cause it always used to be gone after full rebuild.
> Now looks like we have that during clean build process - and on a
> rather specific platform.
>

And in Linux, both v3 and master segfaults in Ubuntu 16.04 and 18.04 in
GitHub.

I had many problems with v3 in the past, when gfix was exiting, but I
thought it was fixed, at least in my machines.

I checked the Ubuntu 16.04 environment and it has g++ (Ubuntu
5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609.


Adriano



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build sometimes hangs

2019-11-28 Thread Alex Peshkoff via Firebird-devel

On 2019-11-28 17:25, Adriano dos Santos Fernandes wrote:


g++ in both env. seems just the frontend, using LLVM/clang backend.

Is this still problematic and should use clang frontend as well?


I think it's not problematic in that case.



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build sometimes hangs

2019-11-28 Thread Adriano dos Santos Fernandes
On 28/11/2019 05:57, Paul Beach wrote:
>> More or less related question. As far as I know latest builds done by 
>> Paul Beach were done using llvm. gcc had some problems. May be try llvm 
>> instead it?
> Alex is correct, LLVM/Clang is now the default compiler on MacOS, and
> thats what we currently use to build Firebird.
>
>
But look:

Travis:

$ g++ --version
Configured with:
--prefix=/Applications/Xcode-9.2.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir:
/Applications/Xcode-9.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

$ clang++ --version
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir:
/Applications/Xcode-9.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin



GitHub:

$ g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.0 (clang-1100.0.33.8)
Target: x86_64-apple-darwin19.0.0
Thread model: posix
InstalledDir:
/Applications/Xcode_11.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

$ clang++ --version
Apple clang version 11.0.0 (clang-1100.0.33.8)
Target: x86_64-apple-darwin19.0.0
Thread model: posix
InstalledDir:
/Applications/Xcode_11.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin



g++ in both env. seems just the frontend, using LLVM/clang backend.

Is this still problematic and should use clang frontend as well?


Adriano



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build sometimes hangs

2019-11-28 Thread Paul Beach
> More or less related question. As far as I know latest builds done by 
> Paul Beach were done using llvm. gcc had some problems. May be try llvm 
> instead it?

Alex is correct, LLVM/Clang is now the default compiler on MacOS, and
thats what we currently use to build Firebird.

Paul 


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build sometimes hangs

2019-11-28 Thread Alex Peshkoff via Firebird-devel

On 2019-11-27 21:37, Adriano dos Santos Fernandes wrote:

On 26/11/2019 20:08, Adriano dos Santos Fernandes wrote:

Hi!

You can see here https://github.com/FirebirdSQL/firebird/runs/321529377
that sometimes MacOS build hangs.

This is during the build but is when some FB utility is called.

I had this many times in Travis and GitHub Actions.



I've used to see that hang (hmm... not sure exactly that - at least hang 
in build_file) sometimes, on 2.5 as far as I remember. "My" hang was 
caused by missing EOF marker in a stream. I did not pay much attention 
to it cause it always used to be gone after full rebuild. Now looks like 
we have that during clean build process - and on a rather specific 
platform.


More or less related question. As far as I know latest builds done by 
Paul Beach were done using llvm. gcc had some problems. May be try llvm 
instead it?



And now a bugcheck...

internal Firebird consistency check (can't continue after bugcheck)
(E)
/Users/runner/runners/2.161.0/work/firebird/firebird/src/msgs/build_file.epp:47:
Couldn't access database DB = 'msg.fdb'
1 error, no warnings
     Version(s) for database "msg.fdb"

https://github.com/FirebirdSQL/firebird/runs/323394276


That's something extraordinary. Useally to see that message without 
previous one describing exact BC reason we need >1 attachment to 
bugchecked database on SS. No idea how could gpre have >1 attachment to 
single DB. Well, some chances to miss initial error are present in 
nbak.cpp, but I hardly imagine it with DB which was never locked by nbak.


Afraid we can only guess now - not enough info to suggest something 
reasonable.





Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build sometimes hangs

2019-11-27 Thread Adriano dos Santos Fernandes
On 26/11/2019 20:08, Adriano dos Santos Fernandes wrote:
> Hi!
>
> You can see here https://github.com/FirebirdSQL/firebird/runs/321529377
> that sometimes MacOS build hangs.
>
> This is during the build but is when some FB utility is called.
>
> I had this many times in Travis and GitHub Actions.
>
>
And now a bugcheck...

internal Firebird consistency check (can't continue after bugcheck)
(E)
/Users/runner/runners/2.161.0/work/firebird/firebird/src/msgs/build_file.epp:47:
Couldn't access database DB = 'msg.fdb'
1 error, no warnings
    Version(s) for database "msg.fdb"

https://github.com/FirebirdSQL/firebird/runs/323394276


Adriano



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] MacOS build sometimes hangs

2019-11-26 Thread Adriano dos Santos Fernandes
Hi!

You can see here https://github.com/FirebirdSQL/firebird/runs/321529377
that sometimes MacOS build hangs.

This is during the build but is when some FB utility is called.

I had this many times in Travis and GitHub Actions.


Adriano


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build

2019-10-25 Thread Adriano dos Santos Fernandes
The problem is now U_FILE_ACCESS_ERROR (4) when calling ICU's u_init.

ICU is built/installed with:

    wget
http://download.icu-project.org/files/icu4c/54.1/icu4c-54_1-src.tgz
    tar xzvf icu4c-54_1-src.tgz
    cd icu/source
    ./runConfigureICU MacOSX
    make -j4
    sudo make install


Adriano



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build

2019-10-24 Thread Adriano dos Santos Fernandes
On 24/10/2019 13:02, Adriano dos Santos Fernandes wrote:
>
> Why is MATHLIB expanding to /opt/local/lib/libtommath.a when using
> --with-builtin-tommath?
>
>
Never mind, I found it is explicitly defined in prefix.darwin_x86_64.


Adriano



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build

2019-10-24 Thread Adriano dos Santos Fernandes
On 24/10/2019 10:57, Alex Peshkoff via Firebird-devel wrote:
> On 10/24/19 4:48 PM, Paul Beach wrote:
>
>
>> Make sure you use builtin-libtommath
>
> Lete me add my 2 words about this. I see no problems with 3d-party
> tommath, but if one plans to build redistributable universal binaries
> tomcrypt should better be builtin. By default it's built without any
> internal syncs which is not good for us: except races in some rare
> places there is even worse problem. Sizes of some structures, passed
> from our code (expecting presence of mutexes) does not match one
> expected by tomcrypt built in default way. I.e. segfault...
>
I'm now trying 3.0 with --with-builtin-tommath and having error when
linking libfbclient:

...
L/Users/runner/runners/2.159.2/work/firebird/firebird/gen/Release/firebird/lib 
-liconv -lm  -framework CoreFoundation  -lcurses -liconv
/opt/local/lib/libtommath.a

Why is MATHLIB expanding to /opt/local/lib/libtommath.a when using
--with-builtin-tommath?

Workflow is here:
https://github.com/asfernandes/firebird/blob/d7c04358695db8141a9deff9a899c4998c57ab28/.github/workflows/main.yml
Logs are here:
https://github.com/asfernandes/firebird/commit/d7c04358695db8141a9deff9a899c4998c57ab28/checks?check_suite_id=279897856


Adriano



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build

2019-10-24 Thread Adriano dos Santos Fernandes
On 24/10/2019 10:48, Paul Beach wrote:
> Adriano,
>
>> I'm trying to setup github-actions with MacOS build.
>> Guess what? Errors after errors.
>> Is the master code supposed to build without patches? 
> I haven't looked at building MacOS on master, mainly because its a port,
> so I wait until the code stabilises before I start working on it so its going 
> to die
> a horrible death until Alex and I look at it in detail.
>
> Firebird 3 should build OK...
>
> first you need to install a copy of ICU and build it.
> then you need to set the CFLAGS, LDFLAGS, and CXXFLAGS as per 
> prefix.darwin_x86_64
> Make sure you use builtin-libtommath
>
>
Can't it be installed with brew, at least to run in the same build machine?

What version should be it?

Now with v3 and installing icu4c (64.2) I'm having:

/usr/local/opt/icu4c/include/unicode/localpointer.h:224:34: warning:
rvalue references are a C++11 extension [-Wc++11-extensions]
    LocalPointer(LocalPointer &) U_NOEXCEPT :
LocalPointerBase(src.ptr) {

/usr/local/opt/icu4c/include/unicode/localpointer.h:224:40: error:
expected ';' at end of declaration list
    LocalPointer(LocalPointer &) U_NOEXCEPT :
LocalPointerBase(src.ptr) {


Adriano



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build

2019-10-24 Thread Alex Peshkoff via Firebird-devel

On 10/24/19 4:48 PM, Paul Beach wrote:



Make sure you use builtin-libtommath


Lete me add my 2 words about this. I see no problems with 3d-party 
tommath, but if one plans to build redistributable universal binaries 
tomcrypt should better be builtin. By default it's built without any 
internal syncs which is not good for us: except races in some rare 
places there is even worse problem. Sizes of some structures, passed 
from our code (expecting presence of mutexes) does not match one 
expected by tomcrypt built in default way. I.e. segfault...





Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build

2019-10-24 Thread Paul Beach
Adriano,

> I'm trying to setup github-actions with MacOS build.
> Guess what? Errors after errors.
> Is the master code supposed to build without patches? 

I haven't looked at building MacOS on master, mainly because its a port,
so I wait until the code stabilises before I start working on it so its going 
to die
a horrible death until Alex and I look at it in detail.

Firebird 3 should build OK...

first you need to install a copy of ICU and build it.
then you need to set the CFLAGS, LDFLAGS, and CXXFLAGS as per 
prefix.darwin_x86_64
Make sure you use builtin-libtommath


Regards
Paul





Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build

2019-10-24 Thread Alex Peshkoff via Firebird-devel

On 10/24/19 4:37 PM, Adriano dos Santos Fernandes wrote:

Hi!

I'm trying to setup github-actions with MacOS build.


That's great!



Guess what? Errors after errors.

Is the master code supposed to build without patches?


Sooner of all not, it was never tried. Paul Beach useally starts builds 
on later stage.



And 3.0 branch?


Should build.




Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] MacOS build

2019-10-24 Thread Adriano dos Santos Fernandes
Hi!

I'm trying to setup github-actions with MacOS build.

Guess what? Errors after errors.

Is the master code supposed to build without patches? And 3.0 branch?

What are the commands to build?

How the OS should be prepared?

So far I'm having this:

--
    brew install automake libtool icu4c
    ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
    ln -s /usr/local/bin/glibtool /usr/local/bin/libtool
    brew link icu4c --force
    brew info icu4c
    brew install libtommath
    brew install libtomcrypt

    export PATH="/usr/local/opt/icu4c/bin:$PATH"
    export PATH="/usr/local/opt/icu4c/sbin:$PATH"
    export LDFLAGS="-L/usr/local/opt/icu4c/lib"
    export CPPFLAGS="-I/usr/local/opt/icu4c/include -stdlib=libc++"
    export CXX="g++ -I/usr/local/opt/icu4c/include -stdlib=libc++"
    #./autogen.sh --with-builtin-tomcrypt --with-builtin-tommath
    ./autogen.sh
    make -j4
    make dist
--

I had to ifdef posix_fadvise with HAVE_POSIX_FADVISE in os_utils.h.

The current error is:

/Users/runner/runners/2.159.2/work/firebird/firebird/src/common/CRC32C.cpp:55:16:
error: always_inline function '_mm_crc32_u16' requires target feature
'sse4.2', but would be inlined into function 'CRC32C' that is compiled
without support for 'sse4.2'
    hash_value = _mm_crc32_u16(hash_value, *(unsigned
short*) value);


Adriano



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build fail "SSE4.2 instruction set not enabled" (abandonned)

2017-05-16 Thread marius adrian popa
On firebird3.0.3 and i7 host works ok the above patch

Got a crash when compiling on a non sse4 host (Pentium Dual-Core  CPU
 E5400)

https://gist.github.com/mariuz/94e63983e629a038c235ecf7f2f9dca5

On Tue, May 16, 2017 at 5:21 PM, Dimitry Sibiryakov 
wrote:

> 16.05.2017 15:54, marius adrian popa wrote:
> > Could you specifiy compiler versions and the error messages ?
>
>No. It was years ago. MSVC was 2013, GCC can't remember, perhaps 4.8.
>
>
> --
>WBR, SD.
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> Firebird-Devel mailing list, web interface at
> https://lists.sourceforge.net/lists/listinfo/firebird-devel
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdotFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build fail "SSE4.2 instruction set not enabled" (abandonned)

2017-05-16 Thread Dimitry Sibiryakov
16.05.2017 15:54, marius adrian popa wrote:
> Could you specifiy compiler versions and the error messages ?

   No. It was years ago. MSVC was 2013, GCC can't remember, perhaps 4.8.


-- 
   WBR, SD.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build fail "SSE4.2 instruction set not enabled" (abandonned)

2017-05-16 Thread marius adrian popa
Could you specifiy compiler versions and the error messages ?

On Tue, May 16, 2017 at 11:28 AM, Dimitry Sibiryakov 
wrote:

> 16.05.2017 9:29, marius adrian popa wrote:
> > It's on Visual C++ ?
>
>Both VC and GCC.
>
>
> --
>WBR, SD.
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> Firebird-Devel mailing list, web interface at
> https://lists.sourceforge.net/lists/listinfo/firebird-devel
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdotFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build fail "SSE4.2 instruction set not enabled" (abandonned)

2017-05-16 Thread Dimitry Sibiryakov
16.05.2017 9:29, marius adrian popa wrote:
> It's on Visual C++ ?

   Both VC and GCC.


-- 
   WBR, SD.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build fail "SSE4.2 instruction set not enabled" (abandonned)

2017-05-16 Thread marius adrian popa
It's on Visual C++ ?

On Tue, May 16, 2017 at 12:05 AM, Dimitry Sibiryakov 
wrote:

> 15.05.2017 22:24, marius adrian popa wrote:
> >
> > and eliminated msse4 flag from compiler command line
> >
> > https://gist.github.com/mariuz/753f6fce7ebe0ac9bcf2cb26905c1cc1
>
>Did you check that it can be compiled? For me the trick with attribute
> did not work:
> compilation failed with subj error.
>
>
> --
>WBR, SD.
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> Firebird-Devel mailing list, web interface at
> https://lists.sourceforge.net/lists/listinfo/firebird-devel
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdotFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build fail "SSE4.2 instruction set not enabled" (abandonned)

2017-05-15 Thread Dimitry Sibiryakov
15.05.2017 22:24, marius adrian popa wrote:
>
> and eliminated msse4 flag from compiler command line
>
> https://gist.github.com/mariuz/753f6fce7ebe0ac9bcf2cb26905c1cc1

   Did you check that it can be compiled? For me the trick with attribute did 
not work: 
compilation failed with subj error.


-- 
   WBR, SD.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build fail "SSE4.2 instruction set not enabled" (abandonned)

2017-05-15 Thread marius adrian popa
I will check your patch this week on a mac / windows and linux , It's still
a hack so the proper way to solve it is like described in this
stackoverflow solution

http://stackoverflow.com/questions/11228855/header-files-
for-x86-simd-intrinsics

I used tips from
https://bidetly.io/2017/02/08/crc-part-1/

and eliminated msse4 flag from compiler command line

https://gist.github.com/mariuz/753f6fce7ebe0ac9bcf2cb26905c1cc1



On Sat, May 13, 2017 at 9:31 AM, Julien Nabet  wrote:

> Hi,
>
> As I put on the gerrit patch, I give up with this patch because:
> - it's too complicated to modify the patch : the patching part was working
> on my Mac and it fails to apply on Jenkins Mac
> - sse4 pb. Even if it builds, LO may crash on pc which aren't compatible
> with sse4
>
> Julien
>
> On 12/05/2017 14:33, marius adrian popa wrote:
>
> Also in firebird/extern/cloop/src/tests/test1/CTest.c
>
> related to this patch
> https://gerrit.libreoffice.org/#/c/37488/6/external/
> firebird/firebird-macosx.patch.1
>
> these lines and changes are still needed for osx
>
>  #include "CalcCApi.h"
> -#include 
> +#include 
>  #include 
>
> now build fails https://ci.libreoffice.org/job/lo_gerrit/11317/Config=
> macosx_clang_dbgutil/
>
> On Fri, May 12, 2017 at 1:10 PM, Tomaž Vajngerl  wrote:
>
>> Hi,
>>
>> On Fri, May 12, 2017 at 11:05 AM, marius adrian popa 
>> wrote:
>> > Known issue in Firebird 3.0.x
>> >
>> > http://firebird.1100200.n4.nabble.com/std-c-11-added-to-CXXF
>> LAGS-in-3-0-on-linux-td4645224.html
>> >
>> > introduced by this commit
>> >
>> > https://github.com/FirebirdSQL/firebird/commit/52d9a05a0f3d
>> >
>>
>> They would need to add something like "%/CRC32C.o: COMMON_FLAGS +=
>> -msse4" to prefix.darwin too (clang should have compatible switches)
>>
>> For Windows It is complicated as it depends if the particular VS
>> version supports the instructions or not, but you need to add some
>> compile switch too...
>>
>> That's only for compiler - in addition you also need run-time
>> detection, but I see this is already covered by SSE4_2Supported()
>> method.
>>
>> Regards, Tomaž
>>
>
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdotFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build fail "SSE4.2 instruction set not enabled"

2017-05-15 Thread Alex Peshkoff
On 05/12/17 22:13, Julien wrote:
> I gave a try but had this:
> lo/lode/dev/core/workdir/UnpackedTarball/firebird/src/common/CRC32C.cpp:41:10:
>  error: always_inline function '_mm_crc32_u8' requires target feature 
> 'sse4.1', but would be inlined into function 'CRC32C' that is compiled 
> without support for 'sse4.1'
>  return _mm_crc32_u8(hash_value, *value);
> ^
> Are you sure msse4 shouldn't be added in CXXFLAGS instead of COMMON_FLAGS?

In linux COMMON_FLAGS is used and it appears to be correct choice from 
general POV - msse4 makes sense for both plain C & C++.
But what about darwin - yes, looks like it does not use COMMON_FLAGS at 
all, with CXXFLAGS this should work.


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build fail "SSE4.2 instruction set not enabled"

2017-05-12 Thread Alex Peshkoff
On 05/12/17 15:33, marius adrian popa wrote:
> Also in firebird/extern/cloop/src/tests/test1/CTest.c

The simplest fix is to disable tests on mac

> related to this patch
> https://gerrit.libreoffice.org/#/c/37488/6/external/firebird/firebird-macosx.patch.1
>
> these lines and changes are still needed for osx
>
>   #include "CalcCApi.h"
> -#include 
> +#include 
>   #include 
>
> now build fails
> https://ci.libreoffice.org/job/lo_gerrit/11317/Config=macosx_clang_dbgutil/
>
> On Fri, May 12, 2017 at 1:10 PM, Tomaž Vajngerl  wrote:
>
>> Hi,
>>
>> On Fri, May 12, 2017 at 11:05 AM, marius adrian popa 
>> wrote:
>>> Known issue in Firebird 3.0.x
>>>
>>> http://firebird.1100200.n4.nabble.com/std-c-11-added-to-
>> CXXFLAGS-in-3-0-on-linux-td4645224.html
>>> introduced by this commit
>>>
>>> https://github.com/FirebirdSQL/firebird/commit/52d9a05a0f3d
>>>
>> They would need to add something like "%/CRC32C.o: COMMON_FLAGS +=
>> -msse4" to prefix.darwin too (clang should have compatible switches)
>>
>> For Windows It is complicated as it depends if the particular VS
>> version supports the instructions or not, but you need to add some
>> compile switch too...
>>
>> That's only for compiler - in addition you also need run-time
>> detection, but I see this is already covered by SSE4_2Supported()
>> method.
>>
>> Regards, Tomaž
>>
>
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
> Firebird-Devel mailing list, web interface at 
> https://lists.sourceforge.net/lists/listinfo/firebird-devel


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build fail "SSE4.2 instruction set not enabled"

2017-05-12 Thread marius adrian popa
Also in firebird/extern/cloop/src/tests/test1/CTest.c

related to this patch
https://gerrit.libreoffice.org/#/c/37488/6/external/firebird/firebird-macosx.patch.1

these lines and changes are still needed for osx

 #include "CalcCApi.h"
-#include 
+#include 
 #include 

now build fails
https://ci.libreoffice.org/job/lo_gerrit/11317/Config=macosx_clang_dbgutil/

On Fri, May 12, 2017 at 1:10 PM, Tomaž Vajngerl  wrote:

> Hi,
>
> On Fri, May 12, 2017 at 11:05 AM, marius adrian popa 
> wrote:
> > Known issue in Firebird 3.0.x
> >
> > http://firebird.1100200.n4.nabble.com/std-c-11-added-to-
> CXXFLAGS-in-3-0-on-linux-td4645224.html
> >
> > introduced by this commit
> >
> > https://github.com/FirebirdSQL/firebird/commit/52d9a05a0f3d
> >
>
> They would need to add something like "%/CRC32C.o: COMMON_FLAGS +=
> -msse4" to prefix.darwin too (clang should have compatible switches)
>
> For Windows It is complicated as it depends if the particular VS
> version supports the instructions or not, but you need to add some
> compile switch too...
>
> That's only for compiler - in addition you also need run-time
> detection, but I see this is already covered by SSE4_2Supported()
> method.
>
> Regards, Tomaž
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdotFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build fail "SSE4.2 instruction set not enabled"

2017-05-12 Thread Alex Peshkoff

On 05/12/17 12:05, marius adrian popa wrote:

Known issue in Firebird 3.0.x

http://firebird.1100200.n4.nabble.com/std-c-11-added-to-CXXFLAGS-in-3-0-on-linux-td4645224.html

introduced by this commit

https://github.com/FirebirdSQL/firebird/commit/52d9a05a0f3d


I can't check myself mac issues, but sooner of all attached patch should 
help.


diff --git a/builds/posix/darwin.defaults b/builds/posix/darwin.defaults
index 3406cc6..b6acb11 100644
--- a/builds/posix/darwin.defaults
+++ b/builds/posix/darwin.defaults
@@ -46,3 +46,5 @@ LINK_CLIENT = $(LIB_LINK) $(LINK_FIREBIRD_CLIENT_SYMBOLS) $(LIB_LINK_OPTIONS) $(
 STATIC_CXX_SUPPORT = -lsupc++ $(GCCS) -lgcc_eh -lSystem
 
 INLINE_EDIT_SED:= -i ""
+
+CXXFLAGS := $(CXXFLAGS) -std=c++11
diff --git a/builds/posix/prefix.darwin_i386 b/builds/posix/prefix.darwin_i386
index 39a3794..35b2763 100644
--- a/builds/posix/prefix.darwin_i386
+++ b/builds/posix/prefix.darwin_i386
@@ -40,3 +40,7 @@ EXE_LINK_OPTIONS:=-m32
 LD_FLAGS+=-m32 -arch i386
 
 include $(ROOT)/gen/darwin.defaults
+
+# This file must be compiled with SSE4.2 support
+%/CRC32C.o: COMMON_FLAGS += -msse4
+
diff --git a/builds/posix/prefix.darwin_x86_64 b/builds/posix/prefix.darwin_x86_64
index c846a08..c145fd9 100644
--- a/builds/posix/prefix.darwin_x86_64
+++ b/builds/posix/prefix.darwin_x86_64
@@ -41,3 +41,7 @@ FIREBIRD_LIBRARY_LINK+=-liconv
 UNDEF_PLATFORM=
 
 include $(ROOT)/gen/darwin.defaults
+
+# This file must be compiled with SSE4.2 support
+%/CRC32C.o: COMMON_FLAGS += -msse4
+
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdotFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build fail "SSE4.2 instruction set not enabled"

2017-05-12 Thread Dimitry Sibiryakov
12.05.2017 11:05, marius adrian popa wrote:
> Known issue in Firebird 3.0.x

   On Linux required flag is set in prefix.linux file like this:

> # This file must be compiled with SSE4.2 support
> %/CRC32C.o: COMMON_FLAGS += -msse4

   I have no idea how Firebird is built on MacOS, but if it uses the same set 
of makefiles 
for POSIX, it should include this line in appropriate prefix file(s).

-- 
   WBR, SD.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] MacOS build fail "SSE4.2 instruction set not enabled"

2017-05-12 Thread marius adrian popa
Known issue in Firebird 3.0.x

http://firebird.1100200.n4.nabble.com/std-c-11-added-to-CXXFLAGS-in-3-0-on-linux-td4645224.html

introduced by this commit

https://github.com/FirebirdSQL/firebird/commit/52d9a05a0f3d

On Thu, May 11, 2017 at 1:01 PM, Tomaž Vajngerl  wrote:

> Hi,
>
> On Thu, May 11, 2017 at 10:17 AM, julien2412  wrote:
> > Hello,
> >
> > I submitted a gerrit patch to bump Firebird to 3.0.2 (see
> > https://gerrit.libreoffice.org/#/c/37488/)
> > MacOs build fails on Jenkins with these logs:
> > In file included from
> > /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/
> macosx_clang_dbgutil/workdir/UnpackedTarball/firebird/src/
> common/CRC32C.cpp:34:
> > /Applications/Xcode.app/Contents/Developer/Toolchains/
> XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.1.0/
> include/nmmintrin.h:28:2:
> > error: "SSE4.2 instruction set not enabled"
> > #error "SSE4.2 instruction set not enabled"
> >  ^
> > /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/
> macosx_clang_dbgutil/workdir/UnpackedTarball/firebird/src/
> common/CRC32C.cpp:41:10:
> > error: use of undeclared identifier '_mm_crc32_u8'
> > return _mm_crc32_u8(hash_value, *value);
> > (idem with  _mm_crc32_u16 and  _mm_crc32_u32)
> >
> > Would it be possible to enable SSE4.2 on Jenkins MacOs machine or have we
> > got some compatibility constraint to fulfil?
>
> The file CRC32C.cpp must be compiled with compiler flag -msse4
> otherwise you get such a compile error - I'm not sure how we compile
> firebird but we will probably need to adapt this.
>
> > Julien
>
> Regards, Tomaž
> ___
> LibreOffice mailing list
> libreoff...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdotFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel