Introduction to the team

2017-11-07 Thread m.j.k
Dear GnuCash-developers,

as I appreciate the value of the GnuCash tool for years now, I thought of 
getting involved by giving a hand with the development. As it is mentioned on 
the wiki site to "introduce yourself to the development team" here we go. 
Hopefully it is the right list/place for it. 

I have a degree in CS, and thus am familiar with OO programming and programming 
in general. My skills in C are good, but not yet as good as they could be, and 
I have a great pleasure working with the language. Further I am also interested 
in helping out with your long-term-plans, especially the code-transition to 
C++. It has been a long time since I programmed in this language, however, I 
would be delighted to dive into it again!   

As this is my first Open Source Project, please bear with me that I am not yet 
familiar with the policies and how communication works. While I skimmed through 
the wiki sites, every additional piece of advice and help from seniors is 
highly appreciated!

Thank you for your attention, so long and all the best,

Greetings,

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


Re: Missing glib/gobject when compiling

2017-11-07 Thread Edward Bridges
On Tue, Nov 7, 2017, at 10:26 AM, John Ralls wrote:
> 
> 
>> On Nov 6, 2017, at 6:27 PM, Edward Bridges
>>  wrote:>> 
>> On Mon, Nov 6, 2017, at 08:40 PM, Edward Bridges wrote:
>>> 
>>> On Sun, Nov 5, 2017, at 10:39 PM, John Ralls wrote:
 
 
> On Nov 5, 2017, at 6:07 PM, Edward Bridges
>  wrote:> 
> I've built libdbdpgsql.so using jhbuild build libdbi-drivers, then
> run:> 
> cp gnucash-stable/lib/dbd/libdbdpgsql.so \
>   /Applications/Gnucash.app/Contents/Resources/lib/dbd
> 
> 
> install_name_tool -change gnucash-stable/lib/libdbi.1.dylib \
>   /Applications/Gnucash.app/Contents/Resources/lib/libdbi.1.dyl-
>   ib \>   
> /Applications/Gnucash.app/Contents/Resources/lib/dbd/libdbdpgsq-
>   l.so> 
> I'm assuming that, then, when I start up Gnucash (v2.6.15) I would
> have> the
> option to "Save As..." to a Postgresql database option under "Data> 
> Format"
> but it's not appearing, and am not seeing any logs under Console.> 
> Thanks for your quick response earlier.  Am I missing a step
> somewhere> here?
 
 I think you also need the pgsql client dylib in the bundle and it
 would be better to use @executable_path/../Resources/lib/libdbi.1.dylib
 rather than /Applications/Gnucash.app/Contents as that will allow you
 to move the bundle.
 
 Use `otool -L
 /Applications/Gnucash.app/Contents/Resources/lib/dbd/libdbdpgsql.s-
 o` to make sure that your install_name_tool invocation did what you
 want. I’m suspicious of the relative path in your install_name_tool
 invocation. 
 Console doesn’t catch stderr anymore and hasn’t since Lion
 (10.7). You can check the trace file (`sudo find /var/private/Temp 
 -name
 gnucash.trace` to get the path) but link errors might not get into
 there either, so best to run GnuCash from a Terminal session:
 /Applications/Gnucash.app/Contents/MacOS/Gnucash
 so the stderr output goes where you can see it.
 
 Regards,
 John Ralls
>>> 
>>> Hi John --
>>> 
>>> Thanks for your help on this.  
>>> 
>>> When I run according to your instructions I get a brief error
>>> message>>> that libdbi is unable to load the driver -- and it still is not
>>> working>>> (see below).  I could not find a gnucash.trace file under /var
>>> as well.>>> 
>>> ```
>>> ~ $ /Applications/Gnucash.app/Contents/MacOS/Gnucash
>>> Application Path /Applications/Gnucash.app/Contents/MacOS/Gnucash-
>>> bin>>> 
>>> (process:4934): gnc.gui-WARNING **: [mac_set_languages()]
>>> Language list:>>> en:en_US:C
>>> (null)
>>> libdbi: Failed to load driver:
>>> /Applications/Gnucash.app/Contents/Resources/lib/dbd/libdbdpgsql.so>>> ^C
>>> 
>>> ~ $ otool -L
>>> /Applications/Gnucash.app/Contents/Resources/lib/dbd/libdbdpgsql.so>>> 
>>> /Applications/Gnucash.app/Contents/Resources/lib/dbd/libdbdpgsql.so:>>>  
>>> /Users/gnucash/gnucash-stable/lib/libpq.5.dylib (compatibility
>>>  version 5.0.0, current version 5.9.0)
>>>  /Users/gnucash/gnucash-stable/lib/libdbi.1.dylib (compatibility
>>>  version 3.0.0, current version 3.0.0)
>>>  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
>>>  version 1252.0.0)
>>> ```
>>> 
>>> Cheers, 
>>> Ed
>> 
>> Just noticed that `otool` is reporting that `libdbdpgsql.so` under 
>> /Applications/Guncash.app is depending on `libdbi` and `libpq` 
>> that live under the `gnucash` user home directory (i.e. that
>> were built>> along with libdbdpgsql.
>> 
>> That may explain the failure to load the shared library (as
>> the user I>> ran
>> Gnucash as does not have access to the gnucash user home directory).>> 
>> However, I tried running it as root as well, and still get the same
>> error
>> message.
> 
> What does `file /Applications/Gnucash.app/Contents/Resources/lib/db-
> d/libdbdpgsql.so` return?> 
> Regards,
> John Ralls
> 

It returns:

/Applications/Gnucash.app/Contents/Resources/lib/dbd/libdbdpgsql.so: Mach-
O 64-bit bundle x86_64
Thanks,
Ed

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


Re: Difficulty with apps-utils

2017-11-07 Thread Rob Gowin
Hi Aaron,

Since test-app-utils uses guile, you can't execute that test from the
build/bin directory without setting up the Guile environment. Look into
the Testing/Temporary/LastTest.log file to retreive the command
you need. For me, this command is

cmake "-E" "env" "GNC_BUILDDIR=$GNUCASH_BUILD" "GNC_UNINSTALLED=yes" \
  "GNC_BUILDDIR=$GNUCASH_BUILD" "GUILE_WARN_DEPRECATED=no" \
  "LD_LIBRARY_PATH=$GNUCASH_BUILD/lib:$GNUCASH_BUILD/lib/gnucash" \
  "GNC_MODULE_PATH=$GNUCASH_BUILD/lib:$GNUCASH_BUILD/lib/gnucash" \
  "GUILE=/usr/bin/guile"
"GUILE_LOAD_COMPILED_PATH=$GNUCASH_BUILD/lib/gnucash/scm/ccache/2.0" \

"GUILE_LOAD_PATH=$GNUCASH_SRC/libgnucash/app-utils/test/mod-foo:$GNUCASH_SRC/libgnucash/app-utils/test/mod-bar:$GNUCASH_SRC/libgnucash/app-utils/test/mod-baz"
\
  "$GNUCASH_BUILD/bin/test-app-utils"

where I have substituted $GNUCASH_BUILD and $GNUCASH_SRC for my
directory details.  But you can just cut-n-paste whatever command
is in LastTest.log to run the test.

When I clone and build your branch on Fedora 26 (gcc 7.1.1), I
get this message in my LastTest.log and when running the above
cmake command by hand:

Output:
--
/app-utils/option-util/Option DB Load: **
ERROR:/home/robg/gnucash/libgnucash/app-utils/test/test-option-util.cpp:98:void
test_option_load(Fixture*, gconstpointer): assertion failed
(gnc_option_db_lookup_string_option (odb, "Business", "Company Name",
FALSE) == "Bogus Company"): ("" == "Bogus Company")
Child aborted

I also get a segfault in test-engine after
gnc-budget_set_account_period_value()

What do you see in your Testing/Temporary/LastTest.log?

Regards,

Rob


On Tue, Nov 7, 2017 at 7:49 AM, Aaron Laws  wrote:

> I have made several changes on my branch to avoid kvp parsing keys. The
> last change I made removes the functions that take char*, but the unit test
> suite does not pass. All tests pass except app-utils which fails with the
> strange error:
>
> (./test-app-utils:6860): gnc.module-WARNING **: Could not locate module
> gnucash/app-utils interface v.0
>
> You can see my code at
>
> https://github.com/limitedatonement/gnucash/tree/fix_bayes
>
> Can anyone reproduce the problem? Any suggestions?
> ___
> 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


Re: Difficulty with apps-utils

2017-11-07 Thread Aaron Laws
On Tue, Nov 7, 2017 at 10:24 AM, John Ralls  wrote:
>
> > On Nov 7, 2017, at 5:49 AM, Aaron Laws  wrote:
> >
> > I have made several changes on my branch to avoid kvp parsing keys. The
> > last change I made removes the functions that take char*, but the unit
> test
> > suite does not pass. All tests pass except app-utils which fails with the
> > strange error:
> >
> > (./test-app-utils:6860): gnc.module-WARNING **: Could not locate module
> > gnucash/app-utils interface v.0
> >
> > You can see my code at
> >
> > https://github.com/limitedatonement/gnucash/tree/fix_bayes
> >
> > Can anyone reproduce the problem? Any suggestions?
>
> I dunno if it’s strange. It means that it can’t find
> libgncmod-app-utils.so either because the path isn’t included in
> GNC_MODULE_PATH or because it’s not built yet.
>
> Regards,
> John Ralls
>

The reason it's strange is because the last commit (without which this
problem is not manifest) doesn't seem to have anything to do with this
library. The file you mentioned is still at build/lib/gnucash as it is in
the last known working commit (HEAD^)...none of the other configuration is
different? I'm at a loss.

