libdbi and its drivers e.g. libdbd-sqlite (was: 3 of 4 tests failed)

Christian Stimming stimming at tuhh.de
Mon Feb 14 02:58:30 EST 2011


Zitat von John Ralls <jralls at ceridwen.us>:
>>> FAIL: test-dbi-basic
>>> Using filename: /tmp/test-1nygX3
>>> Testing sqlite3
>>> * 15:49:08  WARN <gnc.backend.dbi> Session Error: 3,
>>> FAILURE First DB Session Creation Failed test-dbi-stuff.c:181
>>> TEST_MYSQL_URL=''
>>> TEST_PGSQL_URL=''
>>> Executed 1 test. There was 1 failure.
>>> FAIL: test-dbi
>>> Using filename: /tmp/test-ghZ0Ht
>>> Testing sqlite3
>>> FAILURE TaxTable lists match test-dbi-stuff.c:55
>>> FAILURE Customer lists match test-dbi-stuff.c:55
>>> FAILURE Employee lists match test-dbi-stuff.c:55
>>> You may ignore the warning about the lock file having no entries: We had to
>>> ignore locking to run two sessions on the same database
>>> Executed 7 tests. There were 3 failures.
>>> FAIL: test-dbi-business
>>> Executed 1 test. All tests passed.
>>> PASS: test-load-backend
>>> ==========================================
>>> 3 of 4 tests failed
>>> Please report to gnucash-devel at gnucash.org
>>> ==========================================
>>> make[6]: *** [check-TESTS] Error 1
>>> make[6]: Leaving directory
>>> `/home/paulvbrown/Downloads/gnucash-2.4.2/src/backend/dbi/test'
>>
>> Looks like you probably have the libdbi bug  
>> (http://wiki.gnucash.org/wiki/FAQ#Q:_I_tried_to_start_up_Gnucash_2.4.1_on_my_SQL_database_and_I_got_an_error_about_libdbi_and_large_numbers).
>
> I've looked at the code again, and I think that you don't have any  
> dbi drivers installed rather than that you have the libdbi bug.  
> Error code 3 is "BAD URL", and it's emitted when the required  
> backend can't be initialized.
>
> If you don't want to build a SQL backend, just pass --disable-dbi to  
> configure. If you do, then you'll need to troubleshoot a bit to  
> figure out why Gnucash can't find the ones you've built. You may  
> need to export GNC_DBD_DIR with the path to where they are.

I think I've run into the very same bug. It is caused by having the  
libdbi-dev package installed, but none of the actual libdbi's database  
drivers. On Ubuntu, the drivers are called libdbd-mysql [sic!],  
libdbd-pgsql, and libdbd-sqlite. Installing any of those packages  
solves the failing "make check".

[rant] I have to say this is rather unintuitive to find out, at least  
on the Ubuntu 10.10 I'm using. The package libdbi-dev (libdbi0-dev to  
be precise) installs fine and gnucash's ./configure --enable-dbi  
passes just fine, but there isn't any warning or message about the  
required additional installation of any drivers package. This is  
mostly a distro bug: The libdbi0 package should at least "recommend"  
the installation of any of its drivers. Even worse, the package naming  
of the drivers does not include the string "libdbi"; instead, they are  
called "libdbd-sqlite", "libdbd-mysql" and so on, see  
https://launchpad.net/ubuntu/+source/libdbi-drivers  [/rant]

Can gnucash add a more clear error message to check whether the  
expected database driver is actually there? I guess in these tests  
that would be right here:

> make[6]: Entering directory
> `/home/paulvbrown/Downloads/gnucash-2.4.2/src/backend/dbi/test'
> Using filename: /tmp/test-6BTwdI
> Testing sqlite3
> * 15:49:07  WARN <gnc.backend.dbi> Session Error: 3,
> FAILURE First DB Session Creation Failed test-dbi-stuff.c:181
> Testing safe save sqlite3

Thanks!

Regards,

Christian




More information about the gnucash-devel mailing list