Ledger and Building It From Source on Ubuntu 10.04

So I recently started looking around for finance software that would run on Ubuntu and quickly found reasons to dislike suggested options. Then I found Ledger. Wow, did it seem awesome by comparison. So, I added the Ubuntu PPA (see the “Platform binaries” section of this wiki page), installed it, created a data file for my finances, and ran the ledger CLI executable on it.

Then I ran into a problem that appeared to be a bug: in a transaction with multiple postings and only one with a null amount, I was receiving the error, “Error: Only one posting with null amount allowed per transaction.” Checking the Google Group didn’t reveal any other reports of the issue, nor did searching the Bugzilla database.

So, I hopped onto the #ledger IRC channel on Freenode, which is the network I tend to frequent anyway. Within minutes, I was able to have the lead developer on the project confirm that the issue appeared to be a bug and politely request that I file a bug report for it, which I did.

I was also able to consult the README-1ST file for instructions on how to do a custom build from source, which I intended to use to ensure that the bug hadn’t already been fixed in the git repository. The only thing that this file lacked was a list of dependencies, but I was able to locate those through trial and error with the build tool and thought I’d post them here for anyone else looking to build ledger from source on Ubuntu 10.04.

sudo apt-get install libboost-dev libboost-date-time-dev libboost-filesystem-dev libboost-iostreams-dev libboost-regex-dev libgmp3-dev libmpfr-dev texinfo

Once you’ve executed the command above from the shell, you should be able to run the command below from the README-1ST file to create your build. The executable will be created in the root of the source tree and named “ledger.”

./acprep update

To create a debug build, which I did to be able to submit debugging output related to my issue, issue this command following the one above.

./acprep debug make

Update: As it turns out, the issue was not a bug, just a small formatting issue with my data file. However, the lead developer of ledger still plans on looking into make the issue more obvious in ledger’s output.

Update #2: It seems the ledger build tool dependencies command supports Ubuntu, CentOS, and OS X. The way the statement was positioned in the README-1ST file, I assumed that support was limited to OS X. So, rather than going through the lengthy process I did to install dependencies on Ubuntu, you can just do this.

./acprep dependencies

Comments are closed.