Re: [GNC-dev] New balsheet (and P report), API considerations, and (slow?) KVP in Account.cpp

2018-07-02 Thread DaveC49
Chris,
 I have the multicolumn report up and running in V3.2. In addition to adding
your file I also had to incorporate it in the CMakeLists.txt in
~/gnucash/report/standard-reports to have it available from the menu. 
Initially I will just comment on the presentation, as I don't have a
testfile setup with which I can check the numbers out yet. 

I need to emphasize that these are my personal preferences for clarity of
presentation and not any accounting profession standard as such. IAS-1
(https://www.iasplus.com/en/standards/ias/ias1) the IFRS standard does not
specify any particular layout and format and mainly concentrates on what
content has to be presented in the four standard financial statements (some
individual jurisdictions may be more prescriptive):
Statement of financial position (balance sheet);
Statement of profit and loss and other comprehensive income;
Statement of cash flows;
Statement of changes in equity.

One of the problems of a multicolumn report is in representing an account
heirarchy which is more than 2 to 3 levels deep as I'm sure you have already
discovered. You run out of ways of clearly delineating the totals at each
level fairly quickly. This is much easier when you can have a column at each
level of the heirarchy. 

1. I would put the date headings one line up from the Asset Bold heading.
2. i wouldn't use double lines under sub-totals within the major Asset,
Liability and Equity groups but would just use a single line under them and
reserve the double underline for the total in each of those major sections,
3. With the Totals, I would not incorporate the full account heirarchy in
the heading, but just the parent account that the subtotal is for. Then
indenting of the account heirarchy can then indicate the heirarchy level and
what are totals at that level. You could perhaps augment this by using
decreasing font sixes as the heirarchy level increases.
4. If it is possible, I would have the total of any transactions direct to
the parent account displayed in the same manner as any of its child accounts
and balances so that the total displayed for the parent is the balance of
the direct transactions + any child account totals. If no direct
transactions, drop this as a line item. Since GnuCash does allow this
5. Also consider totalling up rather than down (avoids having to repeat the
Level Heading with a Total label.
6. There is no need for a separate Net Worth item as that is what Equity is.

I have attached a LibreOffice document illustrating what I mean by the above
in case it is not clear. I have illustrated a case where Petty Cash is a
parent account which has transactions into it as well as having a child
account (Ignore any table lines).
MultiColumnBalSheetLayoutSuggestions.odt

  

Hope this helps with some ideas.

Cheers
David



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


Re: [GNC-dev] Proposed updates to Wiki Build#Ubuntu pages

2018-05-01 Thread DaveC49
Jeffrey,

Can you copy the cmake command you used to the forum. That looks as though
the switch which should be preceded by a "-D"  has been interpreted as part
of the cmake target. Each swith needs to be preficed by "-D" and followed by
a space before any following switches. There also needs to be a space
between the last switch and the path to the top level source directory.  I
am in the process of updating the Ubuntu16.04 page of the Wiki accessible
from the Build GnuCash page expanding the description a lot. The command
format is illustrated there. I have yet to add a page on how to correctly
relative addressing of the top level source directory for cmake for various
locations of the build directory which seems to cause problems for new cmake
users (it did for me initially). I will try and do that this afternoon.

I would move to version 3.1 now that it has been released. I used building
and installing it to test out the instructions on the wiki page and it
worked fine. It has a lot of bug fixes.

David



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


Re: [GNC-dev] GnuCash 3.0 wine versus Windoze 10

2018-04-21 Thread DaveC49
Robin,

I think having a separate build directory is what you would consider best
practice using cmake. Where that build directory is located does not appear
to be a major issue from my reading of the CMake documentation so far. 

I have built other applications and libraries using cmake where a separate
build directory was not used but it is certainly cleaner if you have to
rebuild as you can just delete the build directory and start again which is
not possible if you build in the top level source directory. I guess cmake
does not have the equivalent of a make clean. In-source building also
appears to be the default cmake behaviour. I could be wrong  but so far have
not had any problems

For the Gnucash-3.0 program it does not appear to matter whether the build
directory is outside or inside the top level gnucash-3.0 directory. I have
built it successfully both with the build directory as a subdirectory of the
toplevel gnucash-3.0 directory and with it as a parallel directory at the
same level without any problems.  The only difference is you have to ensure
that the target specified in the cmake command is referencing the
gnucash-3.0 directory (which contains the top levelCMakeLists.txt file with
which cmake initiates its execution) particularly if you are using relative
referencing to do so. 

I found a reference to an earlier post for the documentation build for
GnuCash not the program build where it apparently did matter because of an
issue with the intltools package. I suspect this is where the issues over
the location of the build directory arose.

You normally initiate the 
$cmake [options] 

command from a terminal which is opened in or set to the build directory.
 points to the directory containing the toplevel CmakeLists.txt file
defined for your application, normally the top level source directory.

With this directory structure:

|
 |gnucash-3.0|
|build
|CMakeLists.txt

 can be any of .. or ../ or ../../gnucash-3.0. Here .. or ../ take
you into the gnucash-3.0 directory from which the top level CMakeLists.txt
is found. ../../gnucash-3.0 takes you to the  directory with the ../..
part then /gnucash-3.0 puts you into the top level directory.

Alternatively if the directory structure is:

|gnucash-3.0|
 |  |CMakeLists.txt
 |build

 would be ../gnucash-3.0 if you are using relative referencing. 

You can actually have the build diretory anywhere you like as long as there
are no permissions issues and you correctly reference the gnucash-3.0 top
level directory as the target for the cmake command.

Alternatively you could also reference the top level directory absolutely.
If  in the above is an absolute path to the location of the toplevel
gnucash-3.0 directory, i.e. of the form /home//applications, then you
would supply the  as /home//applications/gnucash-3.0.
 
I have a personal preference for having the build directory under the top
level folder because it keeps it all together (as long as it doesn't cause
issues in the build). I just tested extracting a new copy from the
downloaded archive over an existing extracted copy which had a build
directory in it and the build directory and contents still existed and were
unchanged after the second extraction to the same parent directory, so that
is not an issue. 

David



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


Re: [GNC-dev] GnuCash 3.0 wine versus Windoze 10

2018-04-20 Thread DaveC49
Jeffrey,

My response re "30 years ago I swallowed new programming languages like
jellybeans, today it takes a manual and 3 sledge hammers." is very similar
although in my case it was closer to 40 years. At least being retired now  I
can take the time to bumble my way through these days.  My own serious
programming days were back when Fortran was still the language of choice.

David



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


Re: [GNC-dev] GnuCash 3.0 wine versus Windoze 10

2018-04-20 Thread DaveC49
Jeffrey,

I tend to keep the stable release installed under /usr/local. If I have any
unstable or work in progress versions I install them under /opt or under my
home directory as John suggests in another reply. I usually set up aliases
tagged with a version number or some other identifier pointing to the
executables for each version
(http://www.hostingadvice.com/how-to/set-command-aliases-linuxubuntudebian/). 

You don' really need to set up a VM for running different versions of
GnuCash. That is more useful if you need to run or develop under different
operating systems or variants (Linux, Mac , Windows, Gentto Fedora etc) for
testing or if you are working on the development of different versions of
the program where you may need to have different versions of libraries
installed for each program version.


David 



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


Re: [GNC-dev] Proposed updates to Wiki Build#Ubuntu pages

2018-04-20 Thread DaveC49
Thanks Geert,

I will take your feedback on board and have a go at an edit. I am also
talking Jeffrey Black through a build of v3 on Ubuntu16.04. I hope that will
clarify things further for me as well.  I've had a quick look at the rewrite
of the C source code and it looks to be much more structured. I have tried
to get involved more in the development but have usually found myself lost
in the maze in the past so that may make it easier to dig a bit deeper.

David



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


Re: [GNC-dev] Proposed updates to Wiki Build#Ubuntu pages

2018-04-20 Thread DaveC49
Hi John,

My apologies for my misinterpretation of why Google recommended that
googlemock and googletest not be built as shared libraries. I now understand
the problem with  a lot of conditional code and different compile flags and
on the build for a calling program and the libraries much better. 

It was my first experience with googletest when I started compiling v3. I
found it very difficult to find online information about setting up
googletest and the info on the README on Github was buried in a subdirectory
for v1.8.0. I also didn't pick up in v1.7.0 that building googlemock also
built the gtest libraries as well initially. My excuse is that I was
skimming through a lot of information and some misinformation online at the
time. I only really began to follow what setting up GTEST_ROOT and
GMOCK_ROOT did when I started looking inside GncAddTest.cmake. I must
confess to finding a lot of the information I found to be terse and often
assuming a depth of acquired knowledge of the history of the package
development I didn't have. 

I suspect many of us now building Gnucash3 will be in the same class of
knowing enough to be dangerous and to have a go but not yet having the depth
of knowledge you and Geert and the other developers have acquired the hard
way over time. 

I was left with the libraries from a previous build after having removed the
sources so I could not use sudo make uninstall to remove them.  The Linux
Mint distro package also had an uninstall from the menu which normally
removed them but for some reason didn't this time. It is probably an obvious
step when you are a developer and regularly build the program, but not so
much to those of us who only build it occasionally and are lower down on the
learning curve.

I will have a look at the README and combine that with my experience and see
if I can try to make the Build#Ubuntu section a bit clearer for us relative
newbies to development.

Thanks

David



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


Re: [GNC-dev] GnuCash 3.0 wine versus Windoze 10

2018-04-20 Thread DaveC49
Jeffrey,

I will start form scratch. The first step is setting up for building. My
apologies if I am teaching you to suck eggs. Linux Mint has an alias of apt
defined for apt-get. I am not sure if it is also defined in Ubuntu. If not
substitute apt-get where I have apt in the following.

# first download a copy of the gnucash source code gnucash-3.0.tar.bz2 from
# https://www.gnucash.org/download.phtml and extract the gnucash-3.0 source
file. I use a folder called # Applications in my home directory for programs
and libraries I build from scratch and usually keep the 
# sources there so i can easily rebuild if I strike a problem, but that is
just a personal preference. 

#Open a terminal/bash shell and then cd to the extracted folder gnucash-3.0.

# this loads compilers,dev tools etc as per
https://packages.ubuntu.com/xenial/build-essential
$sudo apt install build essential
$sudo apt install cmake 

#the next step is to install the gnucash dependencies as listed in the
README.dependencies file under the #gnucash-3.0 folder. This generally lists
the minimum version of the libraries required. You will generally find that 
Ubuntu will in most cases load a later version. I will list the command to
load  followed by the required version as in that file as a #comment
separated by a #. The list on https://wiki.gnucash.org/wiki/Building lists
the development headers that are required but you may also need to load the
libraries as well

sudo apt-get install libtool libltdl-dev
#glib2 >v2.40.0
sudo apt-get install libglib2.0 libglib2.0-dev
sudo apt-get install icu-devtools libicu-dev
# boost > 1.50.0
sudo apt-get install libboost-all-dev
# guile >=2.0.0  
sudo apt-get install guile-2.0 guile-2.0-dev
#swig  >2.0.10
sudo apt-get install swig2.0
sudo apt-get install libxml2 libxml++2.6-dev
sudo apt-get install libxslt1.1 libxslt1-dev
sudo apt-get install xsltproc
sudo apt-get install libgtest-dev
sudo apt-get install gtk+3.0
sudo apt-get install libgtk-3-dev
sudo apt-get install libwebkit2gtk-4.0-37
sudo apt-get install libwebkit2gtk-4.0-dev
sudo apt-get install libdbi1 libdbi-dev
# if you use a database backend  rather than the default XML backaend
# you need to load at least one of the following
# and choose the one relevant to the database you want to use
sudo apt-get install libdbd-pgsql   #PostgreSQL database
sudo apt-get install libdbd-mysql  # MySQL database
sudo -get install libdbd-sqlite3 #Sqlite database
# these are needed if you use online banking tools
sudo apt-get install libofx6 libofx4 libofx-dev
dpkg -lsudo apt-get aqbanking-tools libaqbanking-dev
# this is required on linux systems it may be already installed but will
tell you if it is
sudo apt-get install dconf-cli
#
# you can check out what versions of packages are installed or not using the
following command
dpkg -l | grep 
# here  can be the actual package name or a substring. grep
will extract anything
# from the dpkg -l output which contains that substring
#
# The next step is getting googletest setup. The version from the Ubuntu
repository is 1.7.0 and does not
# contain gmock within the gtest download. V1.8.0 has both in the one
repository and is a little bit easier
#  to setup. Google do not recommend using googlemock and googletest as
shared dynamically linked
#  libraries because if a program is compiled with different compiler flags
from the libraries links to them
# at run time they can fail something I did not appreciate but I haven't had
any problems so far.
# To set it up as recommended by Google and the developers, at a terminal
opened in a suitable folder (e.g. $HOME/Applications is what I use)  enter:
#
git clone https://github.com/google/googletest.git
#
#this will create a folder googletest-master which has sub folders
googletest and googlemock
#
cd googletest-master
cmake -D BUILD_GTEST -DBUILD_GMOCK
make
# this creates the gtest and gmock libraries within the googletest-master
folder but does not install them
# as shared dynamically linked libraries. You then need to create
environment variables pointing to the
# top level folders containing these libraries
export GTEST_ROOT=/googletest
export GMOCK_ROOT=/googlemock
# where  is in my case
$HOME/Applications/googletest-master. This allows
# CMake to find the googletest and googlemock libraries and include files to
link into the program.
#
# At this point you should be ready to build gnucash. I prefer to install it
in the /usr/local folder. This is
# where the linux distros generally install it. If your previous version was
installed from a Linux 
# distribution this is normally where it will be. It can also be installed
under /opt. The essential step I 
# found was to ensure that all traces of any previous version of GnuCash
were removed before doing
# the build. 
#If you previously had a version from the Linux distro
sudo apt-get remove gnucash
# should achieve this. If you built a previous version from sources and
still have the build sources
# change to the  build 

Re: [GNC-dev] GnuCash 3.0 wine versus Windoze 10

2018-04-19 Thread DaveC49
Jeffrey,

There should be no significant difference in building Gnucash 3.0 on Ubuntu
Xenial from Linux Mint 18.3 which I have just finished doing, if you need
some guidance in doing that. I have proposed a rewrite of the Wiki page to
the developers to try and make the build instructions a bit more
straightforward and a bit more comprehensive. I used the latest version of
googletest v 1.8.0 from github. Unlike the previous versions it can be
readily installed as shared libraries. I can send instructions for setting
that up if you wish. At present using shared libraries requires a patch to
some of the CMake files to detect the shared googletest libraries which
isn't to my knowledge yet in the stable branch at this stage, but I can send
you already patched versions to just insert into the v3.0 download over the
previous versions. The only build problems I had were ensuring that the
previous build libraries, include files etc had been removed and correctly
addressing the correct toplevel CmakeLists.txt file from the Cmake file (my
own lack of understanding of CMake when I started).

As far as I know the main datafile structure has not changed and it is only
the user preference files which changed from V2.6.19 to v3.0 so if you are
running different versions on different machines, they should transfer OK.
The only problem would be if v3.0, in new features, added new information
that v 2.6.19 was unable to interpret.

David Cousens



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


[GNC-dev] Proposed updates to Wiki Build#Ubuntu pages

2018-04-18 Thread DaveC49
John, Geert and whoever maintains the  Wiki Build#Ubuntu_16.04
  pages.

I would like to propose some edits to the above Wiki page section in the
light of my recent experiences building Guncash v3.0 which may help others
building it in future.

My major problems I encountered were in getting googletest and googlemock
installed and running smoothly, not having fully removed libraries from
2.6.19 and the right choice of relative reference to the top level
CmakLists.txt. 

I think the main reason Google doesn't recommend installing googletest and
googlemock as shared libraries is because of their reluctance to get dragged
into any maintenance issues on the various Linux distros rather than with
any inherent problems with shared libraries as such. 

In version 1.8.0 the move to a single repository and download for googlemock
and googleletest makes the installation as shared libraries fairly easy on
Ubuntu systems.  I am guessing the patch to GncADDTest and the
CmakeLists.txtin ~/common/test-core to detect shared libraries won't be in
the stable version until v3.1 is released. 

I would propose adding a note to the dependencies secion on the above page
referencing the ability to use shared libraries with v1.8.0 and referencing
an additional wki page addressing setting up for using googlemock and
googletest for building GnuCash which could have a section for setting up
GTEST_ROOT and GMOCK_ROOT if not using shared libraries  and or v 1.7.0 and
a section on setting up shared libraries for v 1.8.0. I put a tutorial up on
the Linux Mint Forum for that as I found the info available on many online
source and forums was a) very skettchy and b) sometimes confusing or
misleading which i could either reference or just incorporate directly.

I also propose putting a note re removing previous libraries. I had relied
on a Linux Mint menu uninstall option which worked with the distro installed
version but not with 2.6.19 which i had built. Another possibility is to
reference a page with instructions on how to remove files relative to the
install prefix.

The third proposal  would be to have some explanatory notes, possibly with
some examples, on the positioning of the build directory relative to the
source directory. My experience with this is that unlike the documentation
build, there does not appear to be a need to have the build directory
outside the source directory. This could either go on the Cmake page
https://wiki.gnucash.org/wiki/CMake

If you are happy with the above proposals or can suggest other approaches, I
am willing to have a go at editing the Wiki if I can be granted the
appropriate permissions to edit the pages and create the requisite new
pages.

David Cousens



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


Re: [GNC-dev] [GNC-Dev]Gnucash-3.0 Build Error in make

2018-04-16 Thread DaveC49
Thanks Geert,

I have found the thread. I will start again. I had cleared the build
directory after building with it inside the source directory but had not
cleared the source directory. I will wipe the source tree by restoring the
gnucash-3.0 directory from the downloaded archive and then try it again with
the build directory outside the source tree after applying the patches for
gtest and gmock shared libraries.

I have manually cleared all entries from a previous build of 2.6.19
from/usr/local/bin, /usr/local/include,usr/local/lib (gnucash folder and all
libgnc* libraries) and /usr/local/etc. I had run an uninstall on it
previously which normally clears it out but there were still gnucash folders
in each of the locations as well as the previous libgnc* libraries.
$cmake -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_AQBANKING=OFF
../gnucash-3.0
$make
$sudo make install

That has now built successfully and now runs.

I have also rebuilt it completely from scratch as above, but with the
build-cmake folder in the gnucash-3.0 directory. For your info it doesn't
really matter if the build-cmake directory is in the parent folder of
gnucash-3.0 or in the gnucash-3.0 directory extracted from the tar as long
as you use the correct relative path from the build directory, i.e. .. or
../ or ../../gnucash-3.0 so it finds the correct CMakeLists.txt in the top
level source folder rather than ../gnucash-3.0 when it is in the parent
directory.   

The critical step for clearing the above error was removing all traces of
the previous installation, not where the build directory was located. You
are probably well aware of that but I just wanted to check to make sure my
grip on understanding CMake was right. I personally prefer to have it under
the top level directory of the sources.

Thanks for your help and patience,

David



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


[GNC-dev] [GNC-Dev]Gnucash-3.0 Build Error in make

2018-04-16 Thread DaveC49
CMakeError.log
  
CMakeOutput.log
  
terminal_output.txt
  
Hi,

Building Gnucash 3.0 on Linux Mint 18.3
I'm currently using a build-cmake directory which is in the parent directory
of the gnucash-3.0 directory unpacked from the gnucash-3.0.tar.bz2 archive I
downloaded. I have previously also built it with build-cmake located in the
gnucash-3.0 folder but receive the same error as below.

The patches to detect the GTEST and GMOCK shared
librariesto~/comon/cmake-modules/GncAddTest have been applied and both are
being detected while running cmake. 

I was originally running guile-2.0.0 and received the same error as below.
Seeing it was in the scm-core-utils I upgraded guile first to 2.2.0 and then
to 2.2.3 and am still getting the same error as described below. 

The cmake command is
$cmake -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_AQBANKING=OFF -D
WITH_OFX=ON ../gnucash-3.0 which is running without error and finding all
modules

 I'm receiving the following error when running make after running Cmake as
above while building the scm-core utils:
...
Scanning dependencies of target scm-core-utils
[ 30%] Generating ../../lib/gnucash/scm/ccache/2.2/gnucash/core-utils.go
Backtrace:
In /usr/local/bin/guild:
72:17 19 (main _)
In srfi/srfi-1.scm:
640:9 18 (for-each # …)
In scripts/compile.scm:
   251:26 17 (_ _)
In system/base/target.scm:
 57:6 16 (with-target _ _)
In system/base/compile.scm:
152:6 15 (compile-file _ #:output-file _ #:from _ #:to _ #:env _ …)
 43:4 14 (call-once _)
In ice-9/boot-9.scm:
841:4 13 (with-throw-handler _ _ _)
In system/base/compile.scm:
59:11 12 (_)
   155:11 11 (_ #)
   235:18 10 (read-and-compile # #:from _ # …)
   183:32  9 (compile-fold (#) …)
In ice-9/boot-9.scm:
   2312:4  8 (save-module-excursion #)
In language/scheme/compile-tree-il.scm:
31:15  7 (_)
In ice-9/psyntax.scm:
  1235:36  6 (expand-top-sequence ((re-export #)) _ _ #f c (# load …) …)
  1182:24  5 (parse _ (("placeholder" placeholder)) ((top) #(# # …)) …)
   285:10  4 (parse _ (("placeholder" placeholder)) (()) _ c (# #) #)
In ice-9/boot-9.scm:
  2071:24  3 (call-with-deferred-observers #)
   260:13  2 (for-each # …)
In unknown file:
   1 (scm-error misc-error #f "~A ~S" ("Undefined variab…" …) …)
In ice-9/boot-9.scm:
   752:25  0 (dispatch-exception _ _ _)

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

The CmakeError.log, CMakeOutput.log and the terminal output while building
as above are attached if someone can see any problems I did not recognize.

John I was not able to locate the thread you mentioned in an earlier post
where Geert was helping someone with a similar problem.

Thanks in advance for any help you can offer.

David Cousens



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


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

2018-04-10 Thread DaveC49
Hi John,

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

Cheers
David



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


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

2018-04-10 Thread DaveC49
Hi John,

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

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

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

Thanks David




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


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

2018-04-09 Thread DaveC49
Thanks John,

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

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

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

Cheers

David



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


Re: [GNC-dev] gnc_add_swig_guile_command compile errors

2018-04-08 Thread DaveC49
Just to confirm with build-cmake in the gnucash-3.0 toplevel folder using any
of
..
../
../../gnucash-3.0 
as the argument for Cmake  will work as expected.



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


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

2018-04-08 Thread DaveC49
Hi,

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


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

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

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

files installed without any success.

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

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

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

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

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

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

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

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

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

Thanks in advance

David






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


Re: gnc_add_swig_guile_command compile errors

2018-04-06 Thread DaveC49
Thanks Rob,

John passed on the message to me. I was following the Build#Ubuntu page on
the wiki, so this may need modifying too. I will keep notes as I sort out
and get used to building with Cmake. I guess the other cure would be to use
../../gnucash-3.0 to go up to the parent directory from a build-cmake inside
to top level gnucash directory. With the extract from the tarball from the
website, this is labelled gnucash-3.0. 

I haven't pulled it down with git in which case it may not have the major
version number attached to the folder. 

I generally prefer to have the build directory under the top level directory
as I sometimes have sources for a couple of versions and that keeps the
relevant build with the source for that version.

Cheers

David



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


Re: Building with CMake

2017-06-04 Thread DaveC49
Hi Rob,

I do have a build file under gnucash and the cache files were located there.
I have deleted all files in it.

I'll take your advice and get a clean clone up and compile that without
modifying anyof the files. I had already modified the files to include a
feature for addinga link to external documents to invoices/bills, etc. I can
then transfer the modified files from the current sources directory once I
have it building successfully.

Having done that I can now identify the problem. I had made the build
directory a subdirectory of the gnucash file created when I cloned gnucash
from github instead of a directory in the same folder. The cmake is now
working OK but ninja is dropping out with an error.

/usr/local/include/boost/mpl/vector/aux_/push_front.hpp:22:45: fatal error:
/usr/local/include/boost/mpl/vector/aux_/item.hpp: Timer expired

Which is clearly something to do with my boost installation - possibly the
wrong version. I hav both 1.64.0 and 1.58.0 installed and it is currently
linking to 1.64.0. That I can sort out fairly easily.

Thanks for your help in sorting me out on cmake. I havent done any C++
development since the mid 1990s , I was trying to get familiar with Eclipse
and cmake at the same time as finding my way around the gnucash architecture
and got myself in a knot.

Best wishes

David Cousens



--
View this message in context: 
http://gnucash.1415818.n4.nabble.com/Building-with-CMake-tp4691977p4692019.html
Sent from the GnuCash - Dev mailing list archive at Nabble.com.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Building with CMake

2017-06-03 Thread DaveC49
 Hi further progress
I ran cmake with the --trace option ( *cmake --trace -D
CMAKE_INSTALL_PREFIX=/opt/gnucash-devel ../gnucash*). It appears that cmake
is executing the call to add the libqof directory
.../gnucash/src/CMakeLists.txt  line 141 and the qof/test subdirectory
.../gnucash/src/libqof/CMakeLists.txt(3) without ever having called the
INCLUDE (GncAddTest) at line 48 of .../gnucash/CMakeLists.txt. 
In the resultant trace output cmake in fact never seems to enter
.../gnucash/CMakeLists.txt as the trace starts with 
.../gnucash/src/CMakeLists.txt(0):  PROJECT(Project )  and does not appear
to be executing .../gnucash/CMakeLists.txt at all or if it is is executing
it silently.

I have deleted the cach files .../gnucash/CMakeFiles and rerun the above
command but still get the same error and trace output

If I execute *cmake --trace -D CMAKE_INSTALL_PREFIX=/opt/gnucash-devel
../gnucash/CmakeLists.txt*
I obtain 
*cmake: /usr/local/lib/libcurl.so.4: no version information available
(required by cmake)
Running with trace output on.
CMake Error: The source ".../gnucash/CMakeLists.txt" does not match the
source ".../gnucash/src/CMakeLists.txt" used to generate cache.  Re-run
cmake with a different source directory.*
 I confess to being totally confused as to why cmake is not executing
.../gnucash/CmakeLists.txt

The trace output can be accessed using this link to a folder in my dropbox
https://www.dropbox.com/sh/chibk4l66mz1esp/AADDP0EV9pmHjwpUHeow_zkra?dl=0

Thanks for any help anyone can offer

David Cousens



--
View this message in context: 
http://gnucash.1415818.n4.nabble.com/Building-with-CMake-tp4691977p4692002.html
Sent from the GnuCash - Dev mailing list archive at Nabble.com.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Building with CMake

2017-06-01 Thread DaveC49
Solved my own problem or at least found the
../src/cmake-modules/GncAddTest.cmake.  Somehow these files are not being
picked up in the configure even though it is in the INCLUDEs in the
CMAKELists.txt in the top level gnucash folder above the src folder (  in my
case ~/GnucashDevelopment/sources/gnucash)

David cousens



--
View this message in context: 
http://gnucash.1415818.n4.nabble.com/Building-with-CMake-tp4691977p4691983.html
Sent from the GnuCash - Dev mailing list archive at Nabble.com.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Building with CMake

2017-06-01 Thread DaveC49
Hi,
I am getting an error as follows while building a branch from the master for
gnucash to implement links to documents in invoices/bills/creditNotes etc.

$ cmake -D CMAKE_INSTALL_PREFIX=/opt/gnucash-devel ../gnucash
CMake Error at libqof/qof/test/CMakeLists.txt:44 (GNC_ADD_TEST):
  Unknown CMake command "GNC_ADD_TEST".


-- Configuring incomplete, errors occurred!

I am presuming that GNC_ADD_TEST is a macro but cannot find where it is
defined or if it is defined.  Is anyone able to enlighten me as to where I
can or should find it and what the macro is

Thanks

David Cousens




--
View this message in context: 
http://gnucash.1415818.n4.nabble.com/Building-with-CMake-tp4691977.html
Sent from the GnuCash - Dev mailing list archive at Nabble.com.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Attachment of links to documents to bills, invoices, credit notes in addition to attachment to transactions

2017-04-30 Thread DaveC49
Thanks Geert,

I had no problems with the easy part adding the KVPs to  the invoice. The
user interface may take me a bit longer as I'm not too familiar with GTK. 

Cheers

David



--
View this message in context: 
http://gnucash.1415818.n4.nabble.com/Attachment-of-links-to-documents-to-bills-invoices-credit-notes-in-addition-to-attachment-to-transacs-tp4691326p4691351.html
Sent from the GnuCash - Dev mailing list archive at Nabble.com.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Attachment of links to documents to bills, invoices, credit notes in addition to attachment to transactions

2017-04-27 Thread DaveC49
Bug 780112 requested attachment of a link to a document to an invoice rather
than the current link attachment
(http://gnucash.1415818.n4.nabble.com/Bug-336843-Attach-files-to-Transactions-td4665357.html)
which is to the transaction created by the invoice. However that transaction
doesn't exist before the invoice is posted so the link cannot be attached.
Once the invoice is posted, the file link cannot be attached as the
transaction cannot be edited while the invoice is posted and if it is
unposted the associated transaction disappears again. This is not very
useful for transactions from invoices (and presumably bills).

My own use case is one in which I would normally want to associate an
external (image or pdf) of an invoice ( sent to a customer) or bill (invoice
received from a vendor) with the invoice or bill record internally in
Gnucash.  It makes more sense to me to associate the external file with an
invoice or bill or credit note rather than with the transaction, at least
for business users. 

For non business users where bills or invoices are not or may be rarely
used, the current attachment to a transaction works fine ( at least under
ubuntu16.04/Linux Mint).

I would propose also including a link in the invoice/bill/credit note using
the same KVP mechanism that John Ralls suggested to Patrick in the above
thread  and including a process for setting the link in the invoice dialog
and displaying it on the View Invoice tab. I am not sure how the field
locking works at present however the customer details appear to be editable
and changes persist if a posted invoice is closed and then reopened. I am
guessing from this that it should be possible to make non accounting fields 
which are not directly associated with the transaction editable in an
invoice/bill/credit note and able to follow the link if it is clicked.

I am interested in attempting to code this as a means of getting my feet wet
in Gnucash's code. I would appreciate any feedback about whether this is
desirable/redundant or whatever before spending too much time on it.
Cheers

David Cousens



--
View this message in context: 
http://gnucash.1415818.n4.nabble.com/Attachment-of-links-to-documents-to-bills-invoices-credit-notes-in-addition-to-attachment-to-transacs-tp4691326.html
Sent from the GnuCash - Dev mailing list archive at Nabble.com.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Patch to documentation Bug777287

2017-01-15 Thread DaveC49
Hi all,

I have created a patch to the documentation to add tips to both the User
Guide and Help manual and attached it in Bug 777287.

The tips added describe how to check or uncheck all transaction in the
Reconcile Window Funds In/Out panes using Ctrl-A followed by a space as
conveyed to me by John Ralls when I asked for a way to do this and could
find no reference in the documentation.

Regards
David Cousens



--
View this message in context: 
http://gnucash.1415818.n4.nabble.com/Patch-to-documentation-Bug777287-tp4688911.html
Sent from the GnuCash - Dev mailing list archive at Nabble.com.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel