Compiling KeePassX 2 from Source with Qt 4.8.0
==============================================
:author: Aaron Ball
:email: nullspoon@iohq.net



I am a huge http://keepass.info/[KeePass] fan. I started using it back in
college (which was oh so long ago...yyeeaaahhh) when I was using Windows. I
later switched to using Linux full time (Ubuntu is definitely a gateway
distro). Sadly, I had to leave behind the wonders of the kdbx format for kdb
because the Linux KeePass version, http://www.keepassx.org[KeePassX], doesn't
support the newer format. But hey, beggers can't be choosers, right?

A few months back, the developer for KeePassX, debfx, posted on his blog
http://www.keepassx.org/news/2010/09/242[here] that he was completely
rebuilding KeePassX from scratch. With that, I headed straight on over to his
gitorious page and grabbed his source code. Upon trying to build from source, I
met a few issues. First off, here's what I typed to get started.

From a directory called build inside of the master directory, I ran the
following:

----
cmake .. -DCMAKE_INSTALL_PREFIX=~/Desktop/keepassx/keepassx
make
----

Running cmake worked fine, but when I ran make I received the following errors.

----
/usr/include/QtCore/qscopedpointer.h:207:1: error: stray ‘`’ in program
/usr/include/QtCore/qscopedpointer.h: In member function ‘const T& QScopedArrayPointer<T, Cleanup>::operator[](int) const’:
/usr/include/QtCore/qscopedpointer.h:226:9: error: ‘r’ was not declared in this scope
/usr/include/QtCore/qscopedpointer.h:226:11: error: ‘turn’ was not declared in this scope
/usr/include/QtCore/qscopedpointer.h:226:16: error: expected ‘;’ before ‘this’
----

Oddly it would seem we have a problem with our QtCore stuff. Here's how we fix
this. In my case, I only had to change two things. Both changes need to be made
to **/usr/include/QtCore/qscopedpointer.h**.

Firstly, head down to line 207. It will look like

----
template <typename T,`typename Cleanup = QScopedPointerArrayDeleter>T> >
----

Remove the ` 

----
template <typename T,typename Cleanup = QScopedPointerArrayDeleter<T> >
----

Secondly, head down to line 226 which should look like

----
r%turn this->d[i];
----

Change the % to the letter e 

----
return this->d[i];
----

Once you've done that, go back and run the cmake, make, and make install
commands and you should be set. It looks like a lot of work has yet to be done,
but overall it's looking really great. Serious props to debfx for working on
KeePassX. I'm really looking forward to this.


Category:Linux
Category:Linux_Applications


// vim: set syntax=asciidoc:
