[GNC-dev] GnuCash 3 on Linux

classic Classic list List threaded Threaded
85 messages Options
12345
Reply | Threaded
Open this post in threaded view
|

[GNC-dev] GnuCash 3 on Linux

ChrisGood
Hi,

 

I'm working on my BackupGnuCash stand-alone app.

 

I have 2 questions today:

 

1.

I'm a little uncertain about where the saved reports and metadata files are
in GnuCash 3.0 for Linux.

I suspect they are by default:

~/.local/share/gnucash/saved-reports-2.4

~/.local/share/gnucash/books/[BOOK].gnucash.gcm

unless overridden by XDG_DATA_HOME.

 

Can some-one please confirm?

 

2.

I tried to get version 3 on Linux (Ubuntu 16.04) running to test myself.

I found gnucash_3.0-1 at the Debian Archive [1] but when I tried to install
it,

the following packages were not available:

 

guile-2.2-libs is only available for bionic (18.04LTS) -> 18.10

libaqbanking35 is available in 16.04 -> 18.10

libboost-*.62.0 only available in 17.10 -> 18.10

libgtk-3-0 (>= 3.21.5) only available on 17.10 -> 18.10

libgwenhywfar60 (>= 3.99.16) available on 14.04 -> 18.10

libicu57 (>= 57.1- only available on 17.10

 

Looks like I should upgrade to 18.04 (I mostly only use this VM for testing
GnuCash) or is there an easy way to install the required packages without
overriding the standard packages? I guess on 16.04, I could compile the new
package versions to /usr/local?

 

Maybe I should upgrade to 18.04 then try to build from gnucash maint source?

 

I'm a little worried the Debian Archive 3.0-1 was built on a system with a
not easily reproducible mixture of package versions. I cannot find any
documentation saying what you need to run it.

 

The https://wiki.gnucash.org/wiki/BuildUbuntu16.04 page mentions only
guile-2.0 not guile-2.2.

Does the current gnucash maint build OK on Ubuntu 18.04?

 

[1] http://ftp.us.debian.org/debian/pool/main/g/gnucash/

 

Thanks in advance,

 

Regards, Chris Good

 

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] GnuCash 3 on Linux

John Ralls-2


> On Jun 5, 2018, at 5:53 AM, Chris Good <[hidden email]> wrote:
>
> Hi,
>
>
>
> I'm working on my BackupGnuCash stand-alone app.
>
>
>
> I have 2 questions today:
>
>
>
> 1.
>
> I'm a little uncertain about where the saved reports and metadata files are
> in GnuCash 3.0 for Linux.
>
> I suspect they are by default:
>
> ~/.local/share/gnucash/saved-reports-2.4
>
> ~/.local/share/gnucash/books/[BOOK].gnucash.gcm
>
> unless overridden by XDG_DATA_HOME.
>
>
>
> Can some-one please confirm?
>
>
>
> 2.
>
> I tried to get version 3 on Linux (Ubuntu 16.04) running to test myself.
>
> I found gnucash_3.0-1 at the Debian Archive [1] but when I tried to install
> it,
>
> the following packages were not available:
>
>
>
> guile-2.2-libs is only available for bionic (18.04LTS) -> 18.10
>
> libaqbanking35 is available in 16.04 -> 18.10
>
> libboost-*.62.0 only available in 17.10 -> 18.10
>
> libgtk-3-0 (>= 3.21.5) only available on 17.10 -> 18.10
>
> libgwenhywfar60 (>= 3.99.16) available on 14.04 -> 18.10
>
> libicu57 (>= 57.1- only available on 17.10
>
>
>
> Looks like I should upgrade to 18.04 (I mostly only use this VM for testing
> GnuCash) or is there an easy way to install the required packages without
> overriding the standard packages? I guess on 16.04, I could compile the new
> package versions to /usr/local?
>
>
>
> Maybe I should upgrade to 18.04 then try to build from gnucash maint source?
>
>
>
> I'm a little worried the Debian Archive 3.0-1 was built on a system with a
> not easily reproducible mixture of package versions. I cannot find any
> documentation saying what you need to run it.
>
>
>
> The https://wiki.gnucash.org/wiki/BuildUbuntu16.04 page mentions only
> guile-2.0 not guile-2.2.
>
> Does the current gnucash maint build OK on Ubuntu 18.04?
>
>
>
> [1] http://ftp.us.debian.org/debian/pool/main/g/gnucash/
>

Chris,

Our Travis CI tests on Ubuntu 14.04 so it should work on any Ubuntu later than that. You can copy-and-paste the apt-get and git clone commands from https://github.com/Gnucash/gnucash/blob/maint/util/ci/ubuntu-14.04-docker <https://github.com/Gnucash/gnucash/blob/maint/util/ci/ubuntu-14.04-docker> to get a ready-to-go build environment.

Regards,
John Ralls


_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] GnuCash 3 on Linux

Geert Janssens-4
In reply to this post by ChrisGood
Op dinsdag 5 juni 2018 14:53:44 CEST schreef Chris Good:

> Hi,
>
>
>
> I'm working on my BackupGnuCash stand-alone app.
>
>
>
> I have 2 questions today:
>
>
>
> 1.
>
> I'm a little uncertain about where the saved reports and metadata files are
> in GnuCash 3.0 for Linux.
>
> I suspect they are by default:
>
> ~/.local/share/gnucash/saved-reports-2.4
 2.8, not 2.4. If not 2.8 file is found, gnucash 3 and up will search for a
saved-reports-2.4, but it will only save to saved-reports-2.8.
>
> ~/.local/share/gnucash/books/[BOOK].gnucash.gcm
>

Yes. Do note it can be [BOOK].gnucash_<number>.gcm if you have several data
files named [BOOK]. And the gnucash part in that file name is only there if
the data file is called [BOOK].gnucash. Older versions of gnucash also allowed
to save to files without extension or with the .xac extension.
So it's really [BOOK-WITH-EXTENSION]<optional _NUMBER>.gcm

> unless overridden by XDG_DATA_HOME.
>
If you override XDG_DATA_HOME the files will be searched for and saved in
$XDG_DATA_HOME/gnucash/

However this can be overridden even with GNC_DATA_HOME. If that's set, gnucash
will search and save in
$GNC_DATA_HOME (which may or may not end in "/gnucash" unlike the
XDG_DATA_HOME to which gnucash will always append "/gnucash")

Regards,

Geert


_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] GnuCash 3 on Linux

ChrisGood
In reply to this post by ChrisGood
> Message: 4
> Date: Tue, 5 Jun 2018 06:47:55 -0700
> From: John Ralls <[hidden email]>
> To: Chris Good <[hidden email]>
> Cc: [hidden email]
> Subject: Re: [GNC-dev] GnuCash 3 on Linux
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=us-ascii
>
>
> > On Jun 5, 2018, at 5:53 AM, Chris Good <[hidden email]> wrote:
> >
> > Hi,
> >
> > I'm working on my BackupGnuCash stand-alone app.
> >
> > I have 2 questions today:
> >
> > 1.
> >
> > I'm a little uncertain about where the saved reports and metadata
> > files are in GnuCash 3.0 for Linux.
> >
> > I suspect they are by default:
> >
> > ~/.local/share/gnucash/saved-reports-2.4
> >
> > ~/.local/share/gnucash/books/[BOOK].gnucash.gcm
> >
> > unless overridden by XDG_DATA_HOME.
> >
> > Can some-one please confirm?
> >
> > 2.
> >
> > I tried to get version 3 on Linux (Ubuntu 16.04) running to test myself.
> >
> > I found gnucash_3.0-1 at the Debian Archive [1] but when I tried to
> > install it,
> >
> > the following packages were not available:
> >
> >
> > guile-2.2-libs is only available for bionic (18.04LTS) -> 18.10
> > libaqbanking35 is available in 16.04 -> 18.10
> > libboost-*.62.0 only available in 17.10 -> 18.10
> > libgtk-3-0 (>= 3.21.5) only available on 17.10 -> 18.10
> > libgwenhywfar60 (>= 3.99.16) available on 14.04 -> 18.10
> > libicu57 (>= 57.1- only available on 17.10
> >
> > Looks like I should upgrade to 18.04 (I mostly only use this VM for
> > testing
> > GnuCash) or is there an easy way to install the required packages
> > without overriding the standard packages? I guess on 16.04, I could
> > compile the new package versions to /usr/local?
> >
> > Maybe I should upgrade to 18.04 then try to build from gnucash maint
source?

> >
> > I'm a little worried the Debian Archive 3.0-1 was built on a system
> > with a not easily reproducible mixture of package versions. I cannot
> > find any documentation saying what you need to run it.
> >
> > The https://wiki.gnucash.org/wiki/BuildUbuntu16.04 page mentions only
> > guile-2.0 not guile-2.2.
> >
> > Does the current gnucash maint build OK on Ubuntu 18.04?
> >
> > [1] http://ftp.us.debian.org/debian/pool/main/g/gnucash/
>
> Chris,
>
> Our Travis CI tests on Ubuntu 14.04 so it should work on any Ubuntu later
than
> that. You can copy-and-paste the apt-get and git clone commands from
> https://github.com/Gnucash/gnucash/blob/maint/util/ci/ubuntu-14.04-docker
> <https://github.com/Gnucash/gnucash/blob/maint/util/ci/ubuntu-14.04-
> docker> to get a ready-to-go build environment.
>
> Regards,
> John Ralls
>
> ------------------------------

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

Regards, Chris Good

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] GnuCash 3 on Linux

John Ralls-2


> On 9. Jun 2018, at 00:17, Chris Good <[hidden email]> 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



_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] GnuCash 3 on Linux

ChrisGood
> -----Original Message-----
> From: John Ralls <[hidden email]>
> Sent: Sunday, 10 June 2018 6:13 AM
> To: Chris Good <[hidden email]>
> Cc: [hidden email]
> Subject: Re: [GNC-dev] GnuCash 3 on Linux
>
>
>
> > On 9. Jun 2018, at 00:17, Chris Good <[hidden email]> 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/jso
> > n/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/jso
> > n/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/jso
> > n/buil
> > der.go'
> > [120/892] Building CXX object
> > common/test-core/CMakeFiles/gtest.dir/home/cgood/github/gtest/googlete
> > st/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/googlete
> > st/src
> > /gtest-all.cc.o -MF
> > common/test-core/CMakeFiles/gtest.dir/home/cgood/github/gtest/googlete
> > st/src
> > /gtest-all.cc.o.d -o
> > common/test-core/CMakeFiles/gtest.dir/home/cgood/github/gtest/googlete
> > st/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/googlemo
> > ck/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/googlemo
> > ck/src
> > /gmock-all.cc.o -MF
> > common/test-
> core/CMakeFiles/gmock.dir/home/cgood/github/gtest/googlemo
> > ck/src
> > /gmock-all.cc.o.d -o
> > common/test-
> core/CMakeFiles/gmock.dir/home/cgood/github/gtest/googlemo
> > ck/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
>
>

Hi John,

Thanks very much for your help which got me on the right direction (I
haven't tried to fix a problem with cmake or ninja before).

I couldn't find anything in the cmake logs
(gnucash-maint-build/CMakeFiles/[CMakeError.log|CMakeOutput.log])
about GTEST or gtest but I found:
gnucash-maint/common/cmake_modules/GncAddTest.cmake:

  find_path(GTEST_INCLUDE_DIR gtest/gtest.h
    PATHS ${GTEST_ROOT}/include ${GMOCK_ROOT}/gtest/include /usr/include)

grep GTEST_INCLUDE_DIR CMakeCache.txt shows:
  GTEST_INCLUDE_DIR:PATH=/usr/include

So somehow cmake find_path is not finding $GTEST_ROOT/include/gtest/gtest.h
(which does exist), but /usr/include/gtest/gtest.h which is version
1.7.0-4ubuntu1
which I installed following instructions at
https://wiki.gnucash.org/wiki/BuildUbuntu16.04#GnucCash_Dependencies.

There is no /usr/include/gtest/internal/custom/gtest.h.

As no packages depend on google-mock or libgtest-dev on my system,
I have uninstalled them, and now cmake finds the correct gtest headers
and I have successfully built gnucash.

Shouldn't cmake (3.5.1-1ubuntu1) find_path() have tried to use the first
path (using GTEST_ROOT)?
The documentation
https://cmake.org/cmake/help/v3.5/command/find_path.html?highlight=find_path
doesn't specifically say that but it seems logical to me.

Regards, Chris Good

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] GnuCash 3 on Linux

Geert Janssens-4
Op zondag 10 juni 2018 11:07:36 CEST schreef Chris Good:

> > -----Original Message-----
> > From: John Ralls <[hidden email]>
> > Sent: Sunday, 10 June 2018 6:13 AM
> > To: Chris Good <[hidden email]>
> > Cc: [hidden email]
> > Subject: Re: [GNC-dev] GnuCash 3 on Linux
> >
> > > On 9. Jun 2018, at 00:17, Chris Good <[hidden email]> 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/jso
> > > n/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/jso
> > > n/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/jso
> > > n/buil
> > > der.go'
> > > [120/892] Building CXX object
> > > common/test-core/CMakeFiles/gtest.dir/home/cgood/github/gtest/googlete
> > > st/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/googlete
> > > st/src
> > > /gtest-all.cc.o -MF
> > > common/test-core/CMakeFiles/gtest.dir/home/cgood/github/gtest/googlete
> > > st/src
> > > /gtest-all.cc.o.d -o
> > > common/test-core/CMakeFiles/gtest.dir/home/cgood/github/gtest/googlete
> > > st/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/googlemo
> >
> > > ck/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/googlemo
> >
> > > ck/src
> > > /gmock-all.cc.o -MF
> > > common/test-
> >
> > core/CMakeFiles/gmock.dir/home/cgood/github/gtest/googlemo
> >
> > > ck/src
> > > /gmock-all.cc.o.d -o
> > > common/test-
> >
> > core/CMakeFiles/gmock.dir/home/cgood/github/gtest/googlemo
> >
> > > ck/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
>
> Hi John,
>
> Thanks very much for your help which got me on the right direction (I
> haven't tried to fix a problem with cmake or ninja before).
>
> I couldn't find anything in the cmake logs
> (gnucash-maint-build/CMakeFiles/[CMakeError.log|CMakeOutput.log])
> about GTEST or gtest but I found:
> gnucash-maint/common/cmake_modules/GncAddTest.cmake:
>
>   find_path(GTEST_INCLUDE_DIR gtest/gtest.h
>     PATHS ${GTEST_ROOT}/include ${GMOCK_ROOT}/gtest/include /usr/include)
>
> grep GTEST_INCLUDE_DIR CMakeCache.txt shows:
>   GTEST_INCLUDE_DIR:PATH=/usr/include
>
> So somehow cmake find_path is not finding $GTEST_ROOT/include/gtest/gtest.h
> (which does exist), but /usr/include/gtest/gtest.h which is version
> 1.7.0-4ubuntu1
> which I installed following instructions at
> https://wiki.gnucash.org/wiki/BuildUbuntu16.04#GnucCash_Dependencies.
>
> There is no /usr/include/gtest/internal/custom/gtest.h.
>
> As no packages depend on google-mock or libgtest-dev on my system,
> I have uninstalled them, and now cmake finds the correct gtest headers
> and I have successfully built gnucash.
>
> Shouldn't cmake (3.5.1-1ubuntu1) find_path() have tried to use the first
> path (using GTEST_ROOT)?
> The documentation
> https://cmake.org/cmake/help/v3.5/command/find_path.html?highlight=find_path
> doesn't specifically say that but it seems logical to me.
>
According to the page you link to system paths are searched before directories
added via PATHS. Considering we base our search on parameters already set
(GTEST_ROOT and GMOCK_ROOT) we probably should use HINTS instead of PATHS as
directories specified with HINTS take precedence over system paths.

Can you run this experiment ? That is
- change PATHS to HINTS in the line above and the other find_path calls
further down the macro
- reinstall gtest 1.7.0
- rerun ninja
- verify it still finds your correct local googletest instead of the system
installed one.

Geert


_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] GnuCash 3 on Linux

ChrisGood
> -----Original Message-----
> From: Geert Janssens <[hidden email]>
> Sent: Sunday, 10 June 2018 8:16 PM
> To: [hidden email]
> Cc: Chris Good <[hidden email]>; 'John Ralls' <[hidden email]>
> Subject: Re: [GNC-dev] GnuCash 3 on Linux
>
> Op zondag 10 juni 2018 11:07:36 CEST schreef Chris Good:
> > > -----Original Message-----
> > > From: John Ralls <[hidden email]>
> > > Sent: Sunday, 10 June 2018 6:13 AM
> > > To: Chris Good <[hidden email]>
> > > Cc: [hidden email]
> > > Subject: Re: [GNC-dev] GnuCash 3 on Linux
> > >
> > > > On 9. Jun 2018, at 00:17, Chris Good <[hidden email]> 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
> > > > /jso
> > > > n/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
> > > > /jso
> > > > n/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
> > > > /jso
> > > > n/buil
> > > > der.go'
> > > > [120/892] Building CXX object
> > > > common/test-core/CMakeFiles/gtest.dir/home/cgood/github/gtest/goog
> > > > lete
> > > > st/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/goog
> > > > lete
> > > > st/src
> > > > /gtest-all.cc.o -MF
> > > > common/test-core/CMakeFiles/gtest.dir/home/cgood/github/gtest/goog
> > > > lete
> > > > st/src
> > > > /gtest-all.cc.o.d -o
> > > > common/test-core/CMakeFiles/gtest.dir/home/cgood/github/gtest/goog
> > > > lete
> > > > st/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/googlemo
> > >
> > > > ck/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/googlemo
> > >
> > > > ck/src
> > > > /gmock-all.cc.o -MF
> > > > common/test-
> > >
> > > core/CMakeFiles/gmock.dir/home/cgood/github/gtest/googlemo
> > >
> > > > ck/src
> > > > /gmock-all.cc.o.d -o
> > > > common/test-
> > >
> > > core/CMakeFiles/gmock.dir/home/cgood/github/gtest/googlemo
> > >
> > > > ck/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(co
> > > > nst 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(co
> > > > nst
> > >
> > > 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
> >
> > Hi John,
> >
> > Thanks very much for your help which got me on the right direction (I
> > haven't tried to fix a problem with cmake or ninja before).
> >
> > I couldn't find anything in the cmake logs
> > (gnucash-maint-build/CMakeFiles/[CMakeError.log|CMakeOutput.log])
> > about GTEST or gtest but I found:
> > gnucash-maint/common/cmake_modules/GncAddTest.cmake:
> >
> >   find_path(GTEST_INCLUDE_DIR gtest/gtest.h
> >     PATHS ${GTEST_ROOT}/include ${GMOCK_ROOT}/gtest/include
> > /usr/include)
> >
> > grep GTEST_INCLUDE_DIR CMakeCache.txt shows:
> >   GTEST_INCLUDE_DIR:PATH=/usr/include
> >
> > So somehow cmake find_path is not finding
> > $GTEST_ROOT/include/gtest/gtest.h (which does exist), but
> > /usr/include/gtest/gtest.h which is version
> > 1.7.0-4ubuntu1
> > which I installed following instructions at
> > https://wiki.gnucash.org/wiki/BuildUbuntu16.04#GnucCash_Dependencies.
> >
> > There is no /usr/include/gtest/internal/custom/gtest.h.
> >
> > As no packages depend on google-mock or libgtest-dev on my system, I
> > have uninstalled them, and now cmake finds the correct gtest headers
> > and I have successfully built gnucash.
> >
> > Shouldn't cmake (3.5.1-1ubuntu1) find_path() have tried to use the
> > first path (using GTEST_ROOT)?
> > The documentation
> > https://cmake.org/cmake/help/v3.5/command/find_path.html?highlight=fin
> > d_path doesn't specifically say that but it seems logical to me.
> >
> According to the page you link to system paths are searched before
directories
> added via PATHS. Considering we base our search on parameters already set
> (GTEST_ROOT and GMOCK_ROOT) we probably should use HINTS instead of
> PATHS as directories specified with HINTS take precedence over system
paths.
>
> Can you run this experiment ? That is
> - change PATHS to HINTS in the line above and the other find_path calls
further
> down the macro
> - reinstall gtest 1.7.0
> - rerun ninja
> - verify it still finds your correct local googletest instead of the
system installed
> one.
>
> Geert
>

Hi Geert,

Good catch!
Using HINTS instead of PATHS correctly sets GTEST_INCLUDE_DIR &
GMOCK_INCLUDE_DIR
to the local install instead of the system /usr/include paths.

I've got a maint branch to fix this. Shall I do a PR?
There are no other instances like this of PATHS being used in other .cmake
files in common/cmake_modules.
Shall I look for other instances of PATHS being used where the system path
is the last option, in all other directories, and include those in the PR?

Regards, Chris Good

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] GnuCash 3 on Linux

John Ralls-2


> On Jun 10, 2018, at 5:28 PM, Chris Good <[hidden email]> wrote:
>
>> -----Original Message-----
>> From: Geert Janssens <[hidden email]>
>> Sent: Sunday, 10 June 2018 8:16 PM
>> To: [hidden email]
>> Cc: Chris Good <[hidden email]>; 'John Ralls' <[hidden email]>
>> Subject: Re: [GNC-dev] GnuCash 3 on Linux
>>
>> Op zondag 10 juni 2018 11:07:36 CEST schreef Chris Good:
>>>> -----Original Message-----
>>>> From: John Ralls <[hidden email]>
>>>> Sent: Sunday, 10 June 2018 6:13 AM
>>>> To: Chris Good <[hidden email]>
>>>> Cc: [hidden email]
>>>> Subject: Re: [GNC-dev] GnuCash 3 on Linux
>>>>
>>>>> On 9. Jun 2018, at 00:17, Chris Good <[hidden email]> 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
>>>>> /jso
>>>>> n/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
>>>>> /jso
>>>>> n/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
>>>>> /jso
>>>>> n/buil
>>>>> der.go'
>>>>> [120/892] Building CXX object
>>>>> common/test-core/CMakeFiles/gtest.dir/home/cgood/github/gtest/goog
>>>>> lete
>>>>> st/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/goog
>>>>> lete
>>>>> st/src
>>>>> /gtest-all.cc.o -MF
>>>>> common/test-core/CMakeFiles/gtest.dir/home/cgood/github/gtest/goog
>>>>> lete
>>>>> st/src
>>>>> /gtest-all.cc.o.d -o
>>>>> common/test-core/CMakeFiles/gtest.dir/home/cgood/github/gtest/goog
>>>>> lete
>>>>> st/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/googlemo
>>>>
>>>>> ck/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/googlemo
>>>>
>>>>> ck/src
>>>>> /gmock-all.cc.o -MF
>>>>> common/test-
>>>>
>>>> core/CMakeFiles/gmock.dir/home/cgood/github/gtest/googlemo
>>>>
>>>>> ck/src
>>>>> /gmock-all.cc.o.d -o
>>>>> common/test-
>>>>
>>>> core/CMakeFiles/gmock.dir/home/cgood/github/gtest/googlemo
>>>>
>>>>> ck/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(co
>>>>> nst 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(co
>>>>> nst
>>>>
>>>> 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
>>>
>>> Hi John,
>>>
>>> Thanks very much for your help which got me on the right direction (I
>>> haven't tried to fix a problem with cmake or ninja before).
>>>
>>> I couldn't find anything in the cmake logs
>>> (gnucash-maint-build/CMakeFiles/[CMakeError.log|CMakeOutput.log])
>>> about GTEST or gtest but I found:
>>> gnucash-maint/common/cmake_modules/GncAddTest.cmake:
>>>
>>>  find_path(GTEST_INCLUDE_DIR gtest/gtest.h
>>>    PATHS ${GTEST_ROOT}/include ${GMOCK_ROOT}/gtest/include
>>> /usr/include)
>>>
>>> grep GTEST_INCLUDE_DIR CMakeCache.txt shows:
>>>  GTEST_INCLUDE_DIR:PATH=/usr/include
>>>
>>> So somehow cmake find_path is not finding
>>> $GTEST_ROOT/include/gtest/gtest.h (which does exist), but
>>> /usr/include/gtest/gtest.h which is version
>>> 1.7.0-4ubuntu1
>>> which I installed following instructions at
>>> https://wiki.gnucash.org/wiki/BuildUbuntu16.04#GnucCash_Dependencies.
>>>
>>> There is no /usr/include/gtest/internal/custom/gtest.h.
>>>
>>> As no packages depend on google-mock or libgtest-dev on my system, I
>>> have uninstalled them, and now cmake finds the correct gtest headers
>>> and I have successfully built gnucash.
>>>
>>> Shouldn't cmake (3.5.1-1ubuntu1) find_path() have tried to use the
>>> first path (using GTEST_ROOT)?
>>> The documentation
>>> https://cmake.org/cmake/help/v3.5/command/find_path.html?highlight=fin
>>> d_path doesn't specifically say that but it seems logical to me.
>>>
>> According to the page you link to system paths are searched before
> directories
>> added via PATHS. Considering we base our search on parameters already set
>> (GTEST_ROOT and GMOCK_ROOT) we probably should use HINTS instead of
>> PATHS as directories specified with HINTS take precedence over system
> paths.
>>
>> Can you run this experiment ? That is
>> - change PATHS to HINTS in the line above and the other find_path calls
> further
>> down the macro
>> - reinstall gtest 1.7.0
>> - rerun ninja
>> - verify it still finds your correct local googletest instead of the
> system installed
>> one.
>>
>> Geert
>>
>
> Hi Geert,
>
> Good catch!
> Using HINTS instead of PATHS correctly sets GTEST_INCLUDE_DIR &
> GMOCK_INCLUDE_DIR
> to the local install instead of the system /usr/include paths.
>
> I've got a maint branch to fix this. Shall I do a PR?
> There are no other instances like this of PATHS being used in other .cmake
> files in common/cmake_modules.
> Shall I look for other instances of PATHS being used where the system path
> is the last option, in all other directories, and include those in the PR?


Chris,

Sure to both!

Regards,
John Ralls
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] GnuCash 3 on Linux

ChrisGood
In reply to this post by Geert Janssens-4
-----Original Message-----
From: Geert Janssens <[hidden email]>
Sent: Wednesday, 6 June 2018 12:10 AM
To: [hidden email]
Cc: Chris Good <[hidden email]>
Subject: Re: [GNC-dev] GnuCash 3 on Linux

Op dinsdag 5 juni 2018 14:53:44 CEST schreef Chris Good:

> Hi,
>
> I'm working on my BackupGnuCash stand-alone app.
>
> I have 2 questions today:
>
> 1.
>
> I'm a little uncertain about where the saved reports and metadata
> files are in GnuCash 3.0 for Linux.
>
> I suspect they are by default:
>
> ~/.local/share/gnucash/saved-reports-2.4
 2.8, not 2.4. If not 2.8 file is found, gnucash 3 and up will search for a
saved-reports-2.4, but it will only save to saved-reports-2.8.
>
> ~/.local/share/gnucash/books/[BOOK].gnucash.gcm
>

Yes. Do note it can be [BOOK].gnucash_<number>.gcm if you have several data
files named [BOOK]. And the gnucash part in that file name is only there if
the data file is called [BOOK].gnucash. Older versions of gnucash also
allowed to save to files without extension or with the .xac extension.
So it's really [BOOK-WITH-EXTENSION]<optional _NUMBER>.gcm

> unless overridden by XDG_DATA_HOME.
>
If you override XDG_DATA_HOME the files will be searched for and saved in
$XDG_DATA_HOME/gnucash/

However this can be overridden even with GNC_DATA_HOME. If that's set,
gnucash will search and save in $GNC_DATA_HOME (which may or may not end in
"/gnucash" unlike the XDG_DATA_HOME to which gnucash will always append
"/gnucash")

Regards,

Geert

Hi Geert,

Thanks very much for the above info.
I'm afraid it has been quite a while since these emails but hopefully now I
have a chance to follow up.

I was surprised to learn about the <optional _NUMBER> part of
[BOOK-WITH-EXTENSION]<optional _NUMBER>.gcm as I have never seen this.
I did some testing in Windows & Linux and I think I realise now how it
works.

There is a guid in both the main data file and the metadata .gcm files.
For example,
In main data file:
<book:id type="guid">fe06ec827c69b29977e25a7c6c090229</book:id>

In .gcm:
BookGuid=fe06ec827c69b29977e25a7c6c090229

So when the metadata is saved, GnuCash looks for (or creates)  a .gcm file
with a BookGuid matching book:id.

It seems that when you create a new book by using File, New, the
subsequently saved main data file has a new book guid created.
However, if you create a new book by either:
1) manually copying a main data file to a different directory and/or
filename
Or
2) using File, Save As
there is no new book:id created so both books will continue to use the same
.gcm file.

I suspect there may be people who may like to have different settings for
different books but don't because they have created their new book by either
of the 1) or 2) methods above.

