Re: [GNC-dev] Gnucash-3.0 build error: GTEST not found

2018-04-10 Thread DaveC49
Hi John,

Thanks for the info. I'll check on the thread started by Carlos Garcia.  I
now have a pretty good handle on how Cmake functions and how to point it  at
the top level directory. 

Cheers
David



-
David Cousens
--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-Dev-f1435356.html
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Gnucash-3.0 build error: GTEST not found

2018-04-10 Thread John Ralls


> On Apr 10, 2018, at 7:22 AM, John Ralls  wrote:
> 
> 
> 
>> On Apr 9, 2018, at 11:44 PM, DaveC49  wrote:
>> 
>> Hi John,
>> 
>> I now seem to have googlemock and googletest installed correctly. With the
>> patch  https://github.com/Gnucash/gnucash/pull/329 incorporated I am not no
>> longer failing on the GTEST or GMOCK checks and cmake is completing
>> successfully.
>> 
>> Make is now failing in the build as follows in building the scm-core-utils
>> after having succeeded in building everything down to the scm-gnc-module
>> .
>> .
>> .
>> Scanning dependencies of target scm-core-utils
>> [ 30%] Generating ../../lib/gnucash/scm/ccache/2.0/gnucash/core-utils.go
>> Backtrace:
>> In srfi/srfi-1.scm:
>> 619: 19 [for-each #
>> #]
>> In scripts/compile.scm:
>> 182: 18 [#
>> "/home/david/Applications/gnucash-3.0/libgnucash/core-utils/core-utils.scm"]
>> In system/base/target.scm:
>> 59: 17 [with-target "x86_64-pc-linux-gnu" ...]
>> In system/base/compile.scm:
>> 150: 16 [compile-file
>> "/home/david/Applications/gnucash-3.0/libgnucash/core-utils/core-utils.scm"
>> ...]
>> 43: 15 [call-once #]
>> In ice-9/boot-9.scm:
>> 171: 14 [with-throw-handler #t ...]
>> In system/base/compile.scm:
>> 59: 13 [#]
>> 153: 12 [#
>> #]
>> 216: 11 [read-and-compile # #:from ...]
>> 232: 10 [lp (# # # # ...) # #]
>> 180: 9 [lp # # # ...]
>> In ice-9/boot-9.scm:
>> 2401: 8 [save-module-excursion #> language/scheme/compile-tree-il.scm:29:3 ()>]
>> In language/scheme/compile-tree-il.scm:
>> 31: 7 [#> ()>]
>> In ice-9/psyntax.scm:
>> 1106: 6 [expand-top-sequence ((re-export gnc-build-userdata-path)) () ...]
>> 989: 5 [scan ((re-export gnc-build-userdata-path)) () ...]
>> 279: 4 [scan ((# #)) () (()) ...]
>> In ice-9/boot-9.scm:
>> 2094: 3 [call-with-deferred-observers #> ice-9/eval.scm:416:20 ()>]
>> 768: 2 [for-each # #]
>> In unknown file:
>>  ?: 1 [scm-error misc-error #f ...]
>> In ice-9/boot-9.scm:
>> 106: 0 [#
>> misc-error ...]
>> 
>> ice-9/boot-9.scm:106:20: In procedure #> ice-9/boot-9.scm:97:6 (thrown-k . args)>:
>> ice-9/boot-9.scm:106:20: Undefined variable: gnc-build-userdata-path
>> libgnucash/core-utils/CMakeFiles/scm-core-utils.dir/build.make:61: recipe
>> for target 'lib/gnucash/scm/ccache/2.0/gnucash/core-utils.go' failed
>> make[2]: *** [lib/gnucash/scm/ccache/2.0/gnucash/core-utils.go] Error 1
>> CMakeFiles/Makefile2:3770: recipe for target
>> 'libgnucash/core-utils/CMakeFiles/scm-core-utils.dir/all' failed
>> make[1]: *** [libgnucash/core-utils/CMakeFiles/scm-core-utils.dir/all] Error
>> 2
>> Makefile:160: recipe for target 'all' failed
>> make: *** [all] Error 2
> 
> Every instance of that error so far is because the wrong source-path is 
> passed to cmake.
> If you create a build directory in the top source dir, cd to it, and say 
>   cmake  ../gnucash
> cmake will start with the CMakeLists.txt in the gnucash subdirectory, from 
> which it can’t see the common/cmake_modules directory. The solution is to do
>  cmake  ..
> instead.

Never mind that, that’s for a different error. Sorry.

This is the same one that Carlos Garcia reported the other day in gnucash-user 
(“Building Issues”). Geert is working with him on that, I suggest you monitor 
the thread and join in if you can offer any insight.

Regards,
John Ralls
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Gnucash-3.0 build error: GTEST not found

2018-04-10 Thread John Ralls


> On Apr 9, 2018, at 11:44 PM, DaveC49  wrote:
> 
> Hi John,
> 
> I now seem to have googlemock and googletest installed correctly. With the
> patch  https://github.com/Gnucash/gnucash/pull/329 incorporated I am not no
> longer failing on the GTEST or GMOCK checks and cmake is completing
> successfully.
> 
> Make is now failing in the build as follows in building the scm-core-utils
> after having succeeded in building everything down to the scm-gnc-module
> .
> .
> .
> Scanning dependencies of target scm-core-utils
> [ 30%] Generating ../../lib/gnucash/scm/ccache/2.0/gnucash/core-utils.go
> Backtrace:
> In srfi/srfi-1.scm:
> 619: 19 [for-each #
> #]
> In scripts/compile.scm:
> 182: 18 [#
> "/home/david/Applications/gnucash-3.0/libgnucash/core-utils/core-utils.scm"]
> In system/base/target.scm:
>  59: 17 [with-target "x86_64-pc-linux-gnu" ...]
> In system/base/compile.scm:
> 150: 16 [compile-file
> "/home/david/Applications/gnucash-3.0/libgnucash/core-utils/core-utils.scm"
> ...]
>  43: 15 [call-once #]
> In ice-9/boot-9.scm:
> 171: 14 [with-throw-handler #t ...]
> In system/base/compile.scm:
>  59: 13 [#]
> 153: 12 [#
> #]
> 216: 11 [read-and-compile # #:from ...]
> 232: 10 [lp (# # # # ...) # #]
> 180: 9 [lp # # # ...]
> In ice-9/boot-9.scm:
> 2401: 8 [save-module-excursion # language/scheme/compile-tree-il.scm:29:3 ()>]
> In language/scheme/compile-tree-il.scm:
>  31: 7 [# ()>]
> In ice-9/psyntax.scm:
> 1106: 6 [expand-top-sequence ((re-export gnc-build-userdata-path)) () ...]
> 989: 5 [scan ((re-export gnc-build-userdata-path)) () ...]
> 279: 4 [scan ((# #)) () (()) ...]
> In ice-9/boot-9.scm:
> 2094: 3 [call-with-deferred-observers # ice-9/eval.scm:416:20 ()>]
> 768: 2 [for-each # #]
> In unknown file:
>   ?: 1 [scm-error misc-error #f ...]
> In ice-9/boot-9.scm:
> 106: 0 [#
> misc-error ...]
> 
> ice-9/boot-9.scm:106:20: In procedure # ice-9/boot-9.scm:97:6 (thrown-k . args)>:
> ice-9/boot-9.scm:106:20: Undefined variable: gnc-build-userdata-path
> libgnucash/core-utils/CMakeFiles/scm-core-utils.dir/build.make:61: recipe
> for target 'lib/gnucash/scm/ccache/2.0/gnucash/core-utils.go' failed
> make[2]: *** [lib/gnucash/scm/ccache/2.0/gnucash/core-utils.go] Error 1
> CMakeFiles/Makefile2:3770: recipe for target
> 'libgnucash/core-utils/CMakeFiles/scm-core-utils.dir/all' failed
> make[1]: *** [libgnucash/core-utils/CMakeFiles/scm-core-utils.dir/all] Error
> 2
> Makefile:160: recipe for target 'all' failed
> make: *** [all] Error 2

Every instance of that error so far is because the wrong source-path is passed 
to cmake.
If you create a build directory in the top source dir, cd to it, and say 
   cmake  ../gnucash
cmake will start with the CMakeLists.txt in the gnucash subdirectory, from 
which it can’t see the common/cmake_modules directory. The solution is to do
  cmake  ..
instead.

Regards,
John Ralls
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Gnucash-3.0 build error: GTEST not found

2018-04-10 Thread DaveC49
Hi John,

I now seem to have googlemock and googletest installed correctly. With the
patch  https://github.com/Gnucash/gnucash/pull/329 incorporated I am not no
longer failing on the GTEST or GMOCK checks and cmake is completing
successfully.

Make is now failing in the build as follows in building the scm-core-utils
after having succeeded in building everything down to the scm-gnc-module
.
.
.
Scanning dependencies of target scm-core-utils
[ 30%] Generating ../../lib/gnucash/scm/ccache/2.0/gnucash/core-utils.go
Backtrace:
In srfi/srfi-1.scm:
 619: 19 [for-each #
#]
In scripts/compile.scm:
 182: 18 [#
"/home/david/Applications/gnucash-3.0/libgnucash/core-utils/core-utils.scm"]
In system/base/target.scm:
  59: 17 [with-target "x86_64-pc-linux-gnu" ...]
In system/base/compile.scm:
 150: 16 [compile-file
"/home/david/Applications/gnucash-3.0/libgnucash/core-utils/core-utils.scm"
...]
  43: 15 [call-once #]
In ice-9/boot-9.scm:
 171: 14 [with-throw-handler #t ...]
In system/base/compile.scm:
  59: 13 [#]
 153: 12 [#
#]
 216: 11 [read-and-compile # #:from ...]
 232: 10 [lp (# # # # ...) # #]
 180: 9 [lp # # # ...]
In ice-9/boot-9.scm:
2401: 8 [save-module-excursion #]
In language/scheme/compile-tree-il.scm:
  31: 7 [#]
In ice-9/psyntax.scm:
1106: 6 [expand-top-sequence ((re-export gnc-build-userdata-path)) () ...]
 989: 5 [scan ((re-export gnc-build-userdata-path)) () ...]
 279: 4 [scan ((# #)) () (()) ...]
In ice-9/boot-9.scm:
2094: 3 [call-with-deferred-observers #]
 768: 2 [for-each # #]
In unknown file:
   ?: 1 [scm-error misc-error #f ...]
In ice-9/boot-9.scm:
 106: 0 [#
misc-error ...]

ice-9/boot-9.scm:106:20: In procedure #:
ice-9/boot-9.scm:106:20: Undefined variable: gnc-build-userdata-path
libgnucash/core-utils/CMakeFiles/scm-core-utils.dir/build.make:61: recipe
for target 'lib/gnucash/scm/ccache/2.0/gnucash/core-utils.go' failed
make[2]: *** [lib/gnucash/scm/ccache/2.0/gnucash/core-utils.go] Error 1
CMakeFiles/Makefile2:3770: recipe for target
'libgnucash/core-utils/CMakeFiles/scm-core-utils.dir/all' failed
make[1]: *** [libgnucash/core-utils/CMakeFiles/scm-core-utils.dir/all] Error
2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

Thanks David




-
David Cousens
--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-Dev-f1435356.html
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Gnucash-3.0 build error: GTEST not found

2018-04-09 Thread John Ralls


> On Apr 8, 2018, at 11:56 PM, DaveC49  wrote:
> 
> Thanks John,
> 
> I did clone the googletest-master at https://github.com/google/googletest
> which has gmock incorporated. I will try pointing GMOCK_ROOT and GTEST_ROOT
> at the copies within my user directory that I  installed it from as a shared
> library in usr/local. I will also check the permissions on the shared
> library to see if that is what is causing a problem.  
> 
> I will incorporate the patch https://github.com/Gnucash/gnucash/pull/329
> into the existing code and use v1.8.0 from now on. I have not found a
> successful description on the ubuntu and linux mint forums for how to
> properly install google test as a shared library. The readme under
> googletest on github still describes the setup for v 1.7.0. I had changed
> the install to put the libraries and includes in what seemed like
> appropriate locations under /usr/local.
> 
> I would have got further today but unfortunately the weather here was
> magnificent so I opted for fishing from my kayak instead but I will get back
> to it tonight

The Googletest documentation says that one should not build google test or 
google mock as shared libraries, and our build system prefers it that way. Some 
distros insist that one should anyway because they don’t want to be 
distributing source, I suppose. If you already have a source clone then just 
point GTEST_ROOT and GMOCK_ROOT at the appropriate subdirectories in it and be 
done with it. 

Regards,
John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Gnucash-3.0 build error: GTEST not found

2018-04-09 Thread DaveC49
Thanks John,

I did clone the googletest-master at https://github.com/google/googletest
which has gmock incorporated. I will try pointing GMOCK_ROOT and GTEST_ROOT
at the copies within my user directory that I  installed it from as a shared
library in usr/local. I will also check the permissions on the shared
library to see if that is what is causing a problem.  

I will incorporate the patch https://github.com/Gnucash/gnucash/pull/329
into the existing code and use v1.8.0 from now on. I have not found a
successful description on the ubuntu and linux mint forums for how to
properly install google test as a shared library. The readme under
googletest on github still describes the setup for v 1.7.0. I had changed
the install to put the libraries and includes in what seemed like
appropriate locations under /usr/local.

I would have got further today but unfortunately the weather here was
magnificent so I opted for fishing from my kayak instead but I will get back
to it tonight

Cheers

David



-
David Cousens
--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-Dev-f1435356.html
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Gnucash-3.0 build error: GTEST not found

2018-04-08 Thread John Ralls


> On Apr 7, 2018, at 11:12 PM, DaveC49  wrote:
> 
> Hi,
> 
> I am past the initial problem but I appear to be having a problem with GTEST
> not being found. I have gtest 1.8.0 intsalled  and I have also uninstalled
> it and reinstalled 1.7.0 from the ubuntu repository with the same result:
> $ cmake -D CMAKE_INSTALL_PREFIX=/usr/local/gnucash -D WITH_AQBANKING=OFF ../
> -- Using guile-2.0.x
> -- Using guile SRFI-64
> -- Checking for GTEST
> CMake Error at common/cmake_modules/GncAddTest.cmake:145 (MESSAGE):
>  GTEST not found.  Please install it or set GTEST_ROOT or GMOCK_ROOT
> Call Stack (most recent call first):
>  CMakeLists.txt:596 (GNC_GTEST_CONFIGURE)
> 
> 
> -- Configuring incomplete, errors occurred!
> See also
> "/home/david/Applications/gnucash-3.0/build-cmake/CMakeFiles/CMakeOutput.log".
> See also
> "/home/david/Applications/gnucash-3.0/build-cmake/CMakeFiles/CMakeError.log".
> 
> I am using build-cmake under the gnucash-3.0 directory.  I have
> GTEST_ROOT="/usr/local" and GMOCK_ROOT="/usr/local".  The gtest and gmock
> files are installed as follows:
> /usr/local/include/gtest/gtest.h  and other gtest includes'
> /usr/local/include/gmock/gmock.h and other gmock includes
> /usr/local/lib/libgmock.a
> /usr/local/lib/libgmock_main.a
> /usr/local/lib/libgtest.a
> /usr/local/lib/libgtest_main.a
> 
> I have also built and had the 
> /usr/local/lib/libgmock.so
> /usr/local/lib/libgmock_main.so
> /usr/local/lib/libgtest.so
> /usr/local/lib/libgtest_main.so
> 
> files installed without any success.
> 
> The  /usr/src contains these files which are from the distros v 1.7.0
> installation
> /usr/src/gmock
> /usr/src/gtest
> 
> I opened GncAddTest.cmake which fails at line 145 and looked at the
> GNC_GTEST_CONFIGURE function.
> 
> The FIND_PATH(GTEST_INCLUDE_DIR gtest/gtest.h  should  find gtest.h in
> /usr/local/include/gtest/gtest.h using the PATH ${GTEST_ROOT}/include =>
> GTEST_INCLUDE_DIR is TRUE
> 
> FIND_PATH(GTEST_SRC_DIR src/gtest_all.cc  should find gtest_all.cc in 
> /usr/src/gtest/src/gtest-all.cc using the PATH using the PATH /usr/src/gtest
> even though these are the v1.7.0 files found. => GTEST_SRC_DIR is TRUE
> 
> FIND_LIBRARY(GTEST_SHARED_LIB gtest)  I am not sure whether this will or
> will not find /usr/local/lib/libgtest.a
> 
> and whether FIND_LIBRARY(GTEST_MAIN_LIB gtest_main) is finding
> /usr/local/lib/libgtest_main.a
> 
> The Documentation for the CMake FIND_LIBRARY function indicates that the
> name supplied as the argument is what the function searches for. From what 
> can understand it will search paths specified in the 
> PATH and LIB environment variables.
> These are respectively:
> $ echo $PATH
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin
> $ echo $LIB
> /usr/include:/usr/local/include
> 
> but the same error still occurs.  My conclusion is that the
> GNC_GTEST_CONFIGURE should be searching for libgtest rather than gtest or
> perhaps for both if some installations name the library gtest rather than
> libgtest.
> 
> If anyone has any insights or suggestions please let me know. My next step
> is to generate a test Cmake setup to experiment with the FIND_LIBRARY
> function and also test the other searches done. This may take me a while
> since I am still getting to grips with CMake. The Cmake output and error
> files are attached if anyone can make more sense of them than I can
> CMakeError.log
>   
> CMakeOutput.log
>    .

If you just want to get GnuCash built the quickest path is to clone 
https://github.com/google/googletest  and 
set GTEST_ROOT=/path/to/googletest/googletest and 
GMOCK_ROOT=/path/to/googletest/googlemock.

Now if you want to get things fixed up so that it builds with the shared 
libraries, you’ll need to apply https://github.com/Gnucash/gnucash/pull/329 
 or wait for us to merge it. That 
won’t work with googletest-1.7.0. 

$PATH is searched for libraries only on Windows, but $LIB *should* work on 
Ubuntu. Have you examined CMakeOutput.log and CMakeErrors.log for the actual 
errors, or CMakeCache.txt to see which GTEST variables are set and which are 
NOTFOUND?

Regards,
John Ralls
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


[GNC-dev] Gnucash-3.0 build error: GTEST not found

2018-04-08 Thread DaveC49
Hi,

I am past the initial problem but I appear to be having a problem with GTEST
not being found. I have gtest 1.8.0 intsalled  and I have also uninstalled
it and reinstalled 1.7.0 from the ubuntu repository with the same result:
$ cmake -D CMAKE_INSTALL_PREFIX=/usr/local/gnucash -D WITH_AQBANKING=OFF ../
-- Using guile-2.0.x
-- Using guile SRFI-64
-- Checking for GTEST
CMake Error at common/cmake_modules/GncAddTest.cmake:145 (MESSAGE):
  GTEST not found.  Please install it or set GTEST_ROOT or GMOCK_ROOT
Call Stack (most recent call first):
  CMakeLists.txt:596 (GNC_GTEST_CONFIGURE)


-- Configuring incomplete, errors occurred!
See also
"/home/david/Applications/gnucash-3.0/build-cmake/CMakeFiles/CMakeOutput.log".
See also
"/home/david/Applications/gnucash-3.0/build-cmake/CMakeFiles/CMakeError.log".

I am using build-cmake under the gnucash-3.0 directory.  I have
GTEST_ROOT="/usr/local" and GMOCK_ROOT="/usr/local".  The gtest and gmock
files are installed as follows:
/usr/local/include/gtest/gtest.h  and other gtest includes'
/usr/local/include/gmock/gmock.h and other gmock includes
/usr/local/lib/libgmock.a
/usr/local/lib/libgmock_main.a
/usr/local/lib/libgtest.a
/usr/local/lib/libgtest_main.a

I have also built and had the 
/usr/local/lib/libgmock.so
/usr/local/lib/libgmock_main.so
/usr/local/lib/libgtest.so
/usr/local/lib/libgtest_main.so

files installed without any success.

The  /usr/src contains these files which are from the distros v 1.7.0
installation
/usr/src/gmock
/usr/src/gtest

I opened GncAddTest.cmake which fails at line 145 and looked at the
GNC_GTEST_CONFIGURE function.

The FIND_PATH(GTEST_INCLUDE_DIR gtest/gtest.h  should  find gtest.h in
/usr/local/include/gtest/gtest.h using the PATH ${GTEST_ROOT}/include =>
GTEST_INCLUDE_DIR is TRUE

FIND_PATH(GTEST_SRC_DIR src/gtest_all.cc  should find gtest_all.cc in 
/usr/src/gtest/src/gtest-all.cc using the PATH using the PATH /usr/src/gtest
even though these are the v1.7.0 files found. => GTEST_SRC_DIR is TRUE

FIND_LIBRARY(GTEST_SHARED_LIB gtest)  I am not sure whether this will or
will not find /usr/local/lib/libgtest.a

and whether FIND_LIBRARY(GTEST_MAIN_LIB gtest_main) is finding
/usr/local/lib/libgtest_main.a

The Documentation for the CMake FIND_LIBRARY function indicates that the
name supplied as the argument is what the function searches for. From what 
can understand it will search paths specified in the 
PATH and LIB environment variables.
These are respectively:
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin
$ echo $LIB
/usr/include:/usr/local/include

but the same error still occurs.  My conclusion is that the
GNC_GTEST_CONFIGURE should be searching for libgtest rather than gtest or
perhaps for both if some installations name the library gtest rather than
libgtest.

If anyone has any insights or suggestions please let me know. My next step
is to generate a test Cmake setup to experiment with the FIND_LIBRARY
function and also test the other searches done. This may take me a while
since I am still getting to grips with CMake. The Cmake output and error
files are attached if anyone can make more sense of them than I can
CMakeError.log
  
CMakeOutput.log
   .

Thanks in advance

David






-
David Cousens
--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-Dev-f1435356.html
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel