You are not logged in.

#1 2007-08-17 12:01:29

fede
Member
Registered: 2007-06-29
Posts: 126

[SOLVED] djview4 - Trying to compile with qt4

Hello,

I am trying to build a djview4, which depends on qt4. My system is running KDEmod 3.5.7, an I use qt3 by default. The PKGBUILD from AUR http://aur.archlinux.org/packages.php?d … 1&ID=10816 is:

# Contributor:  Leslie P. Polzer <polzer@gnu.org>
pkgname=djview4
pkgver=4.0
pkgrel=1
pkgdesc="DJVU viewer (Qt4 version)"
url="http://djvulibre.sf.net/"
license="GPL"
arch=('i686')
depends=('djvulibre' 'qt4')
source=(http://dl.sourceforge.net/djvu/$pkgname-$pkgver.tar.gz)
md5sums=('1952637bfd96cb605e24de3f32e8cda7')
sha1sums=('b6e4a640959200324626adaf411560b6ed559c3d')

build() {
  cd $startdir/src/$pkgname-$pkgver

  ./configure --prefix=/usr

  make || return 1
  make DESTDIR=$startdir/pkg install
}

On running makepkg, I discovered that the script was trying to use qt3 tools to build it. So I've tried the following changes, to no avail:

  ./configure --prefix=/usr \
    QTDIR=/opt/qt4 \
    QMAKE=/opt/qt4/bin/qmake \
    MDC=/opt/qt4/bin/mdc \
    UIC=/opt/qt4/bin/uic \
    RCC=/opt/qt4/bin/rcc

The (first) errors I get when running makepkg are:

Configuration is done.
Compile with command:
    $ make
Then install the binaries in /usr with command:
    # make install
cd src && make
make[1]: Entering directory `/var/abs/local/djview4/src/djview4-4.1.orig/src'
g++ -c -pipe -march=i686 -mtune=generic -pipe -I.. -pthread -march=i686 -mtune=generic -O2 -pipe -Wall -W -D_REENTRANT -DAUTOCONF -DNDEBUG -DQT_NO_DEBUG -DQT_NO_DEBUG_STREAM -DQT_NO_DEBUG -DQT_NETWORK_LIB -I/opt/qt/mkspecs/linux-g++ -I. -I/opt/qt/include/QtNetwork -I/opt/qt/include -I/usr/X11R6/include -I. -I. -o qdjvu.o qdjvu.cpp
In file included from qdjvu.cpp:29:
qdjvu.h:44:19: error: QObject: No such file or directory
qdjvu.h:45:19: error: QString: No such file or directory
qdjvu.h:46:16: error: QUrl: No such file or directory
qdjvu.cpp:31:22: error: QByteArray: No such file or directory
qdjvu.cpp:32:28: error: QCoreApplication: No such file or directory
qdjvu.cpp:33:18: error: QDebug: No such file or directory
qdjvu.cpp:34:17: error: QFile: No such file or directory
qdjvu.cpp:35:21: error: QFileInfo: No such file or directory
qdjvu.cpp:36:17: error: QList: No such file or directory
qdjvu.cpp:37:18: error: QMutex: No such file or directory
qdjvu.cpp:38:24: error: QMutexLocker: No such file or directory
qdjvu.cpp:39:17: error: QPair: No such file or directory
qdjvu.cpp:40:16: error: QSet: No such file or directory

..and so on: file not found errors follow. So I guess I'm not specifying how to use qt4 properly. Could you help me?

Thanks!

Last edited by fede (2007-08-17 12:54:06)

Offline

#2 2007-08-17 12:13:07

funkyou
Member
From: Berlin, DE
Registered: 2006-03-19
Posts: 848
Website

Re: [SOLVED] djview4 - Trying to compile with qt4

Do a sudo qt-config qt4 at first, then logout and login...

Then add source /etc/profile.d/qt4.sh above the configure line in your PKGBUILD.

This should make it work...


want a modular and tweaked KDE for arch? try kdemod

Offline

#3 2007-08-17 12:53:40

fede
Member
Registered: 2007-06-29
Posts: 126

Re: [SOLVED] djview4 - Trying to compile with qt4

Thanks! It worked great. Do I need to do something to 'revert' to qt3 for the next packages - ie, does qt-config 'select' the qt toolkit used at compile time for the system - or was this step only to configure qt4 and both libraries (qt3 & qt4) will coexist happily together without doing anything else?

Thanks again.

Last edited by fede (2007-08-17 12:55:18)

Offline

#4 2007-08-17 13:50:15

funkyou
Member
From: Berlin, DE
Registered: 2006-03-19
Posts: 848
Website

Re: [SOLVED] djview4 - Trying to compile with qt4

To swicth back to qt3, just do sudo qt-config qt3

qt-config sets the execute flags on the scripts in /etc/profile.d for the profile you have chosen, because you can only have one one these enabled. So you are right, it selects the qt version you want to use for compiling stuff... I believe this is because qt is in /opt, but i dont know exactly.


want a modular and tweaked KDE for arch? try kdemod

Offline

#5 2007-08-17 20:15:55

fede
Member
Registered: 2007-06-29
Posts: 126

Re: [SOLVED] djview4 - Trying to compile with qt4

Thanks for the explanation.

Offline

Board footer

Powered by FluxBB