SQL Backend can't parse URL

Phil Longstaff plongstaff at rogers.com
Sun Feb 1 14:47:08 EST 2009

On February 1, 2009 02:33:24 pm Derek Atkins wrote:
> Phil,
> Quoting Phil Longstaff <plongstaff at rogers.com>:
> > which means that there was some problem initializing libdbi.
> >
> > Your listing above shows that the dbd file are in /usr/local/lib/dbd.  My
> > packages (ubuntu) put them in /usr/lib/dbd, so that is what I made the
> > default.  I would assume that /usr/lib/dbd doesn't exist on your machine,
> > which is why dbi_initialize() returns -1.
> >
> > Try adding '--with-dbi-dbd-dir=/usr/local/lib/dbd' to your configure
> > command.
> Why does GnuCash depend on the way that DBI was built?  I'm not familiar
> with the DBI API, but... does the application need to tell DBI where
> to find the DBD plugins?
> If yes, is there some way we could discover that (maybe via pkg-config)?
> If no, why do you need to know the DBD dir?

The relevant API is

	int dbi_initialize(const char *driverdir)

The return code is the number of dbd plugins, -1 if an error.  If driverdir is 
NULL, libdbi assumes '/usr/local/lib/dbd'.  The dbi backend uses the 
environment variable GNC_DBD_DIR to tell it what the driver dir is.  If it is 
not set, it assumes /usr/lib/dbd (since that is where the dbd plugins are put 
when I apt-get install them).  The configure option provides the value for the 
environment variable in the 'gnucash' command file.

I haven't looked around to see if pkg-config would work.  On sourceforge, 
libdbi and libdbi-drivers are separate projects.  I just looked through the 
source code for libdbi-drivers and didn't see any .pc files.



More information about the gnucash-devel mailing list