As the book:id guid only appears once in my main data file, I assume it may
be possible to correct this situation by:
a) save the main data file uncompressed
b) make a minor random(ish) change to the guid using a text editor (do NOT
change the length of the guid)
c) copy the old .gcm to a new .gcm (i.e. copy TEST.gnucash.gcm to
TEST.gnucash_2.gcm)
d) use a text editor to change the old guid to the new guid in the new .gcm

I'd like to document this in the wiki.
Can you please let me know if I have made any errors in my above assumptions
or forgotten anything important?

I think it would be useful if 2) above was changed so that a new book:id is
generated. Shall I raise a bug?

Regards,
Chris Good

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] GnuCash 3 on Linux

Geert Janssens-4
Op vrijdag 8 februari 2019 10:04:55 CET schreef Chris Good:

> Hi Geert,
>
> Thanks very much for the above info.
> I'm afraid it has been quite a while since these emails but hopefully now I
> have a chance to follow up.
>
> I was surprised to learn about the <optional _NUMBER> part of
> [BOOK-WITH-EXTENSION]<optional _NUMBER>.gcm as I have never seen this.
> I did some testing in Windows & Linux and I think I realise now how it
> works.
>
> There is a guid in both the main data file and the metadata .gcm files.
> For example,
> In main data file:
> <book:id type="guid">fe06ec827c69b29977e25a7c6c090229</book:id>
>
> In .gcm:
> BookGuid=fe06ec827c69b29977e25a7c6c090229
>
> So when the metadata is saved, GnuCash looks for (or creates)  a .gcm file
> with a BookGuid matching book:id.
>
Indeed.

> It seems that when you create a new book by using File, New, the
> subsequently saved main data file has a new book guid created.
> However, if you create a new book by either:
> 1) manually copying a main data file to a different directory and/or
> filename
> Or
> 2) using File, Save As
> there is no new book:id created so both books will continue to use the same
> .gcm file.
>
> I suspect there may be people who may like to have different settings for
> different books but don't because they have created their new book by either
> of the 1) or 2) methods above.
>
FTR this code is not written by me. I'm merely reading how it currently works.

That aside, it will continue to work as long as the user uses a different name
when copying the file or using File, Save As

As there haven't been any complaints so far it looks that's what most people
are doing anyway.

> As the book:id guid only appears once in my main data file, I assume it may
> be possible to correct this situation by:
> a) save the main data file uncompressed
> b) make a minor random(ish) change to the guid using a text editor (do NOT
> change the length of the guid)
> c) copy the old .gcm to a new .gcm (i.e. copy TEST.gnucash.gcm to
> TEST.gnucash_2.gcm)
> d) use a text editor to change the old guid to the new guid in the new .gcm
>
> I'd like to document this in the wiki.
> Can you please let me know if I have made any errors in my above assumptions
> or forgotten anything important?
>
I think you have all the proper details in a row.

