Replacement for libdbi

John Ralls jralls at
Sat Jan 11 13:53:48 EST 2014

I'd like to replace libdbi because they refused to change their use of time_t to avoid the 2038 bug, insisting that since *BSD use a 64-bit time_t, it's not a problem [1]. Furthermore, transactions are supported only in their new 0.9.0 version which isn't available yet in the major distros.

Unfortunately, neither are any of the other potential solutions. ODB [2], which I find particularly impressive, is supported on Fedora, but not Debian/Ubuntu. AFAICT, Debian/Ubuntu package only libdbi and tntdb [3] for multi-db access libraries. Fedora has also approved SOCI [4], but apparently has not yet implemented the package.

There are some other solutions out there, but they either require compiling the backends into the main binary (OTL [5]) or they aren't flexible about object-schema mapping (Debea [6]), which makes backward-compatibility with our existing database difficult.

FWIW, ODB does provide debs and rpms on their download page.

Boost unfortunately does not provide a sql-abstraction library.

Rather than depending on one of these libraries, we could fork one into our own repository; if we did that with libdbi, we could even fix the time_t problem.


John Ralls


More information about the gnucash-devel mailing list