I'm heading away for a day, but I'll continue to experiment when I get back.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Missing glib/gobject when compiling

2017-11-07 Thread John Ralls


> On Nov 6, 2017, at 6:27 PM, Edward Bridges  wrote:
> 
> On Mon, Nov 6, 2017, at 08:40 PM, Edward Bridges wrote:
>> 
>> On Sun, Nov 5, 2017, at 10:39 PM, John Ralls wrote:
>>> 
>>> 
 On Nov 5, 2017, at 6:07 PM, Edward Bridges  wrote:
 
 I've built libdbdpgsql.so using jhbuild build libdbi-drivers, then run:
 
 cp gnucash-stable/lib/dbd/libdbdpgsql.so \
   /Applications/Gnucash.app/Contents/Resources/lib/dbd
 
 
 install_name_tool -change gnucash-stable/lib/libdbi.1.dylib \
   /Applications/Gnucash.app/Contents/Resources/lib/libdbi.1.dylib \
   /Applications/Gnucash.app/Contents/Resources/lib/dbd/libdbdpgsql.so
 
 I'm assuming that, then, when I start up Gnucash (v2.6.15) I would have
 the
 option to "Save As..." to a Postgresql database option under "Data
 Format"
 but it's not appearing, and am not seeing any logs under Console.
 
 Thanks for your quick response earlier.  Am I missing a step somewhere
 here?
