LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-05-2011, 09:00 AM   #1
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,645

Rep: Reputation: 145Reputation: 145
anki on Slackware 13.37


Hi all,

has anyone succeeded in running Anki (http://ankisrs.net/ , a flash-card program to learn facts) on Slackware 13.37? If so, could you please post the versions of python, sqlite, sqlalchemy and python-simplejson that you have installed?
I get an error each time I try to create a new card deck, exactly as described in http://code.google.com/p/anki/issues...tars%20Summary . Any hint on which versions of the afore mentioned apps work together so that you can create a new card deck is highly appreciated.

tito
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 10-06-2011, 02:17 AM   #2
chrissi29
LQ Newbie
 
Registered: May 2010
Location: germany
Distribution: slackware current
Posts: 23

Rep: Reputation: 2
Hello Tito,
not an answer to your question. But did you think about using Parley, which is very easy to install?
 
Old 10-06-2011, 03:23 AM   #3
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,645

Original Poster
Rep: Reputation: 145Reputation: 145
Quote:
Originally Posted by chrissi29 View Post
Hello Tito,
not an answer to your question. But did you think about using Parley, which is very easy to install?
Hi Chrissi29,

yes, I have thought about Parley or other simpler flash card programs. Anki has advantages that come very very handy to me and that are not at all met by other apps like Parley. They are for my purpose way to simple and require twice or three times the time to get the same cards done*. But thanks for your suggestion.

Tito

* Anki uses "facts" to generate cards. You can assign several card layouts to one fact and Anki creates all the cards automatically once you have input the fact. For example imagine a simple irregular verb. You have the base form, past and perfect in language 1 and the translation of the verb in language 2. With Anki you can now create CardLayouts, for example "What means {verb-base} in {verb-translation}" or "What is the perfect form of {verb-base}" or "What is the past form that belongs to {verb-perfect}". That way you can create many cards in one step. Once you think to add a CardLayout or want to change one of the facts, you can automatically recreate all required cards without tinkering with every single one.
 
Old 10-07-2011, 02:52 AM   #4
chrissi29
LQ Newbie
 
Registered: May 2010
Location: germany
Distribution: slackware current
Posts: 23

Rep: Reputation: 2
Hi Tito,
sounds really interesting, though I also could not get it to work on current.
I tried Salix64-Packages and the Debian packages from the official site...
 
Old 10-07-2011, 03:13 AM   #5
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,645

Original Poster
Rep: Reputation: 145Reputation: 145
I have it running on ArchLinux in VirtualBox without problems, but would prefer to run it directly on Slackware though. On my Laptop the virtual machine is a heavy burden, it slows down every other task.
 
Old 10-07-2011, 07:53 AM   #6
pino_otto
Member
 
Registered: Dec 2005
Location: Italy
Distribution: Slackware
Posts: 89

Rep: Reputation: 19
I run anki on my Slackware 13.1

I just downloaded from the website, uncompressed and run.
 
Old 10-07-2011, 11:55 AM   #7
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,645

Original Poster
Rep: Reputation: 145Reputation: 145
Quote:
Originally Posted by pino_otto View Post
I run anki on my Slackware 13.1

I just downloaded from the website, uncompressed and run.
Hi pino_otto,

thanks for your feedback. Could you tell me which versions you are running? python, anki, simplejson, SQLAlchemy and eventually sqlite are the ones that I need I think. That would be highly appreciated

tito
 
Old 10-11-2011, 03:59 PM   #8
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
The problem is that Slackware's sqlite was compiled with the SQLITE_ENABLE_STAT2 option, which adds further index data to the database in the form of an additional table (sqlite_stat2, which cannot be deleted) to increase query speeds. The development version of Anki has proper support for sqlite with that option, but the stable version does not. Unfortunately the dev version is not full-featured and is a *major* change from 1.x. You could compile the development version and use that, or you can try a workaround to get 1.x to work.

I myself compiled sqlite without the SQLITE_ENABLE_STAT2 option (in its own little directory, not system-wide) and exported LD_LIBRARY_PATH to point to the new sqlite installation before running anki. You might be able to get away with recompiling sqlite and installing it system-wide, but I have no idea whether or not it would break existing sqlite databases (which would contain the extra table) and the software that uses it (like KDE, for example).

Here's the diff for the SlackBuild I used (compared to the official Slackware 13.37 SlackBuild). You will have to adjust the directories used (TMP and PKG). Note that I built this using my regular user in my home directory -- it is *not* installed system wide. You can of course do as you please.

Code:
--- sqlite.SlackBuild.orig	2011-08-23 23:46:32.623392019 -0400
+++ sqlite.SlackBuild	2011-08-24 00:12:45.184517884 -0400
@@ -41,8 +41,9 @@
 fi
 
 CWD=$(pwd)
-TMP=${TMP:-/tmp}
-PKG=$TMP/package-$PKGNAM
+TMP=${TMP:-$CWD/tmp}
+PKG=$(readlink -f $CWD/../../pkg)
+echo $PKG
 
 if [ "$ARCH" = "i486" ]; then
   SLKCFLAGS="-O2 -march=i486 -mtune=i686"
@@ -59,7 +60,7 @@
 fi
 
 # Enable some features:
-SLKCFLAGS="$SLKCFLAGS -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_STAT2=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -DSQLITE_SECURE_DELETE=1"
+SLKCFLAGS="$SLKCFLAGS -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -DSQLITE_SECURE_DELETE=1"
 
 rm -rf $PKG
 mkdir -p $TMP $PKG
@@ -67,7 +68,7 @@
 rm -rf $PKGNAM-$VERSION
 tar xvf $CWD/$PKGNAM-src-$VERSION.tar.?z* || exit 1
 cd $PKGNAM-src-$VERSION || exit 1
-chown -R root.root .
+#chown -R root.root .
 find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  -exec chmod 755 {} \; -o \
@@ -78,11 +79,12 @@
 CFLAGS="$SLKCFLAGS" \
 CXXFLAGS="$SLKCFLAGS" \
 ./configure \
-  --prefix=/usr \
-  --libdir=/usr/lib${LIBDIRSUFFIX} \
-  --sysconfdir=/etc \
-  --localstatedir=/var \
-  --mandir=/usr/man \
+  --prefix=$PKG/usr \
+  --libdir=$PKG/usr/lib${LIBDIRSUFFIX} \
+  --sysconfdir=$PKG/etc \
+  --localstatedir=$PKG/var \
+  --mandir=$PKG/usr/man \
+  --disable-tcl \
   --enable-threadsafe \
   --enable-cross-thread-connections \
   --enable-tempstore=yes \
@@ -99,7 +101,8 @@
 fi
 
 make $NUMJOBS || make || exit 1
-make install DESTDIR=$PKG || exit 1
+#make install DESTDIR=$PKG || exit 1
+make install || exit 1
 
 find $PKG | xargs file | grep -e "executable" -e "shared object" \
   | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
@@ -125,5 +128,5 @@
 cat $CWD/slack-desc > $PKG/install/slack-desc
 
 cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$OLD_STYLE-$ARCH-$BUILD.txz
+#/sbin/makepkg -l y -c n $TMP/$PKGNAM-$OLD_STYLE-$ARCH-$BUILD.txz
I wrote a quick wrapper script to launch anki for me so I don't have to manually export LD_LIBRARY_PATH every time. I'll include that in case you want it:
Code:
#!/bin/sh

PRGNAM=anki
VERSION=1.2.9

ANKIDIR="$(dirname "$(readlink -f $0)")"
PREFIX="$ANKIDIR/deps/pkg/usr"
#PYTHON="$PREFIX/bin/python"
PYTHON="/usr/bin/python"
LD_LIBRARY_PATH="$PREFIX/lib64"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH"

cd "$ANKIDIR/$PRGNAM-$VERSION"
$PYTHON anki
You'll have to adjust the paths again here (ANKIDIR just gets the directory that this wrapper script lives in, but you may not want that. PREFIX is where the new sqlite lives. This script assumes anki is just an untarred anki package living in the same directory as the wrapper script (so anki-$VERSION)).

You'll probably have to fiddle a bit to get it to work but it does work fine with this ugly workaround.
 
2 members found this post helpful.
Old 10-12-2011, 01:34 PM   #9
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,645

Original Poster
Rep: Reputation: 145Reputation: 145
Hi T3slider,

a big thank you for your great post. I am hoping to try it later this evening or tomorrow, but from what you wrote this looks more than promising. I had already tried different versions of all included apps but python, but I hadn't looked at the build options at all, nearsighted as I am. I appreciate your post very much and will report back if or better when I succeeded
 
Old 10-13-2011, 04:55 AM   #10
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,645

Original Poster
Rep: Reputation: 145Reputation: 145
Wonderful, it works. First I compiled sqlite the wrong way - instead of removing the part I set the option to "0" instead of "1" which didn't work. Now I have installed it system-wide. Since I am using Xfce4 and have not found any sqlite databases besides seamonkey and firefox configure files on my system, there should be no problems I guess. Your tip with the local per-user installation looks good, too, should I run in any problems. Thanks again for this solution T3slider, now I can concentrate on putting the data in and learning with Anki
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Anki - An alternative learning program LXer Syndicated Linux News 0 06-01-2011 02:30 AM
LXer: Making Slackware and Slackware Derivative Linux Distros Speak Your Language LXer Syndicated Linux News 0 01-29-2009 12:30 AM
About Slackware 9.1 boot disk?? ftp://ftp.kpn.be/pub/linux/slackware/slackware-9.1-is AL3OMDAH Slackware 4 04-18-2007 09:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration