(Ubuntu) QSqlDatabase: QSQLITE driver not loaded

Report problems here (or use the built-in feedback dialog in the editor)
beligum
Posts: 6
Joined: Tue Feb 03, 2015 1:28 pm

(Ubuntu) QSqlDatabase: QSQLITE driver not loaded

Post by beligum »

Hi all,

I can't seem to get the help panel working on Ubuntu 64 (trusty), it's just empty and I have some database error messages during startup. Does anyone have a clue?

The startup sequence log:

Code: Select all

bram@escher:~/Programs/rube-lin64-1.6.1$ /home/bram/Programs/rube-lin64-1.6.1/rube
QSqlDatabase: QSQLITE driver not loaded
QSqlDatabase: available drivers: 
QSqlDatabase: QSQLITE driver not loaded
QSqlDatabase: available drivers: 
QSqlDatabase: QSQLITE driver not loaded
QSqlDatabase: available drivers: 
QObject::connect: Cannot connect (null)::setupFinished() to QHelpSearchEngine::indexDocumentation()
bram@escher:~/Programs/rube-lin64-1.6.1$
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: QSqlDatabase: QSQLITE driver not loaded

Post by iforce2d »

Does it help if you run it as simply:
./rube
in that folder?
beligum
Posts: 6
Joined: Tue Feb 03, 2015 1:28 pm

Re: QSqlDatabase: QSQLITE driver not loaded

Post by beligum »

No, not really, the output (and behaviour) is exactly the same
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: QSqlDatabase: QSQLITE driver not loaded

Post by iforce2d »

Do you have Qt installed on that machine already? It may be trying to use your existing installation instead of the libs that I have included with the download. The libs it is supposed to be using are in the "lib" folder. You can check if your existing Qt installation is being picked up by doing:

ldd rube.bin

If you have no existing Qt installation or if for some reason the libs of your existing installation cannot be found, for the Qt libs in the output of ldd you will see a message to the effect that the lib cannot be found (I forget the exact error text).

That's ok though, because if you do "cat rube" you will see that the "rube" file is actually a wrapper that sets up the necessary library path to use the Qt libs that I have bundled in the libs folder, and then calls "rube.bin" which is the actual program executable. Here is the contents of the "rube" wrapper:

Code: Select all

#!/bin/sh

here="${0%/*}"

LD_LIBRARY_PATH="$here"/lib:"$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH
export LANG=en_US
export QT_PLUGIN_PATH="$here"/lib
cd $here
exec "$0".bin "$@"
Perhaps you could try replacing the last line so that instead of starting the program, it does

ldd "$0".bin

... so you can see what libs it is trying to use when running via the wrapper.
beligum
Posts: 6
Joined: Tue Feb 03, 2015 1:28 pm

Re: QSqlDatabase: QSQLITE driver not loaded

Post by beligum »

Hi,

Sorry for coming back with such a late reply, I've been abroad.

Actually, I had to mess with the original /lib entries to make RUBE work on my machine in the first place. This is the output of the program when I try to run the vanilla code:

Code: Select all

bram@escher:~/Programs/rube-lin64-1.6.1$ ./rube
Cannot mix incompatible Qt library (version 0x40806) with this library (version 0x40802)
Aborted (core dumped)
bram@escher:~/Programs/rube-lin64-1.6.1$
To make RUBE run, I changed the entries in the /lib folder to symlinks to my installed QT libraries:

Code: Select all

bram@escher:~/Programs/rube-lin64-1.6.1$ ls -l lib/
total 19900
drwxrwxr-x 2 bram bram     4096 Feb  3 09:44 imageformats
lrwxrwxrwx 1 bram bram       62 Feb  3 12:48 libqsqlite.so.4 -> /usr/lib/x86_64-linux-gnu/qt4/plugins/sqldrivers/libqsqlite.so
lrwxrwxrwx 1 bram bram       43 Feb  3 03:08 libQtCLucene.so.4 -> /usr/lib/x86_64-linux-gnu/libQtCLucene.so.4
-rwxr-xr-x 1 bram bram  1175344 Feb  3 09:44 libQtCLucene.so.4.8.2
lrwxrwxrwx 1 bram bram       40 Feb  3 03:09 libQtCore.so.4 -> /usr/lib/x86_64-linux-gnu/libQtCore.so.4
-rwxr-xr-x 1 bram bram  3074528 Feb  3 09:44 libQtCore.so.4.8.2
lrwxrwxrwx 1 bram bram       39 Feb  3 03:09 libQtGui.so.4 -> /usr/lib/x86_64-linux-gnu/libQtGui.so.4
-rwxr-xr-x 1 bram bram 11260800 Feb  3 09:44 libQtGui.so.4.8.2
lrwxrwxrwx 1 bram bram       40 Feb  3 03:09 libQtHelp.so.4 -> /usr/lib/x86_64-linux-gnu/libQtHelp.so.4
-rwxr-xr-x 1 bram bram   566984 Feb  3 09:44 libQtHelp.so.4.8.2
lrwxrwxrwx 1 bram bram       43 Feb  3 03:09 libQtNetwork.so.4 -> /usr/lib/x86_64-linux-gnu/libQtNetwork.so.4
-rwxr-xr-x 1 bram bram  1151464 Feb  3 09:44 libQtNetwork.so.4.8.2
lrwxrwxrwx 1 bram bram       42 Feb  3 03:09 libQtOpenGL.so.4 -> /usr/lib/x86_64-linux-gnu/libQtOpenGL.so.4
-rwxr-xr-x 1 bram bram  1042712 Feb  3 09:44 libQtOpenGL.so.4.8.2
lrwxrwxrwx 1 bram bram       39 Feb  3 03:09 libQtSql.so.4 -> /usr/lib/x86_64-linux-gnu/libQtSql.so.4
-rwxr-xr-x 1 bram bram   807792 Feb  3 09:44 libQtSql.so.4.8.2
lrwxrwxrwx 1 bram bram       39 Feb  3 03:09 libQtXml.so.4 -> /usr/lib/x86_64-linux-gnu/libQtXml.so.4
-rwxr-xr-x 1 bram bram   277192 Feb  3 09:44 libQtXml.so.4.8.2
lrwxrwxrwx 1 bram bram       40 Feb  3 03:09 libstdc++.so.6 -> /usr/lib/x86_64-linux-gnu/libstdc++.so.6
-rwxr-xr-x 1 bram bram   991440 Feb  3 09:44 libstdc++.so.6.0.16
bram@escher:~/Programs/rube-lin64-1.6.1$
This produces the behaviour explained in the original post.