>>> 
>>> I think you also need the pgsql client dylib in the bundle and it would
>>> be better to use @executable_path/../Resources/lib/libdbi.1.dylib rather
>>> than /Applications/Gnucash.app/Contents as that will allow you to move
>>> the bundle.
>>> 
>>> Use `otool -L
>>> /Applications/Gnucash.app/Contents/Resources/lib/dbd/libdbdpgsql.so` to
>>> make sure that your install_name_tool invocation did what you want. I’m
>>> suspicious of the relative path in your install_name_tool invocation.
>>> 
>>> Console doesn’t catch stderr anymore and hasn’t since Lion (10.7). You
>>> can check the trace file (`sudo find /var/private/Temp -name
>>> gnucash.trace` to get the path) but link errors might not get into there
>>> either, so best to run GnuCash from a Terminal session:
>>> /Applications/Gnucash.app/Contents/MacOS/Gnucash
>>> so the stderr output goes where you can see it.
>>> 
>>> Regards,
>>> John Ralls
>> 
>> Hi John --
>> 
>> Thanks for your help on this.  
>> 
>> When I run according to your instructions I get a brief error message
>> that libdbi is unable to load the driver -- and it still is not working
>> (see below).  I could not find a gnucash.trace file under /var as well.
>> 
>> ```
>> ~ $ /Applications/Gnucash.app/Contents/MacOS/Gnucash
>> Application Path /Applications/Gnucash.app/Contents/MacOS/Gnucash-bin
>> 
>> (process:4934): gnc.gui-WARNING **: [mac_set_languages()] Language list:
>> en:en_US:C
>> (null)
>> libdbi: Failed to load driver:
>> /Applications/Gnucash.app/Contents/Resources/lib/dbd/libdbdpgsql.so
>> ^C
>> 
>> ~ $ otool -L
>> /Applications/Gnucash.app/Contents/Resources/lib/dbd/libdbdpgsql.so
>> /Applications/Gnucash.app/Contents/Resources/lib/dbd/libdbdpgsql.so:
>>  /Users/gnucash/gnucash-stable/lib/libpq.5.dylib (compatibility
>>  version 5.0.0, current version 5.9.0)
>>  /Users/gnucash/gnucash-stable/lib/libdbi.1.dylib (compatibility
>>  version 3.0.0, current version 3.0.0)
>>  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
>>  version 1252.0.0)
>> ```
>> 
>> Cheers, 
>> Ed
> 
> Just noticed that `otool` is reporting that `libdbdpgsql.so` under 
> /Applications/Guncash.app is depending on `libdbi` and `libpq` 
> that live under the `gnucash` user home directory (i.e. that were built
> along with libdbdpgsql.
> 
> That may explain the failure to load the shared library (as the user I
> ran
> Gnucash as does not have access to the gnucash user home directory).
> 
> However, I tried running it as root as well, and still get the same
> error
> message.

What does `file 
/Applications/Gnucash.app/Contents/Resources/lib/dbd/libdbdpgsql.so` return?

Regards,
John Ralls

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


Re: Difficulty with apps-utils

2017-11-07 Thread John Ralls


> On Nov 7, 2017, at 5:49 AM, Aaron Laws  wrote:
> 
> I have made several changes on my branch to avoid kvp parsing keys. The
> last change I made removes the functions that take char*, but the unit test
> suite does not pass. All tests pass except app-utils which fails with the
> strange error:
> 
> (./test-app-utils:6860): gnc.module-WARNING **: Could not locate module
> gnucash/app-utils interface v.0
> 
> You can see my code at
> 
> https://github.com/limitedatonement/gnucash/tree/fix_bayes
> 
> Can anyone reproduce the problem? Any suggestions?

I dunno if it’s strange. It means that it can’t find libgncmod-app-utils.so 
either because the path isn’t included in GNC_MODULE_PATH or because it’s not 
built yet.

Regards,
John Ralls

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


Difficulty with apps-utils

2017-11-07 Thread Aaron Laws
I have made several changes on my branch to avoid kvp parsing keys. The
last change I made removes the functions that take char*, but the unit test
suite does not pass. All tests pass except app-utils which fails with the
strange error:

(./test-app-utils:6860): gnc.module-WARNING **: Could not locate module
gnucash/app-utils interface v.0

You can see my code at

https://github.com/limitedatonement/gnucash/tree/fix_bayes

Can anyone reproduce the problem? Any suggestions?
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel