You are not logged in.
Hi,
Since last upgrade I can't compile my qt4 apps with KDevelop or QDevelop. It says something like :
make: *** No rules to build target « /opt/qt4/mkspecs/linux-g++/qmake.conf », required by « Makefile ». Stopping.
The qt-config tool does not exist anymore. There is a qtconfig one but, doesn't seem to be helping.
I know that the files in the the qt4 package have been moved from /opt/qt4 to /usr/, but still I don't know what to do.
I'm stuck !
Offline
"unset QTDIR" then try again
Offline
thanks but it seems that nothing changes doing this. Usually I reinstall qt4 with pacman when compilation does not work (very subtile method !). This time the trick does not work. I just wonder if anyone's succesfull with qt4 compilation by now with arch linux ...
Offline
your makefile is still looking for qmake specs in /opt/qt4. recreate your makefile or change it to the current location (/usr/share/qt4/mkspecs i think).
Offline
I searched & replaced every occurrence of /opt/qt with /usr/share/qt4. Now I have some errors with 'QtAddLibrary' or something like that.
Anyway I am not able to compile any other qt4 apps from source (downloaded from qt-apps.org for example) : get tons of errors. Qt4 is currently just unusable to compile anything. Why ?
I guess this is a confusion between qt3/qt4 since qt4 files migrated from /opt to /usr/share.
Still I don't know what to do.
Offline
why don't you paste your files here and i'll look at them.
Offline
The fact is I cannot compile ANYTHING in QT4 !
Let's take an example. I want to compile QPaddy (you can find it on qt-apps.org).
I set the vars (which doesn't seem to have any effect):
export QTDIR=/usr/share/qt4
export QMAKESPEC=/usr/share/qt4/mkspecs/linux-g++
export QT_LIBRARY_PATH=/usr/include/Qt
I try to compile QPAddy :
qmake qpaddy.pro
make
Here is what I get :
cd src/ && make -f Makefile
make[1]: entrant dans le répertoire « /root/docs/qpaddy0876/src »
make[1]: *** Pas de règle pour fabriquer la cible « /usr/lib/qt-3.3/mkspecs/default/qmake.conf », nécessaire pour « Makefile ». Arrêt.
make[1]: quittant le répertoire « /root/docs/qpaddy0876/src »
make: *** [sub-src-make_default] Erreur 2
And now the MakeFile :
#############################################################################
# Makefile for building: qpaddy
# Generated by qmake (2.01a) (Qt 4.3.2) on: mar. nov. 6 17:49:17 2007
# Project: qpaddy.pro
# Template: subdirs
# Command: /usr/bin/qmake -unix -o Makefile qpaddy.pro
#############################################################################
first: make_default
MAKEFILE = Makefile
QMAKE = /usr/bin/qmake
DEL_FILE = rm -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
COPY = cp -f
COPY_FILE = $(COPY)
COPY_DIR = $(COPY) -r
INSTALL_FILE = install -m 644 -p
INSTALL_PROGRAM = install -m 755 -p
INSTALL_DIR = $(COPY_DIR)
DEL_FILE = rm -f
SYMLINK = ln -sf
DEL_DIR = rmdir
MOVE = mv -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
SUBTARGETS = \
sub-src
src//$(MAKEFILE):
@$(CHK_DIR_EXISTS) src/ || $(MKDIR) src/
cd src/ && $(QMAKE) src.pro -unix -o $(MAKEFILE)
sub-src-qmake_all: FORCE
@$(CHK_DIR_EXISTS) src/ || $(MKDIR) src/
cd src/ && $(QMAKE) src.pro -unix -o $(MAKEFILE)
sub-src: src//$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE)
sub-src-make_default: src//$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE)
sub-src-make_first: src//$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE) first
sub-src-all: src//$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE) all
sub-src-clean: src//$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE) clean
sub-src-distclean: src//$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE) distclean
sub-src-install_subtargets: src//$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE) install
sub-src-uninstall_subtargets: src//$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE) uninstall
Makefile: qpaddy.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/g++.conf \
/usr/share/qt4/mkspecs/common/unix.conf \
/usr/share/qt4/mkspecs/common/linux.conf \
/usr/share/qt4/mkspecs/qconfig.pri \
/usr/share/qt4/mkspecs/features/qt_functions.prf \
/usr/share/qt4/mkspecs/features/qt_config.prf \
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
/usr/share/qt4/mkspecs/features/default_pre.prf \
/usr/share/qt4/mkspecs/features/release.prf \
/usr/share/qt4/mkspecs/features/default_post.prf \
/usr/share/qt4/mkspecs/features/qt.prf \
/usr/share/qt4/mkspecs/features/unix/thread.prf \
/usr/share/qt4/mkspecs/features/moc.prf \
/usr/share/qt4/mkspecs/features/warn_on.prf \
/usr/share/qt4/mkspecs/features/resources.prf \
/usr/share/qt4/mkspecs/features/uic.prf \
/usr/share/qt4/mkspecs/features/yacc.prf \
/usr/share/qt4/mkspecs/features/lex.prf
$(QMAKE) -unix -o Makefile qpaddy.pro
/usr/share/qt4/mkspecs/common/g++.conf:
/usr/share/qt4/mkspecs/common/unix.conf:
/usr/share/qt4/mkspecs/common/linux.conf:
/usr/share/qt4/mkspecs/qconfig.pri:
/usr/share/qt4/mkspecs/features/qt_functions.prf:
/usr/share/qt4/mkspecs/features/qt_config.prf:
/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
/usr/share/qt4/mkspecs/features/default_pre.prf:
/usr/share/qt4/mkspecs/features/release.prf:
/usr/share/qt4/mkspecs/features/default_post.prf:
/usr/share/qt4/mkspecs/features/qt.prf:
/usr/share/qt4/mkspecs/features/unix/thread.prf:
/usr/share/qt4/mkspecs/features/moc.prf:
/usr/share/qt4/mkspecs/features/warn_on.prf:
/usr/share/qt4/mkspecs/features/resources.prf:
/usr/share/qt4/mkspecs/features/uic.prf:
/usr/share/qt4/mkspecs/features/yacc.prf:
/usr/share/qt4/mkspecs/features/lex.prf:
qmake: qmake_all FORCE
@$(QMAKE) -unix -o Makefile qpaddy.pro
qmake_all: sub-src-qmake_all FORCE
make_default: sub-src-make_default FORCE
make_first: sub-src-make_first FORCE
all: sub-src-all FORCE
clean: sub-src-clean FORCE
distclean: sub-src-distclean FORCE
-$(DEL_FILE) Makefile
install_subtargets: sub-src-install_subtargets FORCE
uninstall_subtargets: sub-src-uninstall_subtargets FORCE
mocclean: compiler_moc_header_clean compiler_moc_source_clean
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
install: install_subtargets FORCE
uninstall: uninstall_subtargets FORCE
FORCE:
Any idea ?
Offline
Ok, for the record, next time you come across a problem like this, try the following:
find . -name Makefile -exec rm '{}' \;
qmake
make
This was created with qt3.3, so it'll be impossible to built with qt4 (ui file too old). If you really want it, try
source /etc/profile.d/qt.sh
find . -name Makefile -exec rm '{}' \;
qmake
make
Though that doesn't compile either due to complaints about missing headers. If you ask me, the program is FUBAR. I suggest some newer editor =]
Offline
Thanks for your kind help but I don't think this answers to my question : what I want is to restore a complete QT4 development environment in order to compile Qt4 sources with my favorites editors such as Qdevelop and Kdevelop, just like it was before last update.
On a french arch linux forum a guy said he reinstalled qt4-4.3.2-1 , the one that installed in /opt/qt4 (http://forums.archlinux.fr/topic1101.html?highlight=qt4), and that it worked fine.
To me it appears obvious there is a problem with the latest qt4 package. What do you think ?
Offline
Like I said again, the problem is not the path that it's installed. You'd have to recreate the Makefiles to that it reads from /usr and not /opt/qt4. I might as well suggest rebuilding qdev and kdev, perhaps that will help.
I've compiled entire kde4 builds with a problem, I'm pretty sure your problem lies with q/kdevelop.
Offline
The fact is I cannot compile ANYTHING in QT4 !
Let's take an example. I want to compile QPaddy (you can find it on qt-apps.org).
I set the vars (which doesn't seem to have any effect):
export QTDIR=/usr/share/qt4
export QMAKESPEC=/usr/share/qt4/mkspecs/linux-g++
export QT_LIBRARY_PATH=/usr/include/Qt
<snipped>
Any idea ?
You don't need to use those environment variables.
Simply do this:
source /etc/profile.d/qt4.sh
/usr/bin/qmake
make
Offline
Thanks for your kind help but I don't think this answers to my question : what I want is to restore a complete QT4 development environment in order to compile Qt4 sources with my favorites editors such as Qdevelop and Kdevelop, just like it was before last update.
On a french arch linux forum a guy said he reinstalled qt4-4.3.2-1 , the one that installed in /opt/qt4 (http://forums.archlinux.fr/topic1101.html?highlight=qt4), and that it worked fine.
To me it appears obvious there is a problem with the latest qt4 package. What do you think ?
There isn't any problem. With the latest qt4 package, you don't need to use the QTDIR variable anymore. Simply use the full path to the qt4 qmake (/usr/bin/qmake) instead of using $QTDIR/bin/qmake (which should be the case when using qt3).
Offline
Ok. This works fine :
source /etc/profile.d/qt4.sh
/usr/bin/qmake
make
This means the QT4 environment is usable.
I think I am starting to 'narrow' the problem : I have just installed HaiQ (a Qt4 editor) which allows me to specify obvious Qt4 parameters in menu Tools/Configuration :
General/
qmake -> /usr/bin/qmake
Environment/
Qt Include path -> /usr/include
QTDIR -> /usr
QMAKESPEC -> /usr/share/qt4/mkspecs/linux-g++
Now I can compile my own sources with haiQ. Still I cannot use kdevelop nor qdevelop since I did not find obvious options to specify the particular settings shown above. Both apps use default values which are not compliant with the new qt4 arch package. Who is to blame about that (this is a perfectly open question) ?
Anyway, does someone know how to configure kdevelop and qdevelop with those particular parameters ?
Offline
In QDevelop, go to Tools -> External Tools... to update the paths.
In KDevelop, the absolute paths for QMake and Designer will be asked when creating a new project.
Offline