./prepare can't detect sqlite (also: trouble with cmake)

Bug #1050586 reported by Daniel Stiefelmaier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Listaller
Invalid
Undecided
Unassigned

Bug Description

I'm trying to build Listaller on (K)ubuntu 12.04
(mainly I'd like to try the lig++ wrapper, which misses the buildlist binary if I apply the patch-fix and try to just use it)

On first run, the prepare script died without echoing a line!
I finally found that this happens here:

CMAKE=$(which cmake)

if cmake is not installed. (I inserted echos before and after this line, not sure why it fails)

Now I'm stuck at the following problem:

which sqlite
/usr/bin/sqlite

sqlite -version
2.8.17

./prepare --enable-libuild
-- Compiling Listaller version 0.5.5
-- checking for a minimum Vala version of 0.14
-- Could NOT find Sqlite (missing: SQLITE_INCLUDE_DIR SQLITE_LIBRARIES)
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
  Could NOT find LibArchive (missing: LibArchive_LIBRARY
  LibArchive_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-2.8/Modules/FindLibArchive.cmake:57 (find_package_handle_standard_args)
  src/CMakeLists.txt:60 (find_package)

-- Configuring incomplete, errors occurred!

Revision history for this message
Matthias Klumpp (ximion) wrote :

Hmm, the prepare-script seems to confuse many people who don't read the README file... I think I'll remove it with the next release in release tarballs.
The logs tell me that you need sqlite and libarchive:
sudo apt-get install libsqlite3-dev libarchive-dev

You logs look like you have only installed the binaries and not the development packages.
If you want, you can try to compile the current Git snapshot, but it will need a newer PackageKit (PK >= 0.8.4).
lig++ is a pretty powerful tool, but you shouldn't need it (although it is sometimes needed to make a binary compatible with more distributions)
Cheers,
   Matthias

Changed in listaller:
status: New → Invalid
Revision history for this message
Matthias Klumpp (ximion) wrote :

Because you were not the only one fighting with the prepare script, I removed it from release tarballs:
http://gitorious.org/listaller/listaller/commit/11311b1cad44c3190e2dd51ae9b8ea6426013d42
Thanks for this report!

Revision history for this message
Daniel Stiefelmaier (mail-stiefelweb) wrote :

Well, actually I *did* read the README first, and I think that is the most confusing part.
(Maybe i should mention that I used the released version, 0.5.5, not git, as i assumed it to be more reliable - the git README seems improved a little)

It talks about a DEPENDENCIES file which does not exist, continues with the source directory, which does not exist and about configure, which does also not exist, not even in "src" which would be my best guess for the "source" directory.

I figured the README is outdated and i have to adapt its information, for example i assumed that 'prepare' is the new 'configure', although i wondered who in the world would do that to improve a package...

I also saw the "Build dependencies" and "Dependencies" sections but it didn't explicitly say development files. I don't know in which way sqlite is used and also which components need it. "Qt4, GTK2 and NoX" is unspecific about what you need for which parts.

Also, that I had to patch the .pm files that ligcc uses did not improve my confidence in the package - it seemed to me the package is totally broken and nobody can really use it. And as there is no new release after several months, i was afraid nobody would care... In total, i worked around 2 problems and gave up on the third, probably the one that qualifies as bug the least. I apologize :)

Again, i don't think a configure script is confusing if it works as expected.
As i said, it quit on me *WITHOUT echoing one word!*
The lines

CMAKE=$(which cmake)
if [[ $? -gt 0 ]]; then
  echo "CMake was not found! Please install cmake."
  exit 8
fi

don't do what they are supposed to do - the if statement is never reached (!!!) if cmake is not installed - that is a flaw in the script, although i dont understand why it terminates abnormally on "which cmake". - Maybe actually a flaw in the 'which' script of Ubuntu 12.04.

By removing the script, you remove this flaw, but the main reason for my bug report was that cmake gave me an error that i was not able to parse properly :) Of course, this message is the same if cmake is used directly.

A line like "Checking for sqlite development files... FAIL" would probably have helped me... :)

Revision history for this message
Daniel Stiefelmaier (mail-stiefelweb) wrote :

Erm... okay, SQLITE_INCLUDE_DIR actually implies that - maybe my lost confidence in the package and beeing tired after finally solving the first two problems didn't really help ;)

I'll try again tomorrow...

Revision history for this message
Matthias Klumpp (ximion) wrote :

The old README file refered to a version of Listaller before it was rewritten in Vala, so it was completely useless... Funny, I thought 0.5.5 already had the updated version ;-)
I don't have much influence on cmake messages, but it's kinda obvious that you will need the development files to compile an application ;-)
I suppose the "patches" you're talking about were taken from some of the bug reports? You might want to try the Git snapshot, although you will have to compile a development version of PackageKit too then.
There will be a newer Listaller release together with PackageKit 0.8.4 - my work on PackageKit and AppStream/OpenSUSE blocked Listaller a little, but you can be confident there will be a release in next ~3weeks. (and after that we switch to a release cycle in sync with PackageKit and GNOME)

The prepare script is just to set up cmake quickly - usually you shouldn't use it and run cmake directly, which causes much less errors and allows further optimizations. That's why I thing removing it for 0.5.6 is sane.
(I'm also no bash expert, so I can't make it completely error-proof)

Btw: You'll also need some other stuff like GPGMe development files. On Quantal or Debian Wheezy, just execute
sudo apt-get build-dep listaller
to get them all. You can also see a list of build-dependencies here: http://packages.debian.org/source/sid/listaller

So, this should really be enough information to make it possible for you to compile the project :-) - Oh, and if you want LiBuild too: Don't forget to enabled it with -DLIBUILD=ON.

Revision history for this message
Daniel Stiefelmaier (mail-stiefelweb) wrote :

Thanks a lot :)
I ended up using the listaller-libuild package from the debian repository, as i "just" wanted to use ligcc, and it saved me from installing lots of dependencies that i don't really need.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.