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

John Ralls jralls at ceridwen.us
Tue Apr 10 10:22:29 EDT 2018



> On Apr 9, 2018, at 11:44 PM, DaveC49 <davidcousens at bigpond.com> 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 #<procedure 2018800 at scripts/compile.scm:179:14 (file)>
> #]
> In scripts/compile.scm:
> 182: 18 [#<procedure 2018800 at scripts/compile.scm:179:14 (file)>
> "/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 #<procedure 20e5a40 at system/base/compile.scm:56:5 ()>]
> In ice-9/boot-9.scm:
> 171: 14 [with-throw-handler #t ...]
> In system/base/compile.scm:
>  59: 13 [#<procedure 20e5a00 at system/base/compile.scm:58:9 ()>]
> 153: 12 [#<procedure 20e5a80 at system/base/compile.scm:151:8 (port)>
> #<closed: file 0>]
> 216: 11 [read-and-compile #<input: core-utils.scm 5> #:from ...]
> 232: 10 [lp (# # # # ...) #<directory # 22a4480> #<directory # 22a4480>]
> 180: 9 [lp # # # ...]
> In ice-9/boot-9.scm:
> 2401: 8 [save-module-excursion #<procedure 23c1f90 at
> language/scheme/compile-tree-il.scm:29:3 ()>]
> In language/scheme/compile-tree-il.scm:
>  31: 7 [#<procedure 23c1f90 at language/scheme/compile-tree-il.scm:29:3
> ()>]
> 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 #<procedure 23c16f0 at
> ice-9/eval.scm:416:20 ()>]
> 768: 2 [for-each #<procedure 23c16c0 at ice-9/boot-9.scm:3725:14 (name)> #]
> In unknown file:
>   ?: 1 [scm-error misc-error #f ...]
> In ice-9/boot-9.scm:
> 106: 0 [#<procedure 20e59c0 at ice-9/boot-9.scm:97:6 (thrown-k . args)>
> misc-error ...]
> 
> ice-9/boot-9.scm:106:20: In procedure #<procedure 20e59c0 at
> 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 <options> ../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 <options> ..
instead.

Regards,
John Ralls


More information about the gnucash-devel mailing list