Re: [Firebird-devel] Present state of cmake build system

2017-12-02 Thread Egor Pugin
Hi,

See this PR https://github.com/FirebirdSQL/firebird/pull/133
which fixes all present issues for Windows and Ubuntu (possibly other
linux systems too).
Macos build is needed in additional fixes in code.

On 16 November 2017 at 19:12, William L. Thomson Jr.  wrote:
> Greetings,
>
> I noticed a bit ago Firebird has a cmake build system in addition to
> autotools. I am not sure as to the present state of that. I have been
> messing around with it a bit with 4.x. Also looking to use the Ninja
> cmake generator rather than make/autotools for faster builds.
>
> I would like to explore improving the cmake build system, so that is an
> option. Maybe replacing autotools, but that is not my intention. Though
> maintaining two build systems can be a burden.
>
> At the moment I am not able to build via cmake. Pretty sure both
> make/autotools and ninja fails. I need to confirm on autotools but for
> sure does on ninja. Not sure why but I think maybe related to the
> external projects shipped within Firebird that it builds.
>
> Anyone have any information on this or interest in improving cmake
> build system? Faster builds via ninja would be nice. Speeds up pretty
> considerably, I think worth the effort.
>
> --
> William L. Thomson Jr.
>
> --
> 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
>



-- 
Egor Pugin

--
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] Present state of cmake build system

2017-12-02 Thread William L. Thomson Jr.
On Sat, 2 Dec 2017 19:45:19 +0300
Egor Pugin  wrote:

> Hi,
> 
> See this PR https://github.com/FirebirdSQL/firebird/pull/133
> which fixes all present issues for Windows and Ubuntu (possibly other
> linux systems too).
> Macos build is needed in additional fixes in code.

Sweet, nice work and thank you for mentioning that! I will see about
testing it via patch to my ebuild time permitting. Been bogged down
packaging Netbeans 9 from source on Java 9...

I will follow up once tested. Thanks much!

> On 16 November 2017 at 19:12, William L. Thomson Jr.
>  wrote:
> > Greetings,
> >
> > I noticed a bit ago Firebird has a cmake build system in addition to
> > autotools. I am not sure as to the present state of that. I have
> > been messing around with it a bit with 4.x. Also looking to use the
> > Ninja cmake generator rather than make/autotools for faster builds.
> >
> > I would like to explore improving the cmake build system, so that
> > is an option. Maybe replacing autotools, but that is not my
> > intention. Though maintaining two build systems can be a burden.
> >
> > At the moment I am not able to build via cmake. Pretty sure both
> > make/autotools and ninja fails. I need to confirm on autotools but
> > for sure does on ninja. Not sure why but I think maybe related to
> > the external projects shipped within Firebird that it builds.
> >
> > Anyone have any information on this or interest in improving cmake
> > build system? Faster builds via ninja would be nice. Speeds up
> > pretty considerably, I think worth the effort.
> >
> > --
> > William L. Thomson Jr.
> >
> > --
> > 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 
> 
> 
> 



-- 
William L. Thomson Jr.


pgpMm8fE3Lyml.pgp
Description: OpenPGP digital signature
--
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] Present state of cmake build system

2017-12-02 Thread William L. Thomson Jr.
Initial feedback, per another post of mine. I am looking to separate
out the stuff in extern and package that on its own. I already had
btyacc and libtommath. I packaged libtomcrypt. I think the system
btyacc no longer works as its from upstream and the one in Firebird has
seen some changes since.

Thus I have a need for the extern stuff to be optionally installed on
system vs built. Presently playing with your modifications plus some
sed I had before for libtommath. But ideally extern stuff could be
configured to be used on the system vs built and used from within
Firebird sources.

I do not expect you to make such change. Just a wish of mine. Worse
case I can expand on your changes to meet my needs while preserving the
building and using extern stuff within Firebird sources, being the
default.

Or maybe detect if on system, if found use system, if not build and
use from within. That maybe ideal all around. Either way thank you very
much for your work. I had been busy with other stuff so hadn't the time
to dial in cmake more for Firebird. Glad I am not the only one
interested in such :)

On Sat, 2 Dec 2017 13:07:59 -0500
"William L. Thomson Jr."  wrote:

> On Sat, 2 Dec 2017 19:45:19 +0300
> Egor Pugin  wrote:
> 
> > Hi,
> > 
> > See this PR https://github.com/FirebirdSQL/firebird/pull/133
> > which fixes all present issues for Windows and Ubuntu (possibly
> > other linux systems too).
> > Macos build is needed in additional fixes in code.  
> 
> Sweet, nice work and thank you for mentioning that! I will see about
> testing it via patch to my ebuild time permitting. Been bogged down
> packaging Netbeans 9 from source on Java 9...
> 
> I will follow up once tested. Thanks much!

-- 
William L. Thomson Jr.


pgpl3FJIXk6en.pgp
Description: OpenPGP digital signature
--
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


[Firebird-devel] cmake build error

2017-12-02 Thread William L. Thomson Jr.
I ran into this before and seems same even with updated cmake patches.
Not sure if its a gcc 6 issue, some other scope issue, or something I
did to cmake build, or env.

I am removing some tokens, maybe btyacc issue. Here I strip out TOK_

for f in yvalve/keywords dsql/Parser; do
sed -i -e "s|TOK_||g" "src/${f}.cpp" \
|| die "Failed to correct ${f}cpp"
 done


FAILED: src/CMakeFiles/yvalve_common.dir/yvalve/keywords.cpp.o
/usr/bin/x86_64-pc-linux-gnu-g++ -DDEV_BUILD
-I/tmp/portage/dev-db/firebird-4.0.0_alpha1/work/firebird-T4_0_0_Alpha1/extern/decNumber
-I/tmp/portage/dev-db/firebird-4.0.0_alpha1/work/firebird-T4_0_0_Alpha1/extern/icu/include
-I/tmp/portage/dev-db/firebird-4.0.0_alpha1/work/firebird-T4_0_0_Alpha1/extern/zlib
-I/tmp/portage/dev-db/firebird-4.0.0_alpha1/work/firebird-T4_0_0_Alpha1/src/include
-I/tmp/portage/dev-db/firebird-4.0.0_alpha1/work/firebird-T4_0_0_Alpha1/src/include/gen
-Isrc/include -Isrc/include/gen  -DNDEBUG -O2 -pipe -march=amdfam10
-mcx16 -msahf -mabm -mlzcnt -fpermissive -msse4 -std=c++11 -fPIC -msse4
-std=c++11 -MD -MT
src/CMakeFiles/yvalve_common.dir/yvalve/keywords.cpp.o -MF
src/CMakeFiles/yvalve_common.dir/yvalve/keywords.cpp.o.d -o
src/CMakeFiles/yvalve_common.dir/yvalve/keywords.cpp.o
-c 
/tmp/portage/dev-db/firebird-4.0.0_alpha1/work/firebird-T4_0_0_Alpha1/src/yvalve/keywords.cpp
/tmp/portage/dev-db/firebird-4.0.0_alpha1/work/firebird-T4_0_0_Alpha1/src/yvalve/keywords.cpp:44:3:
error: ‘NOT_LSS’ was not declared in this scope
{NOT_LSS, "!<", false},
  ^~~
/tmp/portage/dev-db/firebird-4.0.0_alpha1/work/firebird-T4_0_0_Alpha1/src/yvalve/keywords.cpp:45:3:
error: ‘NEQ’ was not declared in this scope
{NEQ, "!=", false},
  ^~~

And it repeats for several lines, many things not declared.

-- 
William L. Thomson Jr.


pgpQh2WpqSGNx.pgp
Description: OpenPGP digital signature
--
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] cmake build error

2017-12-02 Thread Roman Simakov
Hmmm. I do not understand. Did ypu strip out TOK_ prefix from src and
wander why it's not found?

2017-12-02 23:30 GMT+03:00 William L. Thomson Jr. :
> I ran into this before and seems same even with updated cmake patches.
> Not sure if its a gcc 6 issue, some other scope issue, or something I
> did to cmake build, or env.
>
> I am removing some tokens, maybe btyacc issue. Here I strip out TOK_
>
> for f in yvalve/keywords dsql/Parser; do
> sed -i -e "s|TOK_||g" "src/${f}.cpp" \
> || die "Failed to correct ${f}cpp"
>  done
>
>
> FAILED: src/CMakeFiles/yvalve_common.dir/yvalve/keywords.cpp.o
> /usr/bin/x86_64-pc-linux-gnu-g++ -DDEV_BUILD
> -I/tmp/portage/dev-db/firebird-4.0.0_alpha1/work/firebird-T4_0_0_Alpha1/extern/decNumber
> -I/tmp/portage/dev-db/firebird-4.0.0_alpha1/work/firebird-T4_0_0_Alpha1/extern/icu/include
> -I/tmp/portage/dev-db/firebird-4.0.0_alpha1/work/firebird-T4_0_0_Alpha1/extern/zlib
> -I/tmp/portage/dev-db/firebird-4.0.0_alpha1/work/firebird-T4_0_0_Alpha1/src/include
> -I/tmp/portage/dev-db/firebird-4.0.0_alpha1/work/firebird-T4_0_0_Alpha1/src/include/gen
> -Isrc/include -Isrc/include/gen  -DNDEBUG -O2 -pipe -march=amdfam10
> -mcx16 -msahf -mabm -mlzcnt -fpermissive -msse4 -std=c++11 -fPIC -msse4
> -std=c++11 -MD -MT
> src/CMakeFiles/yvalve_common.dir/yvalve/keywords.cpp.o -MF
> src/CMakeFiles/yvalve_common.dir/yvalve/keywords.cpp.o.d -o
> src/CMakeFiles/yvalve_common.dir/yvalve/keywords.cpp.o
> -c 
> /tmp/portage/dev-db/firebird-4.0.0_alpha1/work/firebird-T4_0_0_Alpha1/src/yvalve/keywords.cpp
> /tmp/portage/dev-db/firebird-4.0.0_alpha1/work/firebird-T4_0_0_Alpha1/src/yvalve/keywords.cpp:44:3:
> error: ‘NOT_LSS’ was not declared in this scope
> {NOT_LSS, "!<", false},
>   ^~~
> /tmp/portage/dev-db/firebird-4.0.0_alpha1/work/firebird-T4_0_0_Alpha1/src/yvalve/keywords.cpp:45:3:
> error: ‘NEQ’ was not declared in this scope
> {NEQ, "!=", false},
>   ^~~
>
> And it repeats for several lines, many things not declared.
>
> --
> William L. Thomson Jr.
>
> --
> 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
>



-- 
Roman Simakov

--
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] cmake build error

2017-12-02 Thread William L. Thomson Jr.
On Sat, 2 Dec 2017 23:45:09 +0300
Roman Simakov  wrote:
>
> Hmmm. I do not understand. Did ypu strip out TOK_ prefix from src 

Yes I strip it out via sed, just removing TCK_, replacing with nothing.

Before removing TOK_ I got a different error, I think about token not
found or something. It was not a scope issue. Assuming maybe something
translates the TOK_ to something else. Something the cmake build system
was failing to do or something.

> and  wander why it's not found?

Seems it was something I did wrong. I just went to comment it out and
replicate the original error. It does not seem to be failing anymore.
Maybe due to the changes to cmake via the patch/PR133.

Can disregard sorry for the noise. I should have commented out my sed
and tested cmake changes before posting. My bad, sorry :P

-- 
William L. Thomson Jr.


pgpcjuVPIohuE.pgp
Description: OpenPGP digital signature
--
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] cmake build error

2017-12-02 Thread Roman Simakov
You sould not strip out TOK_
https://github.com/FirebirdSQL/firebird/pull/133 fixed errors you see

2017-12-02 23:58 GMT+03:00 William L. Thomson Jr. :
> On Sat, 2 Dec 2017 23:45:09 +0300
> Roman Simakov  wrote:
>>
>> Hmmm. I do not understand. Did ypu strip out TOK_ prefix from src
>
> Yes I strip it out via sed, just removing TCK_, replacing with nothing.
>
> Before removing TOK_ I got a different error, I think about token not
> found or something. It was not a scope issue. Assuming maybe something
> translates the TOK_ to something else. Something the cmake build system
> was failing to do or something.
>
>> and  wander why it's not found?
>
> Seems it was something I did wrong. I just went to comment it out and
> replicate the original error. It does not seem to be failing anymore.
> Maybe due to the changes to cmake via the patch/PR133.
>
> Can disregard sorry for the noise. I should have commented out my sed
> and tested cmake changes before posting. My bad, sorry :P
>
> --
> William L. Thomson Jr.
>
> --
> 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
>



-- 
Roman Simakov

--
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] cmake build error

2017-12-02 Thread William L. Thomson Jr.
On Sun, 3 Dec 2017 00:09:24 +0300
Roman Simakov  wrote:

> You sould not strip out TOK_
> https://github.com/FirebirdSQL/firebird/pull/133 fixed errors you see

Yes but its using internal stuff. Leaving it as is except for the
libtomcrypt and libtommath. Trying to get it to use the system ones vs
building internally.

Once I can get past that I can comment on build. I assume if I use
internal it will build fine.

-- 
William L. Thomson Jr.


pgpU_oh8GIYA4.pgp
Description: OpenPGP digital signature
--
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] cmake build error

2017-12-02 Thread William L. Thomson Jr.
On Sat, 2 Dec 2017 16:20:39 -0500
"William L. Thomson Jr."  wrote:

> On Sun, 3 Dec 2017 00:09:24 +0300
> Roman Simakov  wrote:
> 
> > You sould not strip out TOK_
> > https://github.com/FirebirdSQL/firebird/pull/133 fixed errors you
> > see  
> 
> Yes but its using internal stuff. Leaving it as is except for the
> libtomcrypt and libtommath. Trying to get it to use the system ones vs
> building internally.
> 
> Once I can get past that I can comment on build. I assume if I use
> internal it will build fine.

Really frustrating trying to get cmake to use external libtommath and
libtomcrypt. I have no idea what is going wrong. Both have pkg-config
files and that is fine. But cmake's find_library fails, and mentions
some *cmake file for each library I do not have to make for other
things I use cmake for[1][2]. I do not understand what is going wrong
there. Though still somewhat new to cmake.

I am able to use

include(FindPkgConfig)
pkg_check_modules(tomcrypt REQUIRED libtomcrypt)
pkg_check_modules(tommath REQUIRED libtommath)

But then it fails because its using the wrong stupid name...

-llibtomcrypt vs  -ltomcrypt

I tried
pkg_check_modules(libtommath REQUIRED tommath)

Which also works in finding the library but then again I end up with 
-llibtomcrypt

Super annoying... Usually a fan of cmake, but this is stupidity for no
reason.

# pkg-config  --libslibtommath
 -L/usr/lib -ltommath

# pkg-config  --libs libtomcrypt
-L/usr/lib -ltomcrypt

1.https://github.com/Obsidian-StudiosInc/ecrire/blob/master/CMakeLists.txt#L16
2.https://github.com/Obsidian-StudiosInc/jem/blob/master/CMakeLists.txt#L90

-- 
William L. Thomson Jr.


pgpRW9_Vtzowx.pgp
Description: OpenPGP digital signature
--
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