[GNC-dev] GnuCash 3 on Linux
John Ralls
jralls at ceridwen.us
Sat Jun 9 16:13:27 EDT 2018
> On 9. Jun 2018, at 00:17, Chris Good <goodchris96 at gmail.com> wrote:
>
> Hi John,
>
> Thanks very much for your help.
> A little more please...
>
> On my Ubuntu 16.04:
>
> sudo apt-get update -qq
> sudo apt-get build-dep -qq gnucash > /dev/null
> sudo apt-get install -qq git bash-completion cmake make swig xsltproc
> libdbd-sqlite3 texinfo ninja-build libboost-all-dev libgtk-3-dev
> libwebkit2gtk-3.0-dev > /dev/null
> sudo apt-get --reinstall install -qq language-pack-en language-pack-fr
> cd /home/cgood/github
> git clone https://github.com/google/googletest -b release-1.8.0 gtest
> (created /home/cgood/github/gtest)
>
> cd /home/cgood/github/gnucash-maint
> git checkout maint
> git pull --rebase upstream maint
> git push origin maint
>
> /home/cgood/github/gnucash-maint/README.dependencies :
> guile 2.2.0 or 2.0.0
> googletest 1.7.0
>
> As 'make uninstall' didn't work from my 2.6.21 git repo:
> cd /home/cgood/github/gnucash-maint-install
> rm -r *
>
> cd /home/cgood/github/gnucash-maint-build
> rm -r *
> cmake -G Ninja -D CMAKE_INSTALL_PREFIX=$HOME/github/gnucash-maint-install -D
> WITH_AQBANKING=OFF \
> -D WITH_OFX=OFF -DGTEST_ROOT=$HOME/github/gtest/googletest
> -DGMOCK_ROOT=$HOME/cgood/github/gtest/googlemock \
> ../gnucash-maint
>
> ninja
> [5/892] Generating ../../lib/gnucash/scm/ccache/2.0/json.go
> wrote
> `/home/cgood/github/gnucash-maint-build/lib/gnucash/scm/ccache/2.0/json.go'
> [22/892] Generating ../../../lib/gnucash/scm/ccache/2.0/json/syntax.go
> wrote
> `/home/cgood/github/gnucash-maint-build/lib/gnucash/scm/ccache/2.0/json/synt
> ax.go'
> [25/892] Generating ../../../lib/gnucash/scm/ccache/2.0/json/parser.go
> wrote
> `/home/cgood/github/gnucash-maint-build/lib/gnucash/scm/ccache/2.0/json/pars
> er.go'
> [28/892] Generating ../../../lib/gnucash/scm/ccache/2.0/json/builder.go
> wrote
> `/home/cgood/github/gnucash-maint-build/lib/gnucash/scm/ccache/2.0/json/buil
> der.go'
> [120/892] Building CXX object
> common/test-core/CMakeFiles/gtest.dir/home/cgood/github/gtest/googletest/src
> /gtest-all.cc.o
> FAILED: /usr/bin/c++ -DHAVE_CONFIG_H -DHAVE_GUILE20 -Icommon
> -I/home/cgood/github/gnucash-maint/common
> -I/home/cgood/github/gnucash-maint/libgnucash/engine
> -I/home/cgood/github/gnucash-maint/common/test-core -I/usr/include/glib-2.0
> -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/guile/2.0
> -I/home/cgood/github/gtest/googletest -Werror -Wall -Wmissing-declarations
> -Wno-unused -Wno-error=parentheses -std=gnu++11 -Wno-missing-declarations
> -MMD -MT
> common/test-core/CMakeFiles/gtest.dir/home/cgood/github/gtest/googletest/src
> /gtest-all.cc.o -MF
> common/test-core/CMakeFiles/gtest.dir/home/cgood/github/gtest/googletest/src
> /gtest-all.cc.o.d -o
> common/test-core/CMakeFiles/gtest.dir/home/cgood/github/gtest/googletest/src
> /gtest-all.cc.o -c /home/cgood/github/gtest/googletest/src/gtest-all.cc
> In file included from
> /home/cgood/github/gtest/googletest/src/gtest-all.cc:42:0:
> /home/cgood/github/gtest/googletest/src/gtest.cc:35:41: fatal error:
> gtest/internal/custom/gtest.h: No such file or directory
> compilation terminated.
> [120/892] Building CXX object
> common/test-core/CMakeFiles/gmock.dir/home/cgood/github/gtest/googlemock/src
> /gmock-all.cc.o
> FAILED: /usr/bin/c++ -DHAVE_CONFIG_H -DHAVE_GUILE20 -Icommon
> -I/home/cgood/github/gnucash-maint/common
> -I/home/cgood/github/gnucash-maint/libgnucash/engine
> -I/home/cgood/github/gnucash-maint/common/test-core -I/usr/include/glib-2.0
> -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/guile/2.0
> -I/home/cgood/github/gtest/googletest -I/home/cgood/github/gtest/googlemock
> -Werror -Wall -Wmissing-declarations -Wno-unused -Wno-error=parentheses
> -std=gnu++11 -Wno-missing-declarations -MMD -MT
> common/test-core/CMakeFiles/gmock.dir/home/cgood/github/gtest/googlemock/src
> /gmock-all.cc.o -MF
> common/test-core/CMakeFiles/gmock.dir/home/cgood/github/gtest/googlemock/src
> /gmock-all.cc.o.d -o
> common/test-core/CMakeFiles/gmock.dir/home/cgood/github/gtest/googlemock/src
> /gmock-all.cc.o -c /home/cgood/github/gtest/googlemock/src/gmock-all.cc
> In file included from
> /home/cgood/github/gtest/googlemock/src/gmock-all.cc:46:0:
> /home/cgood/github/gtest/googlemock/src/gmock-spec-builders.cc:339:1: error:
> prototype for 'testing::internal::UntypedActionResultHolderBase*
> testing::internal::UntypedFunctionMockerBase::UntypedInvokeWith(const
> void*)' does not match any in class
> 'testing::internal::UntypedFunctionMockerBase'
> UntypedFunctionMockerBase::UntypedInvokeWith(const void* const
> untyped_args)
> ^
> In file included from
> /usr/include/gmock/gmock-generated-function-mockers.h:43:0,
> from /usr/include/gmock/gmock.h:61,
> from
> /home/cgood/github/gtest/googlemock/src/gmock-all.cc:40:
> /usr/include/gmock/gmock-spec-builders.h:214:40: error: candidate is: const
> testing::internal::UntypedActionResultHolderBase*
> testing::internal::UntypedFunctionMockerBase::UntypedInvokeWith(const void*)
> const UntypedActionResultHolderBase* UntypedInvokeWith(
> ^
> ninja: build stopped: subcommand failed.
>
> find ../gtest -name gtest.h
> ../gtest/googletest/include/gtest/internal/custom/gtest.h
> ../gtest/googletest/include/gtest/gtest.h
Chris,
There's an include argument missing from the compile instructions:
-I/home/cgood/github/gtest/googletest/include
Grep CMakeCache.txt for GTEST_INCLUDE_DIR. It should return
GTEST_INCLUDE_DIR:PATH=/home/cgood/github/gtest/googletest/include
GTEST_INCLUDE_DIR is passed to target_include_directories() at common/test-core/CMakeLists.txt line 79.
If GTEST_INCLUDE_DIR isn't set cmake should fail, complaining that it can't find googletest. You'll need to examine the CMake logs to see why it's not getting included.
Regards,
John Ralls
More information about the gnucash-devel
mailing list