By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 1942 - Build issue: kmymoney FTBFS autotools + 23011-qt-sqlite3-0.2.tar.gz
Summary: Build issue: kmymoney FTBFS autotools + 23011-qt-sqlite3-0.2.tar.gz
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: non-core programs (show other bugs)
Version: R14.0.0 [Trinity]
Hardware: All Linux
: P5 major
Assignee: Slávek Banko
URL:
Depends on:
Blocks:
 
Reported: 2014-02-17 21:51 CST by David C. Rankin
Modified: 2014-10-18 09:07 CDT (History)
6 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments
kcrash when clicking in account created during 1st use (38.47 KB, application/octet-stream)
2014-02-18 14:37 CST, David C. Rankin
Details
kmymoneytitlelable.png icon necessary for build (attachment corrupted) (973 bytes, image/png)
2014-02-18 16:12 CST, David C. Rankin
Details
Remove unused kmymoneytitlelable.png from installation (1.19 KB, patch)
2014-02-26 21:24 CST, Slávek Banko
Details | Diff
tqt3 : add sqlite3 plugin (20.52 KB, patch)
2014-05-18 11:38 CDT, Slávek Banko
Details | Diff
kmymoney : fix sqlite3 plugin detection (872 bytes, patch)
2014-05-21 16:21 CDT, Slávek Banko
Details | Diff
kmymoney : fix sqlite3 plugin detection (1) (1.64 KB, patch)
2014-05-21 16:43 CDT, Slávek Banko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David C. Rankin 2014-02-17 21:51:26 CST
kmymoney fails miserably on R14. Initially the failure is:

==> Building - tde-kmymoney...
make  all-recursive
make[1]: Entering directory '/build/tde-kmymoney/src/kmymoney'
Making all in qt-sqlite3-0.2
make[2]: Entering directory '/build/tde-kmymoney/src/kmymoney/qt-sqlite3-0.2'
cd sqlite3 && /opt/tqt3/bin/qmake sqlite3.pro "QMAKE=/opt/tqt3/bin/qmake" -o Makefile
cd sqlite3 && make -f Makefile
make[3]: Entering directory '/build/tde-kmymoney/src/kmymoney/qt-sqlite3-0.2/sqlite3'
g++ -c -pipe -g -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_REENTRANT -fPIC  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED -I/opt/tqt3/mkspecs/default -I. -I/opt/tqt3/include -o smain.o smain.cpp
smain.cpp:37:30: fatal error: qsqldriverplugin.h: No such file or directory
 #include <qsqldriverplugin.h>

The file that should be found is 'tqsqldriverplugin.h'. Grepping kmymoney source discloses no reference to <qsqldriverplugin.h>?

The problem turns out to be the sqlite tarball included as part of kmymoney:

23011-qt-sqlite3-0.2.tar.gz

Why this source tarball is included in the git tree source of kmymoney is not immediately clear, but all the naming/renaming q->tq completely missed the contents of this file. In the file there are a number of header references that must be updated q->tq:

qsqlresult.h
qdatetime.h
qvaluevector.h
qregexp.h
qfile.h
qvector.h
qptrvector.h
qvariant.h
qdatetime.h
qvaluevector.h
qsqldriver.h
qsqlresult.h
qsqlrecord.h
qsqlindex.h
qt_windows.h *
qsqldriverplugin.h

* couldn't find qt_windows.h anywhere.

Patching and overwriting the 23011-qt-sqlite3-0.2.tar.gz with one corrected q->tq does not help the build. The automake files are not picking up the install directories for tqtinterface and the ./configure options of:

 --with-extra-includes="/usr/include/tqt:/usr/include/tqt/Qt" \
 --with-extra-libs="${TDEDIR}/lib:${TDEDIR}/lib/trinity" \

are not respect in the build (i.e. not present in g++ ... -Ifoo). Even with a patched sqlite tarball in the build, the build still fails with:

==> Building - tde-kmymoney...
make  all-recursive
make[1]: Entering directory '/build/tde-kmymoney/src/kmymoney'
Making all in qt-sqlite3-0.2
make[2]: Entering directory '/build/tde-kmymoney/src/kmymoney/qt-sqlite3-0.2'
cd sqlite3 && /opt/tqt3/bin/qmake sqlite3.pro "QMAKE=/opt/tqt3/bin/qmake" -o Makefile
cd sqlite3 && make -f Makefile
make[3]: Entering directory '/build/tde-kmymoney/src/kmymoney/qt-sqlite3-0.2/sqlite3'
g++ -c -pipe -g -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_REENTRANT -fPIC  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED -I/opt/tqt3/mkspecs/default -I. -I/opt/tqt3/include -o smain.o smain.cpp
smain.cpp:37:31: fatal error: tqsqldriverplugin.h: No such file or directory
 #include <tqsqldriverplugin.h>

As noted, this is a makeflags failure because the header is present on the system as specified in the --with-extra-includes:

/usr/include/tqt/tqsqldriverplugin.h

Even including:

  CXXFLAGS="${CXXFLAGS} -I/usr/include/tqt -I/usr/include/tqt/Qt" \
  ./configure \
  <snip>

makes no difference.

So it would appear kmymoney is a mess. Suggestions?
Comment 1 David C. Rankin 2014-02-17 22:26:55 CST
If run with

  --disable-sqlite3 \

the build will proceed, but unless you specifically disable sqlite3, this build fails. The sqlite3 source is not updated for tqt and the automake files associated with the sqlite3 source included in kmymoney are broken.
Comment 2 David C. Rankin 2014-02-17 23:26:12 CST
In fact you have to explicitly disable nearly all kmymoney options of the build fails. Unless you have 'html2ps' installed, you must specifically --disable-pdf-docs. If you do install html2ps, pdf doc generation does in fact work. However, a number of distributions do not offer html2ps as an available standard package. A reasonable build test for html2ps is:

  if test -x "/usr/bin/html2ps"; then
    enable_pdfdocs='--enable-pdf-docs'
  else
    enable_pdfdocs='--disable-pdf-docs'
  fi

++ the point being, the autoconf setup should handle this without user intervention.

The 23011-qt-sqlite3-0.2.tar.gz contained within the tree is NOT updated to work with tqtinterface or tqt3.

Since you must --disable-sqlite3 to avoid build failure, there is now way possible to enable a database backend for kmymoney. 

All of these options are 'enabled' by default in the build config, so unless you specifically 'disable' all of the default options, the build fails. The only default build that I have found that works is:

  ./configure \
    --prefix=${TDEDIR} \
    --with-qt-dir=${QTDIR} \
    --with-qt-includes=${QTDIR}/include \
    --with-qt-libraries=${QTDIR}/lib \
    --with-extra-includes="/usr/include/tqt:/usr/include/tqt/Qt" \
    --with-extra-libs="${TDEDIR}/lib:${TDEDIR}/lib/trinity" \
    --sysconfdir=${TDEDIR}/etc \
    --localstatedir=/var \
    $enable_pdfdocs \
    --disable-ofxplugin \
    --disable-ofxbanking \
    --disable-sqlite3 \
    --disable-cppunit \
    --disable-online-tests \
    --disable-qtdesigner \
    --enable-closure

Now this is a "meaningful" goal to be included in a 14.0.1 target.
Comment 3 Francois Andriot 2014-02-17 23:59:50 CST
I build with:

  --disable-dependency-tracking \
  --disable-debug \
  --enable-new-ldflags \
  --disable-final \
  --enable-closure \
  --enable-rpath \
  --disable-gcc-hidden-visibility \
  \
  --with-qmake=/usr/bin/tqmake \
  --with-qt-dir=/usr/lib64/tqt3 \
  \
  --disable-pdf-docs \
  --enable-ofxplugin \
  --enable-ofxbanking \
  --enable-qtdesigner \
Comment 4 Francois Andriot 2014-02-18 00:00:23 CST
(En réponse au commentaire 3)
And forgot last line:
  --disable-sqlite3
Comment 5 David C. Rankin 2014-02-18 14:34:23 CST
Building with all options disable results in the following behavior:

1st use - Ability to import contact information from address book is broken; there is no validation of routing number; and crashes when you first click on the account created during setup. The kcrash for kmymoney is included as an attachment.
Comment 6 David C. Rankin 2014-02-18 14:37:38 CST
Created attachment 1937 [details]
kcrash when clicking in account created during 1st use

