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 638414 - Budget amounts render as "error" with SQLite3 backend
Budget amounts render as "error" with SQLite3 backend
Status: RESOLVED DUPLICATE of bug 611936
Product: GnuCash
Classification: Other
Component: Budgets
2.4.x
Other Linux
: Normal blocker
: ---
Assigned To: Chris Shoemaker
Chris Shoemaker
Depends on:
Blocks:
 
 
Reported: 2010-12-31 16:59 UTC by Jeff Kletsky
Modified: 2018-06-29 22:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jeff Kletsky 2010-12-31 16:59:17 UTC
To replicate:

* Take a 2.2.9 XML file that has a budget with amounts entered
* Open with 2.4.0
* Confirm that the amounts are present and render properly
* Save As -- into a different file as SQLite3 database
* Close GNUCash
* Open GNUCash and the SQLite3 version
* Note that the budget amounts render as "error"

Expected:
* The amounts would be preserved

Repatability:
* Always

Environment:

Ubuntu 10.10 i686 with apt-get upgrade as of morning of 2101-12-31

$ uname -a
Linux fx 2.6.35-24-generic #42-Ubuntu SMP Thu Dec 2 01:41:57 UTC 2010 i686 GNU/Linux

GNUCash built from 
svn checkout http://svn.gnucash.org/repo/gnucash/tags/2.4.0 svn-2.4.0
./configure --prefix=/opt --enable-ofx --with-html-engine=webkit --enable-dbi



$ dpkg --list *sql* | fgrep 'ii'
ii  libaprutil1-dbd-sqlite3              1.3.9+dfsg-3ubuntu0.10.10.1                       The Apache Portable Runtime Utility Library - SQLite3 Driver
ii  libdbd-mysql                         0.8.3-1-0ubuntu1                                  MySQL database server driver for libdbi
ii  libdbd-mysql-perl                    4.016-1                                           Perl5 database interface to the MySQL database
ii  libdbd-sqlite3                       0.8.3-1-0ubuntu1                                  SQLite3 database driver for libdbi
ii  libdbd-sqlite3-perl                  1.29-2                                            Perl DBI driver with a self-contained RDBMS
ii  libmono-sqlite2.0-cil                2.6.7-3ubuntu1                                    Mono Sqlite library (for CLI 2.0)
ii  libmysqlclient-dev                   5.1.49-1ubuntu8.1                                 MySQL database development files
ii  libmysqlclient16                     5.1.49-1ubuntu8.1                                 MySQL database client library
ii  libqt4-sql                           4:4.7.0-0ubuntu4.2                                Qt 4 SQL module
ii  libqt4-sql-mysql                     4:4.7.0-0ubuntu4.2                                Qt 4 MySQL database driver
ii  libsqlite0                           2.8.17-6build2                                    SQLite shared library
ii  libsqlite3-0                         3.7.2-1                                           SQLite 3 shared library
ii  mysql-client-5.1                     5.1.49-1ubuntu8.1                                 MySQL database client binaries
ii  mysql-client-core-5.1                5.1.49-1ubuntu8.1                                 MySQL database core client binaries
ii  mysql-common                         5.1.49-1ubuntu8.1                                 MySQL database common files, e.g. /etc/mysql/my.cnf
ii  mysql-server-5.1                     5.1.49-1ubuntu8.1                                 MySQL database server binaries and system database setup
ii  mysql-server-core-5.1                5.1.49-1ubuntu8.1                                 MySQL database server binaries
ii  sqlite3                              3.7.2-1                                           A command line interface for SQLite 3
ii  sqlite3-doc                          3.7.2-1                                           SQLite 3 documentation
ii  sqlitebrowser                        1.3-2.3                                           GUI editor for SQLite databases
Comment 1 Jeff Kletsky 2010-12-31 17:28:18 UTC
This appears to be specific to SQLite3 as unable to replicate using the same steps in MySQL 5.1
Comment 2 Jeff Kletsky 2011-01-01 00:41:06 UTC
The Ubuntu build does not appear to use the -ffast-math optimization suggested elsewhere as problematic:

jeff@fx:/usr/local/src/libdbi-drivers/libdbi-drivers-0.8.3-1$ dpkg-buildpackage -rfakeroot
dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor): 
dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export FFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export LDFLAGS from dpkg-buildflags (origin: vendor): -Wl,-Bsymbolic-functions
dpkg-buildpackage: source package libdbi-drivers
dpkg-buildpackage: source version 0.8.3-1-0ubuntu1
dpkg-buildpackage: source changed by Clint Byrum <clint@ubuntu.com>
dpkg-buildpackage: host architecture i386
Comment 3 John Ralls 2011-01-01 02:22:33 UTC
The relevant earlier bug (of which I'm inclined to mark this a duplicate of) is Bug 611936.

As noted in that bug, I found that the configure script set -ffastmath for you unless you overrode it with -fno-fast-math (comment 17).

As noted in comment 28, this problem has been noted in Ubuntu 10.10 and reported to them.

Please build libdbi from source and specify -fno-fast-math and try again.
Comment 4 Jeff Kletsky 2011-01-01 03:13:07 UTC
I've edited configure in the unpacked source to remove -ffast-math in CFLAGS,
built, and installed the resulting .deb and the problem still seems to exist.

$ diff -c configure configure.orig 
*** configure	2010-12-31 19:04:14.978626907 -0800
--- configure.orig	2008-03-03 09:41:58.000000000 -0800
***************
*** 20202,20211 ****
          case $host in
          *-*-linux*)
                  DEBUG="-g -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
!                 # CFLAGS="-O20 -ffast-math -D_REENTRANT -fsigned-char"
!                 # PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char";;
!                 CFLAGS="-O20 -D_REENTRANT -fsigned-char"
!                 PROFILE="-pg -g -O20 -D_REENTRANT -fsigned-char";;
          sparc-sun-*)
                  DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -mv8"
                  CFLAGS="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char -mv8"
--- 20202,20209 ----
          case $host in
          *-*-linux*)
                  DEBUG="-g -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
!                 CFLAGS="-O20 -ffast-math -D_REENTRANT -fsigned-char"
!                 PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char";;
          sparc-sun-*)
                  DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -mv8"
                  CFLAGS="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char -mv8"


The contents of configure.log show

CFLAGS='-O20 -D_REENTRANT -fsigned-char'

and I don't fgrep 'fast-math' anywhere in the script output of the terminal
session.

Making all in sqlite3
make[4]: Entering directory `/usr/local/src/libdbi-drivers/libdbi-drivers-0.8.3-1/drivers/sqlite3'
if /bin/bash ../../libtool --tag=CC --mode=compile i686-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../include -I/usr/include -I/usr/include    -O20 -D_REENTRANT -fsigned-char -MT dbd_sqlite3.lo -MD -MP -MF ".deps/dbd_sqlite3.Tpo" -c -o dbd_sqlite3.lo dbd_sqlite3.c; \
	then mv -f ".deps/dbd_sqlite3.Tpo" ".deps/dbd_sqlite3.Plo"; else rm -f ".deps/dbd_sqlite3.Tpo"; exit 1; fi
mkdir .libs
 i686-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../include -I/usr/include -I/usr/include -O20 -D_REENTRANT -fsigned-char -MT dbd_sqlite3.lo -MD -MP -MF .deps/dbd_sqlite3.Tpo -c dbd_sqlite3.c  -fPIC -DPIC -o .libs/dbd_sqlite3.o
dbd_sqlite3.c: In function 'dbd_list_dbs':
dbd_sqlite3.c:359: warning: ignoring return value of 'getcwd', declared with attribute warn_unused_result
dbd_sqlite3.c:360: warning: ignoring return value of 'chdir', declared with attribute warn_unused_result
dbd_sqlite3.c:421: warning: ignoring return value of 'chdir', declared with attribute warn_unused_result
dbd_sqlite3.c: In function 'dbd_list_tables':
dbd_sqlite3.c:461: warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result
dbd_sqlite3.c:464: warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result
dbd_sqlite3.c:471: warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result
 i686-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../include -I/usr/include -I/usr/include -O20 -D_REENTRANT -fsigned-char -MT dbd_sqlite3.lo -MD -MP -MF .deps/dbd_sqlite3.Tpo -c dbd_sqlite3.c -o dbd_sqlite3.o >/dev/null 2>&1
/bin/bash ../../libtool --tag=CC --mode=link i686-linux-gnu-gcc  -O20 -D_REENTRANT -fsigned-char  -Wl,-Bsymbolic-functions -o libdbdsqlite3.la -rpath /usr/lib/dbd -module -avoid-version -L/usr/lib -lsqlite3  dbd_sqlite3.lo  
i686-linux-gnu-gcc -shared  .libs/dbd_sqlite3.o  -L/usr/lib /usr/lib/libsqlite3.so  -Wl,-Bsymbolic-functions -Wl,-soname -Wl,libdbdsqlite3.so -o .libs/libdbdsqlite3.so
ar cru .libs/libdbdsqlite3.a  dbd_sqlite3.o
ranlib .libs/libdbdsqlite3.a
creating libdbdsqlite3.la
(cd .libs && rm -f libdbdsqlite3.la && ln -s ../libdbdsqlite3.la libdbdsqlite3.la)
make[4]: Leaving directory `/usr/local/src/libdbi-drivers/libdbi-drivers-0.8.3-1/drivers/sqlite3'


Neither the "expected"

dpkg -i ../libdbd-sqlite3_0.8.3-1-0ubuntu1_i386.deb

nor 

dpkg -i ../libdbd-sqlite_0.8.3-1-0ubuntu1_i386.deb

resolves the issue for me.
Comment 5 John Ralls 2011-01-01 18:24:15 UTC
Did you rebuild libdbi, too? I was under the impression from Bug 611936 that is was libdbi, not the libdbd-sqlite3, that was the problem...

But I looked again at your bug report: Does everything else work OK, and only the Budget is screwed up? The libdbi problem wouldn't be that selective.
Comment 6 Jeff Kletsky 2011-01-01 20:05:46 UTC
Must rebuild libdbi without -ffast-math to resolve this, libdbd-sqlite3 alone seems insufficient.

Building libdbi seems to hang on docs
Comment 7 Jeff Kletsky 2011-01-01 20:06:29 UTC

*** This bug has been marked as a duplicate of bug 611936 ***
Comment 8 John Ralls 2018-06-29 22:50:27 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=638414. Please update any external references or bookmarks.