> I think it would be useful if 2) above was changed so that a new book:id is
> generated. Shall I raise a bug?
>
I don't know. As I said, if the file name is unique there's no need to rely on
the GUID. It looks like it's fairly uncommon to want to use the same file name
for books that are not related. On the other hand I may also want to simply
copy my existing book to a new location and happen to use File, Save As to do
so. I don't think gnucash can make an assumption that either is right or
wrong.

In itself I think it's too ambiguous/insignificant to create a bug report for
it. But on the other hand I also think this is something that we could analyze
when we start revising our options/preferences system. On big aspect of this
is evaluating for each setting whether it should be book specific (like book
currency), computer specific (like saved window sizes) or user specific (like
I have no example right now...). The metadata file is really meant to store
computer specific data (though it currently does store more than that...).

Geert


_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] GnuCash 3 on Linux

ChrisGood
-----Original Message-----
From: Geert Janssens <[hidden email]>
Sent: Sunday, 10 February 2019 11:29 PM
To: [hidden email]
Cc: Chris Good <[hidden email]>
Subject: Re: [GNC-dev] GnuCash 3 on Linux

Op vrijdag 8 februari 2019 10:04:55 CET schreef Chris Good:

> Hi Geert,
>
> Thanks very much for the above info.
> I'm afraid it has been quite a while since these emails but hopefully
> now I have a chance to follow up.
>
> I was surprised to learn about the <optional _NUMBER> part of
> [BOOK-WITH-EXTENSION]<optional _NUMBER>.gcm as I have never seen this.
> I did some testing in Windows & Linux and I think I realise now how it
> works.
>
> There is a guid in both the main data file and the metadata .gcm files.
> For example,
> In main data file:
> <book:id type="guid">fe06ec827c69b29977e25a7c6c090229</book:id>
>
> In .gcm:
> BookGuid=fe06ec827c69b29977e25a7c6c090229
>
> So when the metadata is saved, GnuCash looks for (or creates)  a .gcm
> file with a BookGuid matching book:id.
>
Indeed.

> It seems that when you create a new book by using File, New, the
> subsequently saved main data file has a new book guid created.
> However, if you create a new book by either:
> 1) manually copying a main data file to a different directory and/or
> filename Or
> 2) using File, Save As
> there is no new book:id created so both books will continue to use the
> same .gcm file.
>
> I suspect there may be people who may like to have different settings
> for different books but don't because they have created their new book
> by either of the 1) or 2) methods above.
>
FTR this code is not written by me. I'm merely reading how it currently
works.

That aside, it will continue to work as long as the user uses a different
name when copying the file or using File, Save As

As there haven't been any complaints so far it looks that's what most people
are doing anyway.

> As the book:id guid only appears once in my main data file, I assume
> it may be possible to correct this situation by:
> a) save the main data file uncompressed
> b) make a minor random(ish) change to the guid using a text editor (do
> NOT change the length of the guid)
> c) copy the old .gcm to a new .gcm (i.e. copy TEST.gnucash.gcm to
> TEST.gnucash_2.gcm)
> d) use a text editor to change the old guid to the new guid in the new
> .gcm
>
> I'd like to document this in the wiki.
> Can you please let me know if I have made any errors in my above
> assumptions or forgotten anything important?
>
I think you have all the proper details in a row.

> I think it would be useful if 2) above was changed so that a new
> book:id is generated. Shall I raise a bug?
>
I don't know. As I said, if the file name is unique there's no need to rely
on the GUID. It looks like it's fairly uncommon to want to use the same file
name for books that are not related. On the other hand I may also want to
simply copy my existing book to a new location and happen to use File, Save
As to do so. I don't think gnucash can make an assumption that either is
right or wrong.

In itself I think it's too ambiguous/insignificant to create a bug report
for it. But on the other hand I also think this is something that we could
analyze when we start revising our options/preferences system. On big aspect
of this is evaluating for each setting whether it should be book specific
(like book currency), computer specific (like saved window sizes) or user
specific (like I have no example right now...). The metadata file is really
meant to store computer specific data (though it currently does store more
than that...).

Geert

Hi Geert,

Ah yes, I forgot for a minute that the book name is part of the metadata
filename, and therefore to ensure you have a metadata file specific to a
particular book, you just have to ensure you use unique names for your
books, which is what I would call 'best practice' anyway so you can always
just look at your title bar and be sure what book you are in.
I agree that using a common metadata file may be what some people want, and
the current situation allows that, so a bug is not needed.

Thanks for setting me straight,
Regards, Chris Good

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] GnuCash 3 on Linux

GnuCash - Dev mailing list
In reply to this post by ChrisGood
On 05/06/2018 13:53, Chris Good wrote:
> Hi,

Hello, Chris

> I'm working on my BackupGnuCash stand-alone app.
> I have 2 questions today:

read
https://wiki.gnucash.org/wiki/Configuration_Locations
and weep at how bad things have become

The last time i addressed this our idiots in charge were so recalcitrant
about even considering they'd done a stupid thing I stopped reading the
gnc lists.

I am glad you, someone I respect, have raised it again.

> 1.
>
> I'm a little uncertain about where the saved reports and metadata files are
> in GnuCash 3.0 for Linux.

unfortunately the people that think they know better decided to put them
where Micrsosoft, etc thought best.  That means it changes at a whim, I
am angry about this and they don't care.

I cannot make a backup policy for my charitable organizations because
our cleverer-than-thou FUCKWIT seniors just put stuff where they think
MS or Linux policy suggests they should go and never actually think for
themselves.

The files should belong to the book and be closely associated with them.

Our FUCKWITS IN CHARGE decided that the metadata belonged with the user
not the book, that makes no fucking sense for an accounting file, they
changed it anyway, grrrrr

> I suspect they are by default:
>
> ~/.local/share/gnucash/saved-reports-2.4
>
> ~/.local/share/gnucash/books/[BOOK].gnucash.gcm
>
> unless overridden by XDG_DATA_HOME.

except you can't rely on those those locations.

See the problem now?

> Can some-one please confirm?

Only thing I can confirm is I don't know where anything is.

> 2.
>
> I tried to get version 3 on Linux (Ubuntu 16.04) running to test myself.

that's the easy bit :)

> Thanks in advance,

Waves back.

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] GnuCash 3 on Linux

GnuCash - Dev mailing list
In reply to this post by Geert Janssens-4
On 05/06/2018 15:09, Geert Janssens wrote:

> If you override XDG_DATA_HOME the files will be searched for and saved in
> $XDG_DATA_HOME/gnucash/
>
> However this can be overridden even with GNC_DATA_HOME. If that's set, gnucash
> will search and save in
> $GNC_DATA_HOME (which may or may not end in "/gnucash" unlike the
> XDG_DATA_HOME to which gnucash will always append "/gnucash")

it is just a messy breakfast spread across a table rather than on a
plate, really

nothing is in one place, nothing is where one might expect it.

I am still very angry about this complete fuck up

--
Wm

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] GnuCash 3 on Linux

Colin Law
In reply to this post by GnuCash - Dev mailing list
I cannot understand why you keep using this software since it is so
obviously horribly flawed and you have such a low opinion of the
developers.

I am sure you would be a much happier person if you used one of the
many alternatives that are conveniently available.

Surely anyone who keeps using it is just encouraging these ne'r do
well developers to carry on in their recalcitrant ways and you really
owe it to yourself to stop using it in order to show how disgusted you
are.  That'll show the F***Ts won't it.

Colin

On Sat, 23 Feb 2019 at 21:37, Wm via gnucash-devel
<[hidden email]> wrote:

>
> On 05/06/2018 13:53, Chris Good wrote:
> > Hi,
>
> Hello, Chris
>
> > I'm working on my BackupGnuCash stand-alone app.
> > I have 2 questions today:
>
> read
> https://wiki.gnucash.org/wiki/Configuration_Locations
> and weep at how bad things have become
>
> The last time i addressed this our idiots in charge were so recalcitrant
> about even considering they'd done a stupid thing I stopped reading the
> gnc lists.
>
> I am glad you, someone I respect, have raised it again.
>
> > 1.
> >
> > I'm a little uncertain about where the saved reports and metadata files are
> > in GnuCash 3.0 for Linux.
>
> unfortunately the people that think they know better decided to put them
> where Micrsosoft, etc thought best.  That means it changes at a whim, I
> am angry about this and they don't care.
>
> I cannot make a backup policy for my charitable organizations because
> our cleverer-than-thou FUCKWIT seniors just put stuff where they think
> MS or Linux policy suggests they should go and never actually think for
> themselves.
>
> The files should belong to the book and be closely associated with them.
>
> Our FUCKWITS IN CHARGE decided that the metadata belonged with the user
> not the book, that makes no fucking sense for an accounting file, they
> changed it anyway, grrrrr
>
> > I suspect they are by default:
> >
> > ~/.local/share/gnucash/saved-reports-2.4
> >
> > ~/.local/share/gnucash/books/[BOOK].gnucash.gcm
> >
> > unless overridden by XDG_DATA_HOME.
>
> except you can't rely on those those locations.
>
> See the problem now?
>
> > Can some-one please confirm?
>
> Only thing I can confirm is I don't know where anything is.
>
> > 2.
> >
> > I tried to get version 3 on Linux (Ubuntu 16.04) running to test myself.
>
> that's the easy bit :)
>
> > Thanks in advance,
>
> Waves back.
>
> _______________________________________________
> gnucash-devel mailing list
> [hidden email]
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] GnuCash 3 on Linux

GnuCash - Dev mailing list
In reply to this post by ChrisGood
On 08/02/2019 09:04, Chris Good wrote:

> -----Original Message-----
> From: Geert Janssens <[hidden email]>
> Sent: Wednesday, 6 June 2018 12:10 AM
> To: [hidden email]
> Cc: Chris Good <[hidden email]>
> Subject: Re: [GNC-dev] GnuCash 3 on Linux
>
> Op dinsdag 5 juni 2018 14:53:44 CEST schreef Chris Good:
>> Hi,
>>
>> I'm working on my BackupGnuCash stand-alone app.
>>
>> I have 2 questions today:
>>
>> 1.
>>
>> I'm a little uncertain about where the saved reports and metadata
>> files are in GnuCash 3.0 for Linux.
>>
>> I suspect they are by default:
>>
>> ~/.local/share/gnucash/saved-reports-2.4
>   2.8, not 2.4. If not 2.8 file is found, gnucash 3 and up will search for a
> saved-reports-2.4, but it will only save to saved-reports-2.8.
>>
>> ~/.local/share/gnucash/books/[BOOK].gnucash.gcm
>>
>
> Yes. Do note it can be [BOOK].gnucash_<number>.gcm if you have several data
> files named [BOOK]. And the gnucash part in that file name is only there if
> the data file is called [BOOK].gnucash. Older versions of gnucash also
> allowed to save to files without extension or with the .xac extension.
> So it's really [BOOK-WITH-EXTENSION]<optional _NUMBER>.gcm

our elders and betters DID NOT THINK THIS THROUGH

>> unless overridden by XDG_DATA_HOME.
>>
> If you override XDG_DATA_HOME the files will be searched for and saved in
> $XDG_DATA_HOME/gnucash/
>
> However this can be overridden even with GNC_DATA_HOME. If that's set,
> gnucash will search and save in $GNC_DATA_HOME (which may or may not end in
> "/gnucash" unlike the XDG_DATA_HOME to which gnucash will always append
> "/gnucash")

basically you don't know where anything is, sailor.

> Hi Geert,
>
> Thanks very much for the above info.
> I'm afraid it has been quite a while since these emails but hopefully now I
> have a chance to follow up.
>
> I was surprised to learn about the <optional _NUMBER> part of
> [BOOK-WITH-EXTENSION]<optional _NUMBER>.gcm as I have never seen this.
> I did some testing in Windows & Linux and I think I realise now how it
> works.

you need to get the secret society part of gnc to document it then.

> There is a guid in both the main data file and the metadata .gcm files.
> For example,
> In main data file:
> <book:id type="guid">fe06ec827c69b29977e25a7c6c090229</book:id>
>
> In .gcm:
> BookGuid=fe06ec827c69b29977e25a7c6c090229
>
> So when the metadata is saved, GnuCash looks for (or creates)  a .gcm file
> with a BookGuid matching book:id.
>
> It seems that when you create a new book by using File, New, the
> subsequently saved main data file has a new book guid created.
> However, if you create a new book by either:
> 1) manually copying a main data file to a different directory and/or
> filename
> Or
> 2) using File, Save As
> there is no new book:id created so both books will continue to use the same
> ..gcm file.

Have you spotted the super simple "what files to backup" part yet?

I'm not sure and I really ought to know.

Actually I'm so unsure I'm leaving people on gnc 2.x because at least we
know where stuff is.

> I suspect there may be people who may like to have different settings for
> different books but don't because they have created their new book by either
> of the 1) or 2) methods above.

Don't confuse their little heads, they went with what the OS people said
they should do.  Obedience is good.

> As the book:id guid only appears once in my main data file, I assume it may
> be possible to correct this situation by:
> a) save the main data file uncompressed
> b) make a minor random(ish) change to the guid using a text editor (do NOT
> change the length of the guid)
> c) copy the old .gcm to a new .gcm (i.e. copy TEST.gnucash.gcm to
> TEST.gnucash_2.gcm)
> d) use a text editor to change the old guid to the new guid in the new .gcm

That is all "don't do this unless you know what you are doing" and
"don't do this at home" stuff.

> I'd like to document this in the wiki.
> Can you please let me know if I have made any errors in my above assumptions
> or forgotten anything important?

I think it unlikely you will be allowed to wiki this because our idiots
in charge made an executive decision that (for example) reports and
books don't belong to each other!

Seriously, they need not have a relationship.  Even an invoice format
(not something that belongs to each user) is now tucked away in each
users private space making sensible and consistent backups near impossible.

I'm still recovering from the strangeness of that decision and have
never got a sensible answer back from anyone about why they actually did it.

> I think it would be useful if 2) above was changed so that a new book:id is
> generated. Shall I raise a bug?

Go for it, bugs sometimes get listened to more than conversations.

--
Wm

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] GnuCash 3 on Linux

David Cousens
In reply to this post by ChrisGood
Chris,

If I save reports from GnuCash 3.4 on Linux Mint Tara (Ubuntu 18.04), the
reports are saved in
/home/<user>/.local/share/gnucash/saved-reports-2.8 and I have verified this
contains the report config which I saved.

This is where I expected to find them based on the description in
https://wiki.gnucash.org/wiki/Configuration_Locations.

I am not sure what the 2.4 in your case and 2.8 in my case actually refer
to. The wiki says  they are related to GnuCash versions but not obviously
the version which is running.

David Cousens



-----
David Cousens
--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-Dev-f1435356.html
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
David Cousens
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] GnuCash 3 on Linux

GnuCash - Dev mailing list
In reply to this post by Geert Janssens-4
On 10/02/2019 12:28, Geert Janssens wrote:

> FTR this code is not written by me. I'm merely reading how it currently works.

good, because I am still angry at the plain stupidity regarding this
implementation

> That aside, it will continue to work as long as the user uses a different name
> when copying the file or using File, Save As

Doh!  User has to behave badly to enforce good behavior by programme.

The user *still* won't know where their fucking saved reports are unless
they search for them!  Possibly on someone else's computer in a network.
  Or maybe not available at all because they were using a shared laptop
at a conference and now they're at home.

HOW FUCKING STUPID IS THIS APPROACH?

I honestly can't believe the brains we have available thought this was a
good idea.

Seriously, I DO NOT KNOW were reports are saved any more.

WHO THE FUCK THOUGHT MYSTERY REPORTS WERE A GOOD IDEA

OWN UP!

WHO THOUGHT THIS WAS A GOOD IDEA?

I AM SO ANGRY ABOUT THIS I WANT A NAME

> As there haven't been any complaints so far it looks that's what most people
> are doing anyway.

liar, I protested in the user list (I do not call Geert a liar for
nothing and expect him to be very angry with me in return for using that
word about him but honesty must prevail)

It is possible Geert didn't see the conversation where I complained
about this in the user list but I think it unlikely.

>> I think it would be useful if 2) above was changed so that a new book:id is
>> generated. Shall I raise a bug?
>>
> I don't know. As I said, if the file name is unique there's no need to rely on
> the GUID. It looks like it's fairly uncommon to want to use the same file name
> for books that are not related.

Happens all the time when I'm debugging stuff.

> On the other hand I may also want to simply
> copy my existing book to a new location and happen to use File, Save As to do
> so. I don't think gnucash can make an assumption that either is right or
> wrong.

You lose your reports and meta data when you do that.  Is it your
intention to lose them?  At the moment you don't have the option.

> In itself I think it's too ambiguous/insignificant to create a bug report for
> it.

I disagree, it makes consistent backups on networked systems near
impossible.

> But on the other hand I also think this is something that we could analyze
> when we start revising our options/preferences system. On big aspect of this
> is evaluating for each setting whether it should be book specific (like book
> currency), computer specific (like saved window sizes) or user specific (like
> I have no example right now...). The metadata file is really meant to store
> computer specific data (though it currently does store more than that...).

SO IF YOU WERE THINKING ABOUT THIS BEFORE WHY DID YOU MAKE SUCH A BAD
DECISION??

As far as I know you didn't even ask people about this!

What is a book option, what is metadata and so on *has* been discussed
before and I am going to say *you* Geert are a liar if you think it was
all new.

I hate dishonest people.

GRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR

--
Wm

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] GnuCash 3 on Linux

GnuCash - Dev mailing list
In reply to this post by Colin Law
On 23/02/2019 21:52, Colin Law wrote:

> I cannot understand why you keep using this software since it is so
> obviously horribly flawed and you have such a low opinion of the
> developers.
>
> I am sure you would be a much happier person if you used one of the
> many alternatives that are conveniently available.
>
> Surely anyone who keeps using it is just encouraging these ne'r do
> well developers to carry on in their recalcitrant ways and you really
> owe it to yourself to stop using it in order to show how disgusted you
> are.  That'll show the F***Ts won't it.

Open projects don't work like that, so no.

Love

Wm


_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GNC-dev] GnuCash 3 on Linux

GnuCash - Dev mailing list
In reply to this post by David Cousens
On 23/02/2019 22:30, David Cousens wrote:

> Chris,
>
> If I save reports from GnuCash 3.4 on Linux Mint Tara (Ubuntu 18.04), the
> reports are saved in
> /home/<user>/.local/share/gnucash/saved-reports-2.8 and I have verified this
> contains the report config which I saved.
>
> This is where I expected to find them based on the description in
> https://wiki.gnucash.org/wiki/Configuration_Locations.
>
> I am not sure what the 2.4 in your case and 2.8 in my case actually refer
> to. The wiki says  they are related to GnuCash versions but not obviously
> the version which is running.

So if you want to back stuff up, what do you back up and are you sure
you are backing up sufficient to replace or recreate in case of emergency.

I can't do this for my charities because more than one person uses the
book and I think this is what ChrisG was asking about at the start of
this thread and what my general moan is.

--
Wm

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
12345