Evaluating kmymoney first use. kmymoney crashed. After initial setup, I clicked on the accounts, then on the [icon] for my first account created. kmymoney segfaulted. The build was:

  ./configure \
    --prefix=${TDEDIR} \
    --with-qt-dir=${QTDIR} \
    --with-qt-includes=${QTDIR}/include \
    --with-qt-libraries=${QTDIR}/lib \
    --with-extra-includes="/usr/include/tqt:/usr/include/tqt/Qt" \
    --with-extra-libs="${TDEDIR}/lib:${TDEDIR}/lib/trinity" \
    --sysconfdir=${TDEDIR}/etc \
    --localstatedir=/var \
    $enable_pdfdocs \
    --disable-ofxplugin \
    --disable-ofxbanking \
    --disable-sqlite3 \
    --disable-cppunit \
    --disable-online-tests \
    --disable-qtdesigner \
    --enable-closure

  make $NUMJOBS # VERBOSE=1
Comment 7 David C. Rankin 2014-02-18 14:38:38 CST
(In reply to comment #4)
> (En réponse au commentaire 3)
> And forgot last line:
>   --disable-sqlite3

I knew you had to be building with that one :)
Comment 8 David C. Rankin 2014-02-18 15:16:26 CST
(In reply to comment #4)
> (En réponse au commentaire 3)
> And forgot last line:
>   --disable-sqlite3

Francios,

  Have you looked into what it would take to fix the build with sqlite3? kmymoney continues under active development in kde4, so it isn't some abandoned packaged hanging off the git tree. The initial problem I identified with the files in 23011-qt-sqlite3-0.2.tar.gz not being renamed q->tq is easily fixed. However, I still cannot make any progress building with --enable-sqlite3 due to the smain.cpp build failure:

  'fatal error: tqsqldriverplugin.h: No such file or directory'

  That file is present on the system as noted. Any ideas?

  Also, after receiving your build configuration, I updated dependencies to include 'libofx' and rebuilt kmymoney as follows:

  ./configure \
    --prefix=${TDEDIR} \
    --with-qmake=${QTDIR}/bin/tqmake \
    --with-qt-dir=${QTDIR} \
    --with-qt-includes=${QTDIR}/include \
    --with-qt-libraries=${QTDIR}/lib \
    --with-extra-includes="/usr/include/tqt:/usr/include/tqt/Qt" \
    --with-extra-libs="${TDEDIR}/lib:${TDEDIR}/lib/trinity" \
    --sysconfdir=${TDEDIR}/etc \
    --localstatedir=/var \
    --disable-dependency-tracking \
    --disable-gcc-hidden-visibility \
    $enable_pdfdocs \
    --pdfdir=${TDEDIR}/share/doc \
    --psdir=${TDEDIR}/share/doc \
    --htmldir=${TDEDIR}/share/doc \
    --enable-new-ldflags \
    --enable-rpath \
    --enable-ofxplugin \
    --enable-ofxbanking \
    --enable-qtdesigner \
    --disable-sqlite3 \
    --enable-qtdesigner \
    --disable-debug \
    --disable-final \
    --enable-closure

The build completed 100% then crashed with:

/usr/bin/install: cannot stat '/build/tde-kmymoney/src/kmymoney/kmymoney2/widgets/kmymoneytitlelabel.png': No such file or directory

What happened to this icon?
Comment 9 David C. Rankin 2014-02-18 15:38:40 CST
(In reply to comment #8)
> (In reply to comment #4)
> > (En réponse au commentaire 3)
> > And forgot last line:
> >   --disable-sqlite3
> 
> Francios,
> 
>   Have you looked into what it would take to fix the build with sqlite3?
> kmymoney continues under active development in kde4, so it isn't some abandoned
> packaged hanging off the git tree. The initial problem I identified with the
> files in 23011-qt-sqlite3-0.2.tar.gz not being renamed q->tq is easily fixed.
> However, I still cannot make any progress building with --enable-sqlite3 due to
> the smain.cpp build failure:
> 
>   'fatal error: tqsqldriverplugin.h: No such file or directory'
> 
>   That file is present on the system as noted. Any ideas?
> 
>   Also, after receiving your build configuration, I updated dependencies to
> include 'libofx' and rebuilt kmymoney as follows:
> 
>   ./configure \
>     --prefix=${TDEDIR} \
>     --with-qmake=${QTDIR}/bin/tqmake \
>     --with-qt-dir=${QTDIR} \
>     --with-qt-includes=${QTDIR}/include \
>     --with-qt-libraries=${QTDIR}/lib \
>     --with-extra-includes="/usr/include/tqt:/usr/include/tqt/Qt" \
>     --with-extra-libs="${TDEDIR}/lib:${TDEDIR}/lib/trinity" \
>     --sysconfdir=${TDEDIR}/etc \
>     --localstatedir=/var \
>     --disable-dependency-tracking \
>     --disable-gcc-hidden-visibility \
>     $enable_pdfdocs \
>     --pdfdir=${TDEDIR}/share/doc \
>     --psdir=${TDEDIR}/share/doc \
>     --htmldir=${TDEDIR}/share/doc \
>     --enable-new-ldflags \
>     --enable-rpath \
>     --enable-ofxplugin \
>     --enable-ofxbanking \
>     --enable-qtdesigner \
>     --disable-sqlite3 \
>     --enable-qtdesigner \
>     --disable-debug \
>     --disable-final \
>     --enable-closure
> 
> The build completed 100% then crashed with:
> 
> /usr/bin/install: cannot stat
> '/build/tde-kmymoney/src/kmymoney/kmymoney2/widgets/kmymoneytitlelabel.png': No
> such file or directory
> 
> What happened to this icon?

Here is the answer from the changelog at sourceforge:

2011-05-21 06:32  conet

	* kmymoney/widgets/CMakeLists.txt,
	  kmymoney/widgets/kmymoneytitlelabel.png: Remove unused file.

http://kmymoney2.sourceforge.net/ChangeLog-4.5.95.txt

I'll work on a patch.
Comment 10 David C. Rankin 2014-02-18 16:12:50 CST
Created attachment 1938 [details]
kmymoneytitlelable.png icon necessary for build (attachment corrupted)

The above icon is the needed icon that should be placed in the following directory to allow the kmymoney package to "make install" without failure. This icon has been removed from the current version of kmymoney at sourceforge, but is still necessary for the TDE version to build.
Comment 11 David C. Rankin 2014-02-18 16:18:30 CST
(In reply to comment #10)
> Created attachment 1938 [details]
> kmymoneytitlelable.png icon necessary for build
> 
> The above icon is the needed icon that should be placed in the following
> directory to allow the kmymoney package to "make install" without failure. This
> icon has been removed from the current version of kmymoney at sourceforge, but
> is still necessary for the TDE version to build.

/tde/main/applications/kmymoney/kmymoney2/widgets
Comment 12 Francois Andriot 2014-02-19 15:04:04 CST
(En réponse au commentaire 8)
> (In reply to comment #4)
> > (En réponse au commentaire 3)
> > And forgot last line:
> >   --disable-sqlite3
> 
> Francios,
> 
>   Have you looked into what it would take to fix the build with sqlite3?
> kmymoney continues under active development in kde4, so it isn't some abandoned
> packaged hanging off the git tree. The initial problem I identified with the
> files in 23011-qt-sqlite3-0.2.tar.gz not being renamed q->tq is easily fixed.
> However, I still cannot make any progress building with --enable-sqlite3 due to
> the smain.cpp build failure:
> 
>   'fatal error: tqsqldriverplugin.h: No such file or directory'
> 
>   That file is present on the system as noted. Any ideas?


Yes, I just tried to convert the sqlite3 tarball (using the TDE qt3/tqt conversion script), add the --enable-sqlite3 option to ./configure, and it builds as it should.

I just need to set environment variable QTDIR because the plugin is installed under $QTDIR/plugins/sqldrivers :
  export QTDIR=/usr/lib64/tqt3

Output file is:
  /usr/lib64/tqt3/plugins/sqldrivers/libsqlite3.lib64.so

The program runs without crashing (I did no extensive test, just opening some menus and panels, typing some data ...)
Comment 13 Slávek Banko 2014-02-26 21:24:18 CST
Created attachment 1964 [details]
Remove unused kmymoneytitlelable.png from installation

If the picture is never used, it is preferable to not install it.
Comment 14 Slávek Banko 2014-03-01 05:38:05 CST
Comment on attachment 1964 [details]
Remove unused kmymoneytitlelable.png from installation

Pushed to GIT in hash 2031fb9c.
Comment 15 Timothy Pearson 2014-03-02 18:05:09 CST
Comment on attachment 1938 [details]
kmymoneytitlelable.png icon necessary for build (attachment corrupted)

Can you please resubmit this attachment?  It was corrupted in the Bugzilla upgrade.

Thanks!
Comment 16 Slávek Banko 2014-05-18 11:38:53 CDT
Created attachment 2061 [details]
tqt3 : add sqlite3 plugin

I considered how to deal with sqlite3 plugin, and I believe that the only correct way is to integrate plugin into TQt3. 

I updated the plugin into line with current TQtSqlCachedResult and incorporate into TQt3. Please test attached patch.
Comment 17 Darrell 2014-05-18 11:47:40 CDT
Are any build configuration changes needed for tqt3?
Comment 18 Slávek Banko 2014-05-18 11:51:44 CDT
(In reply to Darrell from comment #17)
> Are any build configuration changes needed for tqt3?

Yes, new option is: -plugin-sql-sqlite3
And need to have installed sqlite3 library devel.
Comment 19 Darrell 2014-05-18 12:15:09 CDT
Are these two options still distinct?

-plugin-sql-sqlite
-plugin-sql-sqlite3
Comment 20 Slávek Banko 2014-05-18 12:36:50 CDT
(In reply to Darrell from comment #19)
> Are these two options still distinct?
> 
> -plugin-sql-sqlite
> -plugin-sql-sqlite3

Yes, these are two separate plugins, although both are designed for sqlite. Original sqlite plugin uses build-in sqlite (see src/3rtparty/sqlite). The new plugin is designed for sqlite3 and sqlite3 library is linked dynamically.

I do not know whether we can discard the original plugin - I do not know where it is used. Therefore, I propose to defer the decision until later.
Comment 21 Darrell 2014-05-20 11:20:18 CDT
With the latest tqt3 patch, kmymoney FTBFS, failing during the configuration stage:

checking if the SQLITE3 support is desired... auto
checking if the SQLITE3 support is already present... no
checking sqlite3.h usability... yes
checking sqlite3.h presence... yes
checking for sqlite3.h... yes
checking if the environment variable QTDIR is set... /opt/trinity
./configure: line 27334: /opt/trinity/bin/qmake: No such file or directory
sed: can't read Makefile: No such file or directory
sed: can't read Makefile: No such file or directory
Comment 22 Slávek Banko 2014-05-21 16:21:19 CDT
Created attachment 2065 [details]
kmymoney : fix sqlite3 plugin detection

As I found, the problem is just a typo - plugin name is not libsqlite3.so, but libqsqlite3.so. The essential is the fact that this is a change in common admin module => causes update virtually all modules.
Comment 23 Darrell 2014-05-21 16:39:19 CDT
The patch in attachment 2065 [details] resolved the configurtion failure. The package buit without error. I don't use kmymoney and did not test sqlite3 support.

I presume the final patch has to be applied to common/admin?
Comment 24 Slávek Banko 2014-05-21 16:43:02 CDT
Created attachment 2066 [details]
kmymoney : fix sqlite3 plugin detection (1)

One modification: TQt plugins folder is determined from the configuration, instead of a fixed path derived from QTDIR.

Yes, the final patch will have to be pushed into the common admin module.
Comment 25 Darrell 2014-05-21 17:13:38 CDT
Updated patch works fine for me. Same as before: no usability testing performed.
Comment 26 Slávek Banko 2014-05-21 17:31:27 CDT
Note 0: Reason of above adjustments see commit 848ba262 - bug 1151.

Note 1: With the incorporation of the plugin into TQt3 will be removed the appropriate tarball from KMyMoney.

Note 2: François, thank you for the conversion Qt => TQt. For integration into TQt3 I used version, which you have prepared. 

Note 3: Darrell, thank you for quick testing.

Note 4: I use KMyMoney, but without a database. Therefore I also do not test database usability.
Comment 27 Slávek Banko 2014-05-21 17:33:50 CDT
Comment on attachment 1937 [details]
kcrash when clicking in account created during 1st use

Crashes of this type have been fixed by commit 5da15f81 (TQt3).
Comment 28 Slávek Banko 2014-05-24 10:11:19 CDT
Comment on attachment 2061 [details]
tqt3 : add sqlite3 plugin

Pushed to GIT in hash d738b733 (Qt3) and a44a713f (TQt3).
Comment 29 Slávek Banko 2014-05-26 20:18:42 CDT
Comment on attachment 2066 [details]
kmymoney : fix sqlite3 plugin detection (1)

Pushed to GIT in hash c413f606 (common-admin) and fc69c94a (kmymoney).