GNOME Bugzilla – Bug 665245
compile fail with dbi
Last modified: 2018-06-29 23:03:21 UTC
Hello, Using the latest (r21650) source from git, compiling Gnucash fails to complete--citing a dbi error. I have used the same build script for years, so I am pretty confident that it is not the problem. I use --disable-dbi in my compile options, and suspect this may highlight the problem. My OS is Ubuntu 11.04 on an AMD64. Using a freshly downloaded, brand new git source tree: ./configure --prefix=$HOME/unstable/gnucash --enable-debug --enable-doxygen --enable-error-on-warning --enable-compile-warnings --disable-dbi make all install The make fails with: libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../.. -DG_LOG_DOMAIN=\"gnc.backend.dbi\" -I.. -I../.. -DLOCALE_DIR=\"/home/<<USER>>/unstable/gnucash/share/locale\" -I../../../src/backend -I../../../src/backend/sql -I../../../src/debug -I../../../src/engine -I../../../src/core-utils -I../../../lib/libc -I../../../src/libqof/qof -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -DORBIT2=1 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -Werror -Wdeclaration-after-statement -g -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-unused -MT gnc-backend-dbi.lo -MD -MP -MF .deps/gnc-backend-dbi.Tpo -c gnc-backend-dbi.c -fPIC -DPIC -o .libs/gnc-backend-dbi.o In file included from gnc-backend-dbi.c:38:0: gnc-backend-dbi-priv.h:26:21: fatal error: dbi/dbi.h: No such file or directory compilation terminated. make[5]: *** [gnc-backend-dbi.lo] Error 1 make[5]: Leaving directory `/home/<<USER>>/development/gnucash/src/backend/dbi'
Do you have libdbi-dev installed?
No. I have libdbi0 version 0.8.3ubuntu2 installed, but not -dev. As I didn't want to use the database file (only the xml-based flat file), I wanted to avoid installing all the database-related dependencies. The compiles worked fine (using --disable-dbi) up until about a month or so ago. I rebuild from a new source tree once every few weeks. Pete
(In reply to comment #1) > Do you have libdbi-dev installed? This should be irrelevant because the configure call included --disable-dbi, which means it should not require any DBI headers. IMHO this is a real bug. If DBI is disabled then gnc-backend-dbi-priv.h should never be used by anything.
Lowering severity. This bug is not causing data loss and a workaround is possible by installing the required dbi devel packages (even if you don't want to use them).
I'm seeing the same with 2.4.9: gnc-backend-dbi still tries to build even if --disable-dbi is specified. I believe this line in configure.ac (added in r21570) is the culprit: AM_CONDITIONAL(WITH_DBI, [test "x$ac_cv_header_dbi_dbi_h" != xno]) The problem is that this test always passes. AC_CHECK_HEADERS(dbi/dbi.h) isn't run if --disable-dbi is specified, so $ac_cv_header_dbi_dbi_h will be empty, not set to "no". Thus, WITH_DBI gets set to true, and dbi support is built. I haven't tried it yet, but it seems like changing that line to AM_CONDITIONAL(WITH_DBI, [test "x$want_dbi" = xtrue]) would do the right thing. Checking $ac_cv_header_dbi_dbi_h here shouldn't be necessary because there's already a separate test that causes it to error out if the header isn't found and --disable-dbi isn't set.
This is still valid with 2.4.9, could change suggested in comment #5 reviewed (and pushed) by upstream? Thanks a lot
A fix for this was committed by John Ralls just a couple of days ago to trunk (r21867) and the 2.4 branch (r21868). Too late for 2.4.9, but it will appear in the next stable release. He did so in response to a mailing list request. I guess he never saw this bug report.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=665245. Please update any external references or bookmarks.