Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 307801 - akonadi-server-1.3.1 fails to start with sqlite use flag in both qt-sql and akonadi-server
Summary: akonadi-server-1.3.1 fails to start with sqlite use flag in both qt-sql and a...
Status: RESOLVED DUPLICATE of bug 306539
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: AMD64 Linux
: High minor (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-04 19:12 UTC by lumbrius
Modified: 2010-09-08 14:11 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---
tampakrap: Bugday+


Attachments
akonadi-server self-test log (akonadi-crash,7.11 KB, text/plain)
2010-03-04 19:12 UTC, lumbrius
Details
Output from akonadictl start command (akonadictl-start-output.txt,5.36 KB, text/plain)
2010-06-30 12:05 UTC, Ross Drummond
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lumbrius 2010-03-04 19:12:19 UTC
I have use-flaq 'sqlite' enabled for both qt-sql and akonadi-server, and other DB-related flags (such as'-mysql') disabled for both of them.

Reproducible: Always

Steps to Reproduce:
1. emerge qt-sql with following flags: exceptions iconv qt3support sqlite -aqua -debug -firebird -mysql -odbc -pch -postgres
2. emerge akonadi-server with following flags: sqlite -mysql -postgres
3. try to log on in KDE.

Actual Results:  
Akonadi server will fail to start (and, therefore, some applications such as kmail, wont work)

Expected Results:  
akonadi-server should start normally

Portage 2.1.7.17 (default/linux/amd64/10.0/desktop, gcc-4.3.3, glibc-2.10.1-r0, 2.6.31-gentoo-r6 x86_64)
=================================================================
System uname: Linux-2.6.31-gentoo-r6-x86_64-Intel-R-_Core-TM-2_Duo_CPU_P7350_@_2.00GHz-with-gentoo-2.0.1
Timestamp of tree: Thu, 04 Mar 2010 08:30:01 +0000
app-shells/bash:     4.1_p2
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4-r1, 3.1.1-r1
dev-util/cmake:      2.8.0-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.0-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc:       4.3.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1"
LINGUAS="ru en_GB"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/science /usr/local/portage/layman/java-overlay /usr/local/portage"
SYNC="rsync://85.142.161.47/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo fam firefox flac fortran gdbm gif gpm gstreamer hal iconv jpeg kde ldap libnotify mad mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp oss pam pcre pdf perl png ppds pppd python qt3support qt4 quicktime readline reflection samba sdl session spell spl sse sse2 sse3 ssl startup-notification svg sysfs tcpd thunar tiff truetype unicode usb vorbis x264 xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru en_GB" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 lumbrius 2010-03-04 19:12:46 UTC
Created attachment 222083 [details]
akonadi-server self-test log
Comment 2 steffen katzenberger 2010-04-08 17:19:20 UTC
a emerge qt-sql did the trick for me
(as described here: http://bugs.gentoo.org/show_bug.cgi?id=306539)
Comment 3 Maciej Mrozowski gentoo-dev 2010-06-04 21:02:58 UTC
I think you're missing one important thing mentioned explicitly in post_install message - sqlite backend is experimental and known to be broken (in 1.2.x and 1.3.x releases).
Comment 4 Etaoin Shrdlu 2010-06-28 10:08:56 UTC
Not sure that helps, but on my system the problem was that the akonadi db needs sqlite 3, but akonadi looks for the executable "sqlite" when starting up, which on Gentoo points to sqlite 2.
Comment 5 Ross Drummond 2010-06-30 12:05:57 UTC
Created attachment 237033 [details]
Output from akonadictl start command

Output from akonadictl start command
Comment 6 Ross Drummond 2010-06-30 12:08:29 UTC
(In reply to comment #4)
> Not sure that helps, but on my system the problem was that the akonadi db needs
> sqlite 3, but akonadi looks for the executable "sqlite" when starting up, which
> on Gentoo points to sqlite 2.
> 

the link "ln -s /usr/bin/sqlite /usr/bin/sqlite3" does not cear this problem for me
Comment 7 Etaoin Shrdlu 2010-06-30 16:25:45 UTC
I think there's also a syntax error in the SQL statement it tries to execute (something about false being unquoted IIRC). If you run "akonadictl start" by hand it'll tell you what it is. Once you've seen it, connect to the sqlite db manually using sqlite3, and enter the statement with the correct syntax (ie, 'false' in single quotes). Exit and try to start akonadi again. I think that did the trick for me.
Comment 8 Ross Drummond 2010-07-01 05:47:33 UTC
(In reply to comment #7)
> I think there's also a syntax error in the SQL statement it tries to execute
> (something about false being unquoted IIRC). If you run "akonadictl start" by
> hand it'll tell you what it is. Once you've seen it, connect to the sqlite db
> manually using sqlite3, and enter the statement with the correct syntax (ie,
> 'false' in single quotes). Exit and try to start akonadi again. I think that
> did the trick for me.
> 

I arrived at similar solution independently from Etaoin.

Sqlite stores boolean values as integers, 0=false 1=true.

My akonanadiserver.error file said;

"Unable to add initial data to table 'ResourceTable'.
Query error: 'no such column: true Unable to execute statement'
Query was: INSERT INTO ResourceTable (name,isVirtual) VALUES ('akonadi_search_resource',true)" 
Unable to initialize database. 

I ran the sqlite3 application to connect to the akonadi.db file and ran the INSERT query after substituting the word true with integer 1.

After I did this kmail started without any errors.
Comment 10 kavol 2010-07-14 12:44:01 UTC
I think the summary of this report should be something like "akonadi-server should require qt-sql with mysql use flag enabled"

according to the docs:
http://userbase.kde.org/Akonadi_4.4/Troubleshooting#Missing_Prerequisite
and also the mentioned KDE bug #238773, mysql is really needed for akonadi (at least for now)
Comment 11 Maciej Mrozowski gentoo-dev 2010-09-08 14:05:57 UTC
Sqlite backend in 1.3 is marked as experimental (and it's visibly communicated in pkg_postinst) and unsupported so I don't know why anyone expects it to work flawlessly.
If you want to try sqlite backend, upgrade to akonadi-server 1.4.

Also a note for those irresponsible using full ~arch. I've fixed akonadi-server-1.4 so that it doesn't bail out on too new sqlite version.
Comment 12 Maciej Mrozowski gentoo-dev 2010-09-08 14:11:39 UTC

*** This bug has been marked as a duplicate of bug 306539 ***