Re: [GNC-dev] Rework GoogleTest integration

2019-08-15 Thread John Ralls



> On Aug 15, 2019, at 3:22 PM, Christian Gruber  
> wrote:
> 
> Am 15.08.19 um 00:23 schrieb Christian Gruber:
>> 
>>> I think our distro packagers would object to any option other than relying 
>>> on tools outside of the build system to provide the googletest sources and 
>>> maybe a prebuilt static lib. It's a one-off for the casual builder and 
>>> easily scripted for everyone else. Building gtest is also sufficiently 
>>> trivial that it's not all that interesting to call out to guests own 
>>> CMakeLists.txt instead of just building the two libraries in ours. OTOH 
>>> it's possible that might change at some point, so
>> 
>> Ok, so you want to keep build process as it is at the moment. In this case 
>> at least bug 797344 should be fixed. I'll provide a PR. And I recommend to 
>> use library target gtest directly instead of variables GTEST_LIB, 
>> GTEST_INCLUDE_DIR as stated above. The same I recommend for library target 
>> gmock. I'll add this to the same PR.
>> 
>> Finally I recommend to add a few more notes on the Wiki page 
>> https://wiki.gnucash.org/wiki/Google_Test. For me not familiar with the 
>> GnuCash build system it was not obvious at the beginning, that gtest is 
>> built inside GnuCash build system, because this is a little bit unusual. It 
>> could for instance be explained, how to build gtest and gmock from inside 
>> GnuCash build system via "make gtest" and "make gmock" and that this way one 
>> can test the correct CMake configuration for GnuCash regarding variables 
>> GTEST_ROOT and GMOCK_ROOT. The Wiki page only explains how to "test the 
>> installation" from inside the GoogleTest build system and tells that this is 
>> "not used in practice". But this doesn't really test the CMake configuration 
>> for GnuCash.
>> 
>>> 
>>> I don't think anyone's actually tried doing a mock with GMock yet. There 
>>> are hand-rolled ones in the QOF tests, but they use the old Glib test 
>>> facility. Most of the C++ work so far has been at the lowest levels so that 
>>> the C++ classes don't have any mockable dependencies. That will change when 
>>> we get to redoing the engine as we'll want to use mock for at least the 
>>> backend. We don't want to remove GMock from the dependencies.
>>> 
>>> I agree about libgtest_main.a. Would you like to make a PR to remove all of 
>>> the inclusion of gtest_main.cc and GTEST_SRC?
>> I opened PR https://github.com/Gnucash/gnucash/pull/552.
>>> 
>>> Regards,
>>> John Ralls
>>> 
>> Regards,
>> Christian
>> 
> I just realized now, after PR https://github.com/Gnucash/gnucash/pull/552 
> failed to build, that there is a significant difference between using 
> prebuilt GoogleTest libraries and building GoogleTest from source repository. 
> In the latter case libgtest_main.a doesn't exist at all, it isn't built 
> anywhere. And GTEST_LIB contains only libgtest.a in this case. Therefore I 
> created a new pull request https://github.com/Gnucash/gnucash/pull/555, which 
> removes GTEST_SRC and additionally adds source file gtest_main.cc to the 
> sources of libgtest.a. I also thought about creating a second target 
> gtest_main for building libgtest_main.a as in GoogleTest source repository, 
> but in the end I thought that's exaggerated, because both libraries are 
> always used in combination in GnuCash.

That's fine, and I've merged your PR.

Regards,
John Ralls

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


Re: [GNC-dev] Import Main Matcher

2019-08-15 Thread David Cousens
Frank,

One difficulty I have is in separating the interface description from the
operational use of it in the case of the import matcher and the import
process generally. Geert did a good job of incorporating the essentials in
the popup help dialog in the interface and making it largely self
documented, that it becomes almost superfluous to describe the interface
separately, but there are always those to whom the help button is invisible.
I will give it a go though.

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] Problem building master branch

2019-08-15 Thread David Cousens
Hi,

I'm getting an error running make while building the master branch. It seems
to be a problem loading gnucash/engine/gnc-numeric, which doesn't exist, but
libgnucash/engine/gnc-numeric does exist in the sources. maybe
primitive-load-path is not set correctly ?  Make output where the error
occurs is given below. Any suggestions?

[ 32%] Built target scm-engine-0
Scanning dependencies of target scm-engine-1
[ 32%] Generating
../../lib/x86_64-linux-gnu/guile/2.0/site-ccache/gnucash/engine/commodity-table.go
wrote
`/home/david/GnucashDevelopment/Repository/build-make/lib/x86_64-linux-gnu/guile/2.0/site-ccache/gnucash/engine/commodity-table.go'
[ 32%] Generating
../../lib/x86_64-linux-gnu/guile/2.0/site-ccache/gnucash/engine/engine-interface.go
wrote
`/home/david/GnucashDevelopment/Repository/build-make/lib/x86_64-linux-gnu/guile/2.0/site-ccache/gnucash/engine/engine-interface.go'
[ 32%] Generating
../../lib/x86_64-linux-gnu/guile/2.0/site-ccache/gnucash/engine/engine-utilities.go
Backtrace:
In ice-9/eval-string.scm:
  44: 19 [read-and-eval # #:lang ...]
  37: 18 [lp (use-modules (gnucash engine))]
In ice-9/eval.scm:
 505: 17 [#
(use-modules #)]
In ice-9/psyntax.scm:
1106: 16 [expand-top-sequence ((use-modules (gnucash engine))) () ...]
 989: 15 [scan ((use-modules (gnucash engine))) () ...]
 279: 14 [scan ((# #) #(syntax-object *unspecified* # #)) () (()) ...]
In ice-9/boot-9.scm:
3589: 13 [process-use-modules (((gnucash engine)))]
 705: 12 [map # ((#))]
3590: 11 [#
(#)]
2867: 10 [resolve-interface (gnucash engine) #:select ...]
2792: 9 [# # ...]
3068: 8 [try-module-autoload (gnucash engine) #f]
2404: 7 [save-module-excursion #]
3088: 6 [#]
In unknown file:
   ?: 5 [primitive-load-path "gnucash/engine" ...]
In engine.scm:
 118: 4 [#]
In ice-9/boot-9.scm:
1727: 3 [%start-stack load-stack ...]
1732: 2 [#]
In unknown file:
   ?: 1 [primitive-load-path "gnucash/engine/gnc-numeric"]
In ice-9/boot-9.scm:
 109: 0 [# misc-error ...]

ice-9/boot-9.scm:109:20: In procedure #:
ice-9/boot-9.scm:109:20: In procedure primitive-load-path: Unable to find
file "gnucash/engine/gnc-numeric" in load path
libgnucash/engine/CMakeFiles/scm-engine-1.dir/build.make:80: recipe for
target
'lib/x86_64-linux-gnu/guile/2.0/site-ccache/gnucash/engine/engine-utilities.go'
failed
make[2]: ***
[lib/x86_64-linux-gnu/guile/2.0/site-ccache/gnucash/engine/engine-utilities.go]
Error 1
CMakeFiles/Makefile2:5301: recipe for target
'libgnucash/engine/CMakeFiles/scm-engine-1.dir/all' failed
make[1]: *** [libgnucash/engine/CMakeFiles/scm-engine-1.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2

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] Building on Windows

2019-08-15 Thread Matthew Forbis via gnucash-devel
Hi All,
I have recently worked on building GNUCash on windows to try to debug a problem 
I've been having with my reports.  I found a few things that look like the 
script might need to be updated for (or I had something wrong in my procedure).
1.  I had to install some packages through pacman manually:openssl-devel - this 
seemed to keep python's hashlib from working correctly and not able to go very 
in the build process (I didn't start keeping notes right at the 
beginning).mingw-w64-i686-gnutls - I don't remember the exact error this 
caused, but I had to install it to continue. (I think I had to use this format 
as well to install)glib2-devel - Required for gnucash.libxml2-devel - Required 
for gnucashlibxslt-devel - Required for gnucash
2.  When I got to webkitgtk3, I noticed it hadn't installed during the setup 
powershell script.  This failed due to a missing angleproject package.  This 
was not available in pacman anymore, so I ended up modifying setup-mingw64.ps1 
to add this to the install and re-ran it and it appears to have installed 
correctly.
But, that brings me to now where I'm stuck.  I am getting the following error 
when building:[ 42%] Linking CXX shared library 
../../bin/libgncmod-engine.dllC:/gcdev64/msys2/mingw32/bin/../lib/gcc/i686-w64-mingw32/9.2.0/../../../../i686-w64-mingw32/bin/ld.exe:
 CMakeFiles/gncmod-engine.dir/objects.a(gnc-date.cpp.obj): in function 
`gnc_start_of_week':C:/gcdev64/gnucash/maint/src/gnucash-git/libgnucash/engine/gnc-date.cpp:214:
 undefined reference to 
`icu_64::Calendar::createInstance(UErrorCode&)'C:/gcdev64/msys2/mingw32/bin/../lib/gcc/i686-w64-mingw32/9.2.0/../../../../i686-w64-mingw32/bin/ld.exe:
 C:/gcdev64/gnucash/maint/src/gnucash-git/libgnucash/engine/gnc-date.cpp:217: 
undefined reference to 
`u_errorName_64'C:/gcdev64/msys2/mingw32/bin/../lib/gcc/i686-w64-mingw32/9.2.0/../../../../i686-w64-mingw32/bin/ld.exe:
 C:/gcdev64/gnucash/maint/src/gnucash-git/libgnucash/engine/gnc-date.cpp:222: 
undefined reference to `icu_64::Calendar::getFirstDayOfWeek(UErrorCode&) 
const'collect2.exe: error: ld returned 1 exit status

Any hints as to how to debug this one?
Thanks,
Matt
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Building on Windows

2019-08-15 Thread Matthew Forbis via gnucash-devel
Hi responding to myself:

First, forgot plain text in the first email, so I fixed the formatting in the 
original below to make it easier to read.
Second, my system has both icu 61 which is the one explicitly required for 
webkit as well as has icu 64 which was installed as part of the libxml2 
library.  When I do a pkg-config, it finds the version 61 one.  I suspect this 
might be related to my problem, but I'm not experienced enough as a programmer 
to figure out how to solve it.

Thanks,
Matt



On Thursday, August 15, 2019, 07:59:56 PM CDT, Matthew Forbis via gnucash-devel 
 wrote: 


Hi All,
I have recently worked on building GNUCash on windows to try to debug a problem 
I've been having with my reports.  I found a few things that look like the 
script might need to be updated for (or I had something wrong in my procedure).

1.  I had to install some packages through pacman manually:
openssl-devel - this seemed to keep python's hashlib from working correctly and 
not able to go very in the build process (I didn't start keeping notes right at 
the beginning).
mingw-w64-i686-gnutls - I don't remember the exact error this caused, but I had 
to install it to continue. (I think I had to use this format as well to install)
glib2-devel - Required for gnucash.
libxml2-devel - Required for gnucash
libxslt-devel - Required for gnucash

2.  When I got to webkitgtk3, I noticed it hadn't installed during the setup 
powershell script.  This failed due to a missing angleproject package.  This 
was not available in pacman anymore, so I ended up modifying setup-mingw64.ps1 
to add this to the install and re-ran it and it appears to have installed 
correctly.

But, that brings me to now where I'm stuck.  I am getting the following error 
when building:
[ 42%] Linking CXX shared library 
../../bin/libgncmod-engine.dllC:/gcdev64/msys2/mingw32/bin/../lib/gcc/i686-w64-mingw32/9.2.0/../../../../i686-w64-mingw32/bin/ld.exe:
 CMakeFiles/gncmod-engine.dir/objects.a(gnc-date.cpp.obj): in function 
`gnc_start_of_week':C:/gcdev64/gnucash/maint/src/gnucash-git/libgnucash/engine/gnc-date.cpp:214:
 undefined reference to 
`icu_64::Calendar::createInstance(UErrorCode&)'C:/gcdev64/msys2/mingw32/bin/../lib/gcc/i686-w64-mingw32/9.2.0/../../../../i686-w64-mingw32/bin/ld.exe:
 C:/gcdev64/gnucash/maint/src/gnucash-git/libgnucash/engine/gnc-date.cpp:217: 
undefined reference to 
`u_errorName_64'C:/gcdev64/msys2/mingw32/bin/../lib/gcc/i686-w64-mingw32/9.2.0/../../../../i686-w64-mingw32/bin/ld.exe:
 C:/gcdev64/gnucash/maint/src/gnucash-git/libgnucash/engine/gnc-date.cpp:222: 
undefined reference to `icu_64::Calendar::getFirstDayOfWeek(UErrorCode&) 
const'collect2.exe: error: ld returned 1 exit status

Any hints as to how to debug this one?

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