Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to compile and install some software. When I do the ./configure. I get the following error:

checking for Qt... configure: error: Qt (>= Qt 3.0.2) (headers and libraries) not found. Please check your installation!

So I install the following package thinking this would solve the problem.

sudo apt-get install libqt4-dev

I was thinking that the libqt4-dev would install the headers and libraries. However, I am still getting the same problem.

Any ideas?

Ubuntu 9.10
kernel 2.6.31-20-generic


Edit: I am trying to install kgraphspace-0.3.0-pre1. I have installed KDE with "sudo apt-get install kde-devel". My KDE 3 includes are in /usr/include/KDE, and shared libraries in /usr/lib/kde4.

I am trying to run this command:

./configure --with-qt-includes=/usr/include/qt3/ --with-qt-libraries=/usr/lib/
              --prefix=/usr/lib/kde4

...and I get the following error:

checking for KDE... configure: error:
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
So, check this please and use another prefix!

What am I missing?

share|improve this question

3 Answers 3

up vote 1 down vote accepted

First, there are two problems with your existing ./configure command:

  1. --with-qt-libraries= should point to /usr/lib/qt3 instead of /usr/lib/, unless you've installed Qt3 libraries by hand and know they're at that location.

  2. --prefix= needs to point to the base location where the package will be installed. It doesn't point to anything needed for compiling the package. /usr/lib/kde4 is probably a bad choice; you'll need to add it to the $PATH to execute the program. Most likely, you want --prefix=/usr/local or --prefix=$HOME, to install either to /usr/local/bin or /home/[username]/bin, or stick with the program's default setting (/usr/local/kde).


On a fairly clean Ubuntu 9.10 virtual machine, I needed to install these packages and their dependencies.

sudo apt-get install libqt3-headers libqt3-compat-headers libqt3-mt-dev
                  qt3-dev-tools qt3-dev-tools-compat kdelibs4-dev

Additionally, the ./configure checks for several tools that were part of aRts -- the mcopidl and artsc-config commands, which are no longer included in any KDE packages in the standard Ubuntu repositories. aRts was an old KDE sound library, and I believe it's been completely replaced or subsumed.

I've no idea if kgraphspace requires the sound functionality, so I created the shellscripts $HOME/bin/mcopidl and $HOME/bin/artsc-config that only contain this:

#!/bin/sh
echo "Hiya"

That's enough to satisfy the ./configure checks, but won't work properly if these programs are actually called during compilation.

According to Ubuntu's repository websearch, the real programs were last available in Ubuntu 8.10 (Intrepid). If you really need kgraphspace, consider installing Ubuntu 8.04. (Hardy was the LTS release of that era, and its repositories will be around longer than the Intrepid repositories.)


Here's my working ./configure command (options split into separate lines for clarity):

./configure --with-qt-includes=/usr/include/qt3 
            --with-qt-libraries=/usr/lib/qt3
            --prefix=/usr/local

Unfortunately, make dies with the following error, and this is as far as I can get in attempting to compile this software:

make[3]: Entering directory `/home/quack/test/kgraphspace-0.3.0-pre1/kgraphspace'
source='ktypesstats.cpp' object='ktypesstats.o' libtool=no \
        depfile='.deps/ktypesstats.Po' tmpdepfile='.deps/ktypesstats.TPo' \
        depmode=gcc3 /bin/bash ../admin/depcomp \
        g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/kde -I/usr/include/qt3
           -I. -Wall  -Wall  -c -o ktypesstats.o `test -f 'ktypesstats.cpp' ||
           echo './'`ktypesstats.cpp
ktypesstats.cpp: In member function ‘QString KTypesStats::getFileType(const char*)’:
ktypesstats.cpp:112: error: invalid conversion from ‘const char*’ to ‘char*’
make[3]: *** [ktypesstats.o] Error 1

You could try installing an earlier GCC4 release (gcc-4.1 or gcc-4.2), since this Gentoo bug indicates problems compiling with GCC 4.3 (Ubuntu 9.10 provides GCC 4.4 by default).

However, one of the comments indicates that kgraphspace is a dead project, last updated in 2002. The commenter recommends Filelight as a potential replacement.

share|improve this answer

Following on from akira there'll probably be a deb package providing compatibility with Qt 3, whilst having Qt 4 installed. On Debian these packages are called things like libqt3-headers, libqt3-mt, libqt3mt-dev etc. Try installing some of them, if you're compiling from source you'll probably need the dev versions as well as the plain packages.

[EDIT] KDE 3 and KDE 4 are not compatible with each other as KDE 3 depends on Qt 3 and KDE 4 depends on Qt 4. I don't know whether it's the cause of your problems but you appear to be putting your KDE 4 installation as the prefix, try the KDE 3 one instead.

share|improve this answer
    
All those are the newer version. libqt3-mt-dev is already the newest version, libqt3-mt is already the newest version, libqt3-headers is already the newest version. Many thanks for any more suggestions. –  ant2009 Mar 29 '10 at 10:05
    
i use packages.ubuntu.com to look up package names (eg packages.ubuntu.com/…) ... @ant2009, have you checked "./configure --help" to see if you need to use a specific option to show it where Qt lives? –  quack quixote Mar 29 '10 at 10:50
    
and i use just "apt-file search filename" .. with filename something configure.log complains about. furthermore, i think configure uses 'pkg-config' or 'qmake -query' to find out about the qt version, the more interesting part would be to just read the documentation of the software OP wants to compile, there should be stated if it neeeds qt3 or qt4. –  akira Mar 29 '10 at 11:46
    
If it refers to Qt >= 3.0.2 then it is almost certainly not going to work with Qt4, as the two libraries are not compatible. –  Amos Mar 29 '10 at 22:09
    
Hello, I have managed to solve the problem of the qt libaries and headers by setting the path. However, I am having a problem now with the kde libraries. I have updated my question, as there is a lot to type. –  ant2009 Mar 31 '10 at 8:08

Mhh .. it looks a bit like your program depends on Qt 3, not Qt 4.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.