After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 665245 - compile fail with dbi
compile fail with dbi
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Build system
git-master
Other Linux
: Normal normal
: ---
Assigned To: Derek Atkins
Christian Stimming
Depends on:
Blocks:
 
 
Reported: 2011-11-30 20:38 UTC by Pete
Modified: 2018-06-29 23:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pete 2011-11-30 20:38:46 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'
Comment 1 Mike Evans 2011-12-05 12:09:20 UTC
Do you have libdbi-dev installed?
Comment 2 Pete 2011-12-05 16:12:28 UTC
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
Comment 3 Derek Atkins 2011-12-05 17:38:03 UTC
(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.
Comment 4 Geert Janssens 2011-12-07 10:29:48 UTC
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).
Comment 5 Dan Ports 2012-01-12 01:38:21 UTC
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.
Comment 6 Pacho Ramos 2012-01-21 13:01:33 UTC
This is still valid with 2.4.9, could change suggested in comment #5 reviewed (and pushed) by upstream? Thanks a lot
Comment 7 Geert Janssens 2012-01-21 13:21:26 UTC
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.
Comment 8 John Ralls 2018-06-29 23:03:21 UTC
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.