For reference, here's the output of the ldd suggestion, edited from a vanilla unzip:

Code: Select all

bram@escher:~/Programs/rube-lin64-1.6.1$ ./rube
        linux-vdso.so.1 =>  (0x00007fffcc1fe000)
        libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f10dd0d1000)
        libQtHelp.so.4 => ./lib/libQtHelp.so.4 (0x00007f10dce46000)
        libQtSql.so.4 => ./lib/libQtSql.so.4 (0x00007f10dcb80000)
        libQtOpenGL.so.4 => ./lib/libQtOpenGL.so.4 (0x00007f10dc881000)
        libQtGui.so.4 => ./lib/libQtGui.so.4 (0x00007f10dbbc0000)
        libQtNetwork.so.4 => ./lib/libQtNetwork.so.4 (0x00007f10db8a7000)
        libQtCore.so.4 => ./lib/libQtCore.so.4 (0x00007f10db3b8000)
        libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007f10db151000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f10daf33000)
        libstdc++.so.6 => ./lib/libstdc++.so.6 (0x00007f10dac2c000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f10da925000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f10da70f000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f10da349000)
        libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f10da129000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f10d9f25000)
        libQtCLucene.so.4 => ./lib/libQtCLucene.so.4 (0x00007f10d9c05000)
        libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f10d9961000)
        libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f10d9757000)
        libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f10d951a000)
        libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f10d9308000)
        libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007f10d9100000)
        libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007f10d8ee3000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f10d8cdb000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f10dd440000)
        libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007f10d8ab3000)
        libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f10d88b0000)
        libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f10d86aa000)
        libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f10d84a7000)
        libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f10d8290000)
        libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007f10d808b000)
        libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007f10d7e87000)
        libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007f10d7c84000)
        libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f10d7a7e000)
        libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007f10d787b000)
        libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007f10d7675000)
        libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f10d7469000)
        libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f10d7264000)
        libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f10d705e000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f10d6e44000)
        libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007f10d6c1e000)
        libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f10d69f4000)
        libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f10d67ee000)
bram@escher:~/Programs/rube-lin64-1.6.1$
Any idea?
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: QSqlDatabase: QSQLITE driver not loaded

Post by iforce2d »

I don't understand why RUBE would be using your default Qt installation libs if the LD_LIBRARY_PATH had been set correctly. Could you try putting this at the end of the startup script, as you did with the ldd command and see what you get?

echo $LD_LIBRARY_PATH
beligum
Posts: 6
Joined: Tue Feb 03, 2015 1:28 pm

Re: QSqlDatabase: QSQLITE driver not loaded

Post by beligum »

Sure, here you go:

Code: Select all

bram@escher:~/Programs/rube-lin64-1.6.1$ ./rube
./lib:                                                                                                                                                                                                                                       
bram@escher:~/Programs/rube-lin64-1.6.1$
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: QSqlDatabase: QSQLITE driver not loaded

Post by iforce2d »

That looks ok and leaves me completely stumped.
I will install trusty 64 myself and see if I can figure it out.
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: QSqlDatabase: QSQLITE driver not loaded

Post by iforce2d »

Are there any clues in rube.log?
There should be a line that has "Amended library path: ..."

But you will need to turn on debug output for this particular logging to show, which is done in the Debug tab of the Options dialog... hmm... kinda an oversight in this case huh.

You could fiddle with the symlinks again to get it running and check the box in the options dialog, then try it again with the vanilla version. You could also edit ~/.config/iforce2d/rube.ini manually (while RUBE is not running) and set this line in the devstuff section, like so:
[devstuff]
showdebugmessages=true
beligum
Posts: 6
Joined: Tue Feb 03, 2015 1:28 pm

Re: QSqlDatabase: QSQLITE driver not loaded

Post by beligum »

Ok, tried that, here's what iI did:

Enabled the
showdebugmessages
in the config ini file and tried to run the rube wrapper:

Code: Select all

bram@escher:~/Programs/rube-lin64-1.6.1$ ./rube
Cannot mix incompatible Qt library (version 0x40806) with this library (version 0x40802)
Aborted (core dumped)
bram@escher:~/Programs/rube-lin64-1.6.1$
No luck, as mentioned before. Here's the rube.log file after that try:

Code: Select all

bram@escher:~/Programs/rube-lin64-1.6.1$ cat rube.log 
18:04:43 [  INFO   ]: Started log                                                                                                                                                                                                            
bram@escher:~/Programs/rube-lin64-1.6.1$
Not much wiser, hmm. Then I tried to run rube.bin directly, hoping it would use system libraries, which it did and started up the program with empty help boxes etc:

Code: Select all

bram@escher:~/Programs/rube-lin64-1.6.1$ ./rube.bin                                                                                                                                                                                          
QSqlDatabase: QSQLITE driver not loaded                                                                                                                                                                                                      
QSqlDatabase: available drivers:                                                                                                                                                                                                             
QSqlDatabase: QSQLITE driver not loaded                                                                                                                                                                                                      
QSqlDatabase: available drivers:                                                                                                                                                                                                             
QSqlDatabase: QSQLITE driver not loaded                                                                                                                                                                                                      
QSqlDatabase: available drivers:                                                                                                                                                                                                             
QObject::connect: Cannot connect (null)::setupFinished() to QHelpSearchEngine::indexDocumentation()                                                                                                                                          
bram@escher:~/Programs/rube-lin64-1.6.1$
This is the contents of rube.log

Code: Select all

bram@escher:~/Programs/rube-lin64-1.6.1$ cat rube.log                                                                                                                                                                                 
18:05:38 [  INFO   ]: Started log                                                                                                                                                                                                            
18:05:38 [  DEBUG  ]: Application dir path: /home/bram/Programs/rube-lin64-1.6.1                                                                                                                                                             
18:05:38 [  DEBUG  ]: Amended library path: /home/bram/Programs/rube-lin64-1.6.1/lib                                                                                                                                                         
18:05:38 [  DEBUG  ]: Stopping auto-refresh of images.                                                                                                                                                                                       
18:05:38 [  INFO   ]: Started R.U.B.E 1.6.1 - hello!                                                                                                                                                                                         
18:05:38 [  INFO   ]: Licensed to info@beligum.com                                                                                                                                                                                           
18:05:38 [  DEBUG  ]: Using Box2D 2.3.0                                                                                                                                                                                                      
18:05:38 [  DEBUG  ]: Using Angelscript 2.25.2                                                                                                                                                                                               
18:05:38 [  DEBUG  ]: Supported image formats: bmp gif ico jpeg jpg pbm pgm png ppm tga tif tiff xbm xpm                                                                                                                                     
18:05:38 [  DEBUG  ]: Initializing global script functions
18:05:38 [  DEBUG  ]: Initializing script types
18:05:38 [  DEBUG  ]: MainWindow::loadCustomMenuActions
18:05:38 [  DEBUG  ]: Found 2 entries
18:05:38 [  DEBUG  ]: somethingChanged because no previous file time found for config/actionMenu/default/layout.json
18:05:38 [  DEBUG  ]: Rebuilding action menu because somethingChanged
18:05:38 [  DEBUG  ]: MainWindow::clearCustomMenuActions
18:05:38 [  DEBUG  ]: Processing 2 entries
18:05:38 [  DEBUG  ]: Loading action menu: default
18:05:38 [  DEBUG  ]: Ignoring action menu: myscripts-
18:05:38 [  DEBUG  ]: Constructing EditorDocument 02F73CB0
18:05:38 [  DEBUG  ]: Setting up script engine for EditorDocument 02F73CB0
18:05:38 [  DEBUG  ]: Initializing global script functions
18:05:38 [  DEBUG  ]: Initializing script types
18:05:38 [  DEBUG  ]: Selected scratch-pad script
18:05:38 [  DEBUG  ]: Script editor switching to library entry 00000000
18:05:38 [  DEBUG  ]: Loading script hooks setup
18:05:39 [  DEBUG  ]: Quitting R.U.B.E - closing all views...
18:05:39 [  DEBUG  ]: All views closed.
18:05:39 [  INFO   ]: Exiting RUBE - goodbye!
18:05:39 [  DEBUG  ]: Destructing EditorDocument 02F73CB0
18:05:39 [  INFO   ]: Closed 'untitled1'
18:05:39 [  DEBUG  ]: Releasing script engine for EditorDocument 02F73CB0
18:05:39 [  DEBUG  ]: Stopping auto-refresh of images.
18:05:39 [  DEBUG  ]: MainWindow::clearCustomMenuActions
18:05:39 [  INFO   ]: Finished log

bram@escher:~/Programs/rube-lin64-1.6.1$
That's all I can do from here. If you need more, just send me instructions ;-)

b.
Post Reply