ledger-3.1.1 with debian buster two errors on make check

24 views
Skip to first unread message

mil...@verizon.net

unread,
Jul 7, 2017, 10:18:02 PM7/7/17
to Ledger
Please see attached.

AFAIK all dependencies listed for Debian have been installed, i.e. ./acprep dependencies raised no flags and ./acprep update did have a few hiccups.

Is there a step I am missing or is there another necessary library?

Charles Millar
ledgermakecheck

ericb...@gmail.com

unread,
Jan 7, 2018, 6:36:38 PM1/7/18
to Ledger
I see the same two tests failing currently in the GNU Guix ledger package.  The failure output of the tests looks something like:

"BaselineTest_opt-datetime-format" start time: Jan 07 13:58 UTC
Output:
----------------------------------------------------------

FAILURE in output from /tmp/guix-build-ledger-3.1.1.drv-0/ledger-3.1.1/test/baseline/opt-datetime-format.test:
--
$ledger -f "/tmp/guix-build-ledger-3.1.1.drv-0/ledger-3.1.1/test/baseline/opt-datetime-format.test" bal --time-report --datetime-format '%m/%d/%y %I:%M %p'
--
  @@ -5,4 +5,4 @@
     04/05/13 12:00 PM    04/05/13 01:30 PM       1.50h    Lunch
     04/05/13 11:30 AM    04/05/13 12:00 PM       30.0m    Walk
   --------------------------------------------------
  -
  +^[[1m                   ^[[0m  ^[[1m                   ^[[0m  *
E[opt-datetime-format.test]STDERR:


FAILED (1)
<end of output>
Test time =   0.06 sec

E.g. there's an unexpected trailing asterisk '*' on the last line (the control characters appear to be harmless).

GCC 5.4.0
Boost 1.64.0
Python 2.7.13

I had a bit of a time trying to create a fix on my own.  What I think is happening is that the 'last_checkout_cleared' boolean in src/account.h is not being initialized, so the '
%(latest_checkout_cleared ? \"*\" : \" \")' expression in src/report.h is returning with "*" when it shouldn't.  This patch seems to fix things for me:

diff --git a/src/account.h b/src/account.h
index 1b97463d..f2555593 100644
--- a/src/account.h
+++ b/src/account.h
@@ -187,7 +187,7 @@ public:
 
       datetime_t         earliest_checkin;
       datetime_t         latest_checkout;
-      bool               latest_checkout_cleared;
+      bool               latest_checkout_cleared = false;
 
       std::set<path>     filenames;
       std::set<string>   accounts_referenced;

Hope this helps.  Maybe someone more familiar with the ledger codebase can come up with a better solution.

BTW, I would post this as an issue to bugzilla.ledger-cli.org but it seems to be down at the moment.

Happy Hacking,
`~Eric Bavier

Michael Budde

unread,
Jan 8, 2018, 2:54:11 AM1/8/18
to ledge...@googlegroups.com
Hi Eric

My pull request with a fix for this issue was merged to the next branch a week ago: https://github.com/ledger/ledger/pull/505


Regards

--

---
You received this message because you are subscribed to the Google Groups "Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages