Re: compile errors

2016-11-19 Thread John Ralls

> On Nov 19, 2016, at 11:14 AM, Rob Gowin  wrote:
> 
> On Sat, Nov 19, 2016 at 12:26 PM, Alex Aycinena 
> wrote:
> 
>> On Sat, Nov 19, 2016 at 10:09 AM, John Ralls  wrote:
>> 
>>> 
 On Nov 19, 2016, at 9:34 AM, Alex Aycinena 
>>> wrote:
>> 
 
 Don't know if you already knew that.
>>> 
>>> Alex,
>>> 
>>> Nope, didn't know that because it passes on Travis and all of my VMs
>>> including Fedora-24, so ISTM you have a local problem.
>>> 
>>> A clue is that the error about the error about xaccSplitEqualCheckBal
>>> isn't issued until line 967, yet the test reports that it's failing at
>> line
>>> 948.
>>> 
>>> Regards,
>>> John Ralls
>>> 
>>> 
>>> John,
>> 
>> I think I got the error because I had done a git pull followed by a make
>> and make check without redoing autogen, clearing out the build directory
>> and rerunning configure. My mistake. When I did it that way, it all
>> workied.
>> 
>> Thanks,
>> 
>> Alex
>> 
>> 
> 
> [ Alex, I originally forgot to reply-all, so you'll see this twice. ]
> 
> For what it's worth, I am able to reproduce this failure in test-engine on
> Ubuntu 16.04.4, g++ 5.4.0. I started looking into why the test did not fail
> in the CMake build environment. It seems to be an intermittent failure for
> me.  It only happens when running under the gtester program, with both
> MALLOC_CHECK_ and MALLOC_PERTURB_ set. After Alex's most recent comment, I
> did a new clone, autogen.sh, configure, make and make check, and am able to
> see the failure.
> 
> The CMake test environment does not use gtester, nor does it set the
> MALLOC* environment variables. I suppose it should.
> 
> 
> I ran this script in src/test/engine to run test-engine 500 times and it
> always fails at some point:
> 
> #!/bin/bash
> 
> for run in {1..500}; do
>   MALLOC_CHECK_=2 MALLOC_PERTURB_=$((${RANDOM:-256} % 256)) gtester
> --verbose test-engine
>   if [ $? -ne 0 ]; then
>   echo '** FAIL **'
>   exit 1
>   fi
> done
> echo '** PASS **'
> exit 0


Hmm. I ran your script 5 times (so 2500 total runs of test-engine) on my Fedora 
24 VM and it passed every time.

Does the machine/VM that you tested on have an installed GnuCash? If so, are 
you absolutely certain that the test build can't link the installed libraries?

Regards,
John Ralls




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


Re: Lots in Account screen : Value sign

2016-11-19 Thread David Carlson
Hi Chris

I just looked at the the current state of nightly build for Tutorial and
Concepts Guide lots section of the investments chapter, and I now see how
the lots features are supposed to work.  I think that pointing out in that
section that Buy transactions are considered Opening Transactions if they
precede the Sales or Closing transactions in time, and the opposite would
be true in the case of short sales.  This would tie in to the Opened and
Closed labels in the the Lots panel, and would also suggest a way to handle
a short sale to users who might do that.

I like the overall structure of that section and how it makes a seemingly
overwhelming topic manageable.

David C

On Sat, Nov 19, 2016 at 1:11 PM, Chris Good 
wrote:

> Hi David,
>
> Can you please explain more about where you would like to see the "Opening
> Transaction" and "Closing Transaction" terms?
>
> Regards,
> Chris Good
>
> On 20 Nov 2016, at 5:54 AM, David Carlson 
> wrote:
>
> I do not currently use the lots feature either, but I agree that I would
> not consider using it unless the display were consistent as Geert says the
> next version will be.  Other use cases that would clearly benefit would be
> short sales and option transactions.
>
> I think that if the terms "Opening Transaction" and "Closing Transaction"
> are used in the documentation, it would be easy to distinguish which lots
> are eligible for matching.
>
> David C
>
> On Sat, Nov 19, 2016 at 11:59 AM, Geert Janssens <
> geert.gnuc...@kobaltwit.be> wrote:
>
>> On Thursday 17 November 2016 11:30:18 Chris Good wrote:
>> > Re https://bugzilla.gnome.org/show_bug.cgi?id=770364
>> >
>> >
>> >
>> > Currently the Lots in Account screen reverses the sign of the value
>> > shown in all the splits in the Splits Free and Splits in Lot panels,
>> > except the first. The reason this was done seems to be that because
>> > each buy has a unique lot, the first transaction (usually a buy)
>> > should be +ve and all the other splits in the lot should be sales
>> > (-ve).
>> >
>> >
>> >
>> > This makes the Splits Free panel confusing because it can contain
>> > splits from multiple buys and sells.
>> >
>> >
>> >
>> > I would like to change it so that the changing of the sign is removed
>> > from both the Splits Free and Splits in Lot panels.
>> >
>> > I.e. Buys: Amount (No of shares) and Value are +ve, Sells: Amount and
>> > Value are -ve.
>> >
>> >
>> >
>> > Does anyone have any further input as to why the signs should be as
>> > they are or objections to this change?
>> >
>> Just for completeness, the next version of gnucash will already remove
>> this from the Splits Free
>> panel as it makes no sense at all there. So the discussion here should
>> focus solely on the Splits
>> in Lot part of the lot viewer.
>>
>> Other than that I don't have an opinion on this. I don't know why this
>> inversion was added and I
>> don't use lots for capital gains calculations.
>>
>> Regards,
>>
>> Geert
>> ___
>> 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: compile errors

2016-11-19 Thread Rob Gowin
On Sat, Nov 19, 2016 at 12:26 PM, Alex Aycinena 
wrote:

> On Sat, Nov 19, 2016 at 10:09 AM, John Ralls  wrote:
>
> >
> > > On Nov 19, 2016, at 9:34 AM, Alex Aycinena 
> > wrote:
>
> > >
> > > Don't know if you already knew that.
> >
> > Alex,
> >
> > Nope, didn't know that because it passes on Travis and all of my VMs
> > including Fedora-24, so ISTM you have a local problem.
> >
> > A clue is that the error about the error about xaccSplitEqualCheckBal
> > isn't issued until line 967, yet the test reports that it's failing at
> line
> > 948.
> >
> > Regards,
> > John Ralls
> >
> >
> > John,
>
> I think I got the error because I had done a git pull followed by a make
> and make check without redoing autogen, clearing out the build directory
> and rerunning configure. My mistake. When I did it that way, it all
> workied.
>
> Thanks,
>
> Alex
>
>

[ Alex, I originally forgot to reply-all, so you'll see this twice. ]

For what it's worth, I am able to reproduce this failure in test-engine on
Ubuntu 16.04.4, g++ 5.4.0. I started looking into why the test did not fail
in the CMake build environment. It seems to be an intermittent failure for
me.  It only happens when running under the gtester program, with both
MALLOC_CHECK_ and MALLOC_PERTURB_ set. After Alex's most recent comment, I
did a new clone, autogen.sh, configure, make and make check, and am able to
see the failure.

The CMake test environment does not use gtester, nor does it set the
MALLOC* environment variables. I suppose it should.


I ran this script in src/test/engine to run test-engine 500 times and it
always fails at some point:

#!/bin/bash

for run in {1..500}; do
   MALLOC_CHECK_=2 MALLOC_PERTURB_=$((${RANDOM:-256} % 256)) gtester
--verbose test-engine
   if [ $? -ne 0 ]; then
   echo '** FAIL **'
   exit 1
   fi
done
echo '** PASS **'
exit 0
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Lots in Account screen : Value sign

2016-11-19 Thread Chris Good
Hi David,

Can you please explain more about where you would like to see the "Opening 
Transaction" and "Closing Transaction" terms?

Regards,
Chris Good

> On 20 Nov 2016, at 5:54 AM, David Carlson  wrote:
> 
> I do not currently use the lots feature either, but I agree that I would not 
> consider using it unless the display were consistent as Geert says the next 
> version will be.  Other use cases that would clearly benefit would be short 
> sales and option transactions.  
> 
> I think that if the terms "Opening Transaction" and "Closing Transaction" are 
> used in the documentation, it would be easy to distinguish which lots are 
> eligible for matching.
> 
> David C
> 
>> On Sat, Nov 19, 2016 at 11:59 AM, Geert Janssens 
>>  wrote:
>> On Thursday 17 November 2016 11:30:18 Chris Good wrote:
>> > Re https://bugzilla.gnome.org/show_bug.cgi?id=770364
>> >
>> >
>> >
>> > Currently the Lots in Account screen reverses the sign of the value
>> > shown in all the splits in the Splits Free and Splits in Lot panels,
>> > except the first. The reason this was done seems to be that because
>> > each buy has a unique lot, the first transaction (usually a buy)
>> > should be +ve and all the other splits in the lot should be sales
>> > (-ve).
>> >
>> >
>> >
>> > This makes the Splits Free panel confusing because it can contain
>> > splits from multiple buys and sells.
>> >
>> >
>> >
>> > I would like to change it so that the changing of the sign is removed
>> > from both the Splits Free and Splits in Lot panels.
>> >
>> > I.e. Buys: Amount (No of shares) and Value are +ve, Sells: Amount and
>> > Value are -ve.
>> >
>> >
>> >
>> > Does anyone have any further input as to why the signs should be as
>> > they are or objections to this change?
>> >
>> Just for completeness, the next version of gnucash will already remove this 
>> from the Splits Free
>> panel as it makes no sense at all there. So the discussion here should focus 
>> solely on the Splits
>> in Lot part of the lot viewer.
>> 
>> Other than that I don't have an opinion on this. I don't know why this 
>> inversion was added and I
>> don't use lots for capital gains calculations.
>> 
>> Regards,
>> 
>> Geert
>> ___
>> 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: Lots in Account screen : Value sign

2016-11-19 Thread David Carlson
I do not currently use the lots feature either, but I agree that I would
not consider using it unless the display were consistent as Geert says the
next version will be.  Other use cases that would clearly benefit would be
short sales and option transactions.

I think that if the terms "Opening Transaction" and "Closing Transaction"
are used in the documentation, it would be easy to distinguish which lots
are eligible for matching.

David C

On Sat, Nov 19, 2016 at 11:59 AM, Geert Janssens  wrote:

> On Thursday 17 November 2016 11:30:18 Chris Good wrote:
> > Re https://bugzilla.gnome.org/show_bug.cgi?id=770364
> >
> >
> >
> > Currently the Lots in Account screen reverses the sign of the value
> > shown in all the splits in the Splits Free and Splits in Lot panels,
> > except the first. The reason this was done seems to be that because
> > each buy has a unique lot, the first transaction (usually a buy)
> > should be +ve and all the other splits in the lot should be sales
> > (-ve).
> >
> >
> >
> > This makes the Splits Free panel confusing because it can contain
> > splits from multiple buys and sells.
> >
> >
> >
> > I would like to change it so that the changing of the sign is removed
> > from both the Splits Free and Splits in Lot panels.
> >
> > I.e. Buys: Amount (No of shares) and Value are +ve, Sells: Amount and
> > Value are -ve.
> >
> >
> >
> > Does anyone have any further input as to why the signs should be as
> > they are or objections to this change?
> >
> Just for completeness, the next version of gnucash will already remove
> this from the Splits Free
> panel as it makes no sense at all there. So the discussion here should
> focus solely on the Splits
> in Lot part of the lot viewer.
>
> Other than that I don't have an opinion on this. I don't know why this
> inversion was added and I
> don't use lots for capital gains calculations.
>
> Regards,
>
> Geert
> ___
> 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: compile errors

2016-11-19 Thread Alex Aycinena
On Sat, Nov 19, 2016 at 10:09 AM, John Ralls  wrote:

>
> > On Nov 19, 2016, at 9:34 AM, Alex Aycinena 
> wrote:
> >
> >
> >
> > On Fri, Nov 18, 2016 at 4:50 PM, John Ralls  wrote:
> >
> > > On Nov 18, 2016, at 2:49 PM, John Ralls  wrote:
> > >
> > >
> > >> On Nov 18, 2016, at 12:53 PM, Alex Aycinena 
> wrote:
> > >>
> > >>
> > >>
> > >> On Thu, Nov 17, 2016 at 5:10 PM, John Ralls  > wrote:
> > >>
> > >>> On Nov 17, 2016, at 4:54 PM, Alex Aycinena  mailto:alex.aycin...@gmail.com>> wrote:
> > >>>
> > >>> Hi,
> > >>>
> > >>> I get the following compile errors today:
> > >>>
> > >> 
> > >>>
> > >>> Am I missing a library or something?
> > >>
> > >> Alex,
> > >>
> > >> That didn't take long! ;-)
> > >>
> > >> Only if your compiler doesn't support C++11. More likely your
> libstdc++ doesn't pull in  when  is included.
> > >>
> > >> Travis puked test-backend-dbi-basic.c for a similar complaint, this
> one for std::for_each. I've just pushed what I hope will fix that and your
> error.
> > >>
> > >> Regards,
> > >> John Ralls
> > >>
> > >>
> > >> John,
> > >>
> > >> After pulling in your push, I now get:
> > >>
> > >> /home/gnucash-dev/gitcheckouts/gnucash-clean/src/backend/dbi/gnc-dbiproviderimpl.hpp:
> In member function ‘StrVec GncDbiProviderImpl::get_table_list(dbi_conn,
> const string&) [with DbType T = (DbType)0; StrVec =
> std::vector; dbi_conn = void*;
> std::__cxx11::string = std::__cxx11::basic_string]’:
> >
> > 
> >
> > >> Makefile:678: recipe for target 'gnc-dbisqlconnection.lo' failed
> > >>
> > >>
> > >> I'm building on Fedora 24, by the way.
> > >
> > > Alex,
> > >
> > > My first guess would be that gnc-dbiproviderimpl.hpp and
> gnc-dbisqlconnection.hpp need the same treatment, to add "#include
>  to the other libstdc++ headers. I'll have to set up a fedora24
> VM to duplicate your build environment, so it will take a few hours to be
> sure.
> > >
> >
> > Alex,
> >
> > Done and pushed.
> >
> > Regards,
> > John Ralls
> >
> >
> > John,
> >
> > Thanks, Make now works. But make check failed at:
> >
>
>



> >
> > Don't know if you already knew that.
>
> Alex,
>
> Nope, didn't know that because it passes on Travis and all of my VMs
> including Fedora-24, so ISTM you have a local problem.
>
> A clue is that the error about the error about xaccSplitEqualCheckBal
> isn't issued until line 967, yet the test reports that it's failing at line
> 948.
>
> Regards,
> John Ralls
>
>
> John,

I think I got the error because I had done a git pull followed by a make
and make check without redoing autogen, clearing out the build directory
and rerunning configure. My mistake. When I did it that way, it all workied.

Thanks,

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


Re: Lots in Account screen : Value sign

2016-11-19 Thread Geert Janssens
On Thursday 17 November 2016 11:30:18 Chris Good wrote:
> Re https://bugzilla.gnome.org/show_bug.cgi?id=770364
> 
> 
> 
> Currently the Lots in Account screen reverses the sign of the value
> shown in all the splits in the Splits Free and Splits in Lot panels,
> except the first. The reason this was done seems to be that because
> each buy has a unique lot, the first transaction (usually a buy)
> should be +ve and all the other splits in the lot should be sales
> (-ve).
> 
> 
> 
> This makes the Splits Free panel confusing because it can contain
> splits from multiple buys and sells.
> 
> 
> 
> I would like to change it so that the changing of the sign is removed
> from both the Splits Free and Splits in Lot panels.
> 
> I.e. Buys: Amount (No of shares) and Value are +ve, Sells: Amount and
> Value are -ve.
> 
> 
> 
> Does anyone have any further input as to why the signs should be as
> they are or objections to this change?
> 
Just for completeness, the next version of gnucash will already remove this 
from the Splits Free 
panel as it makes no sense at all there. So the discussion here should focus 
solely on the Splits 
in Lot part of the lot viewer.

Other than that I don't have an opinion on this. I don't know why this 
inversion was added and I 
don't use lots for capital gains calculations.

Regards,

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


Re: compile errors

2016-11-19 Thread Alex Aycinena
On Fri, Nov 18, 2016 at 4:50 PM, John Ralls  wrote:

>
> > On Nov 18, 2016, at 2:49 PM, John Ralls  wrote:
> >
> >
> >> On Nov 18, 2016, at 12:53 PM, Alex Aycinena 
> wrote:
> >>
> >>
> >>
> >> On Thu, Nov 17, 2016 at 5:10 PM, John Ralls  > wrote:
> >>
> >>> On Nov 17, 2016, at 4:54 PM, Alex Aycinena  > wrote:
> >>>
> >>> Hi,
> >>>
> >>> I get the following compile errors today:
> >>>
> >> 
> >>>
> >>> Am I missing a library or something?
> >>
> >> Alex,
> >>
> >> That didn't take long! ;-)
> >>
> >> Only if your compiler doesn't support C++11. More likely your libstdc++
> doesn't pull in  when  is included.
> >>
> >> Travis puked test-backend-dbi-basic.c for a similar complaint, this one
> for std::for_each. I've just pushed what I hope will fix that and your
> error.
> >>
> >> Regards,
> >> John Ralls
> >>
> >>
> >> John,
> >>
> >> After pulling in your push, I now get:
> >>
> >> /home/gnucash-dev/gitcheckouts/gnucash-clean/src/backend/dbi/gnc-dbiproviderimpl.hpp:
> In member function ‘StrVec GncDbiProviderImpl::get_table_list(dbi_conn,
> const string&) [with DbType T = (DbType)0; StrVec =
> std::vector; dbi_conn = void*;
> std::__cxx11::string = std::__cxx11::basic_string]’:
>




> >> Makefile:678: recipe for target 'gnc-dbisqlconnection.lo' failed
> >>
> >>
> >> I'm building on Fedora 24, by the way.
> >
> > Alex,
> >
> > My first guess would be that gnc-dbiproviderimpl.hpp and
> gnc-dbisqlconnection.hpp need the same treatment, to add "#include
>  to the other libstdc++ headers. I'll have to set up a fedora24
> VM to duplicate your build environment, so it will take a few hours to be
> sure.
> >
>
> Alex,
>
> Done and pushed.
>
> Regards,
> John Ralls
>
>
> John,

Thanks, Make now works. But make check failed at:

TEST: test-engine... (pid=12539)
Unable to use either provided tzname or TZ environment variable. Resorting
to /etc/localtime.
  /engine/Account/gnc set account separator:   OK
  /engine/Account/gnc account name violations errmsg:  OK
  /engine/Account/gnc account list name violations:OK
  /engine/Account/account create and destroy:  OK
  /engine/Account/xaccMallocAccount:   OK
  /engine/Account/gnc account create root: OK
  /engine/Account/xaccCloneAccount:OK
  /engine/Account/xaccFreeAccountChildren: OK
  /engine/Account/xaccFreeAccount: OK
  /engine/Account/xaccAccountCommitEdit:   OK
  /engine/Account/gnc account insert & remove split:   OK
  /engine/Account/xaccAccount Insert and Remove Lot:   OK
  /engine/Account/xaccAccountRecomputeBalance: OK
  /engine/Account/xaccAccountOrder:OK
  /engine/Account/qofAccountSetParent: OK
  /engine/Account/gnc account n descendants:   OK
  /engine/Account/gnc account get current depth:   OK
  /engine/Account/gnc account get tree depth:  OK
  /engine/Account/gnc account get descendants: OK
  /engine/Account/gnc account get descendants sorted:  OK
  /engine/Account/gnc account lookup by name:  OK
  /engine/Account/gnc account lookup by code:  OK
  /engine/Account/gnc account lookup by full name helper:  OK
  /engine/Account/gnc account lookup by full name: OK
  /engine/Account/gnc account foreach child:   OK
  /engine/Account/gnc account foreach descendant:  OK
  /engine/Account/gnc account foreach descendant until:OK
  /engine/Account/gnc account get full name:   OK
  /engine/Account/xaccAccountGetProjectedMinimumBalance:   OK
  /engine/Account/xaccAccountGetBalanceAsOfDate:   OK
  /engine/Account/xaccAccountGetPresentBalance:OK
  /engine/Account/xaccAccountFindOpenLots: OK
  /engine/Account/xaccAccountForEachLot:   OK
  /engine/Account/xaccAccountHasAncestor:  OK
  /engine/Account/AccountType Stuff:   OK
  /engine/Account/AccountType Compatibility:   OK
  /engine/Account/xaccAccountFindSplitByDesc:  OK
  /engine/Account/xaccAccountFindTransByDesc:  OK
  /engine/Account/gnc account join children:   OK
  /engine/Account/gnc account merge