Qmake generates a MakeFile wich a not ending loop
-
Hello,
I'm new at qt and i'm trying to develop an aplication to visualize opengl graphics. I'm developing with Ubuntu 11.10 and with the last version of qt available at ubuntu's software center. My project is a subdirs project where i have one project for the aplication and one project for a static library. If i do the qmake and make of each project separately everything works well. But if I do the qmake and make of the subdirs pro file, the make file generated when i do make enters in a infinite loop...
I execute:
qmake project.pro
make
and the infinite loop starts...I attach the pro files. Thank you for the help because I'm becoming crazy with this....
workspace/VisualApp/project.pro
@
TEMPLATE = subdirsCONFIG += ordered
SUBDIRS = ../LibMath
../VisualApp@
workspace/VisualApp/VisualApp.pro
@
include (../general.pro)TEMPLATE = app
LANGUAGE = C++
TARGET = Noctiluca3DSOURCES += src/main.cpp
src/MainWindow.cpp
src/View.cppHEADERS += include/MainWindow.h
include/View.hFORMS = ui/MainWindow.ui
#RESOURCES += images/main.qrc
CONFIG(debug, debug|release){
LIBS += -L../bin/debug -lMath
}CONFIG(release, debug|release){
LIBS += -L../bin/release -lMath
}
@workspace/generals.pro
@
#################################### CONFIG ############################################
#Añadimos las configuraciones que utilizaran la mayor parte de librerias
#Ver : (http://doc.qt.nokia.com/latest/qmake-project-files.html)#Mostrar todos los warnings
CONFIG += warn_on#Permite compilar el proyecto en modo debug y release
CONFIG += debug_and_release#La aplicacion necesita una consola
CONFIG += console#La aplicacion usara Qt
CONFIG += qt#Hay que definir que extensiones de qt no por defecto vendran
QT += opengl################################## DIRECTORIOS #########################################
#Directorio donde se guardan los ficheros ui_*.h
UI_DIR = ui_headers#En funcion de la configuracion se decide donde se almacenaram
CONFIG(debug, debug|release){
MOC_DIR = moc_debug
OBJECTS_DIR = obj_debug
RESOURCES_DIR = resources_debug
DESTDIR = ../bin/debug
}CONFIG(release, debug|release){
MOC_DIR = moc_release
OBJECTS_DIR = obj_release
RESOURCES_DIR = resources_release
DESTDIR = ../bin/release
}#Añadimos las rutas donde buscara el compilador para buscar cabezeras
INCLUDEPATH+= include ui ui_headers ../#Indica a qmake donde tiene que buscar dependencias, de esta manera si modificamos un .h
#los .cpp que dependan de el seran recompilados
DEPENDPATH += include ui src ../########################################################################################
Estructura de fichero de proyecto
project.pro
TEMPLATE = subdirs
CONFIG +=ordered debug_and_release
SUBDIRS += Libreria1 \
...
@
workspace/LibMath/LibMath.pro
@
include (../general.pro)TEMPLATE = lib
LANGUAGE = C++
TARGET = Math
CONFIG += staticSOURCES += src/Point3D.cpp
src/Vector3D.cpp
src/Matrix4x4.cppHEADERS += include/Point3D.h
include/Vector3D.h
include/Matrix4x4.h
@ -
At first glance, general.pro should be general.pri (it's a project include and not a self-contained project file). Anyway, what do you mean by infinite loop? does it never stop building? does it just run forever without any output?
-
imanol@imanol-MacBookPro:~/workspace/Noctiluca3D/VisualApp$ qmake -r project.pro
Reading /home/imanol/workspace/Noctiluca3D/LibMath/LibMath.pro
Reading /home/imanol/workspace/Noctiluca3D/VisualApp/VisualApp.pro
imanol@imanol-MacBookPro:~/workspace/Noctiluca3D/VisualApp$ make
cd ../LibMath/ && make -f Makefile
make[1]: Entering directory/home/imanol/workspace/Noctiluca3D/LibMath' make -f Makefile.Release make[2]: Entering directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[2]: Nothing to be done forfirst'. make[2]: Leaving directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[1]: Leaving directory/home/imanol/workspace/Noctiluca3D/LibMath' cd ../VisualApp/ && make -f Makefile make[1]: Entering directory
/home/imanol/workspace/Noctiluca3D/VisualApp'
cd ../LibMath/ && make -f Makefile
make[2]: Entering directory/home/imanol/workspace/Noctiluca3D/LibMath' make -f Makefile.Release make[3]: Entering directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[3]: Nothing to be done forfirst'. make[3]: Leaving directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[2]: Leaving directory/home/imanol/workspace/Noctiluca3D/LibMath' cd ../VisualApp/ && make -f Makefile make[2]: Entering directory
/home/imanol/workspace/Noctiluca3D/VisualApp'
cd ../LibMath/ && make -f Makefile
make[3]: Entering directory/home/imanol/workspace/Noctiluca3D/LibMath' make -f Makefile.Release make[4]: Entering directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[4]: Nothing to be done forfirst'. make[4]: Leaving directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[3]: Leaving directory/home/imanol/workspace/Noctiluca3D/LibMath' cd ../VisualApp/ && make -f Makefile make[3]: Entering directory
/home/imanol/workspace/Noctiluca3D/VisualApp'
cd ../LibMath/ && make -f Makefile
make[4]: Entering directory/home/imanol/workspace/Noctiluca3D/LibMath' make -f Makefile.Release make[5]: Entering directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[5]: Nothing to be done forfirst'. make[5]: Leaving directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[4]: Leaving directory/home/imanol/workspace/Noctiluca3D/LibMath' cd ../VisualApp/ && make -f Makefile make[4]: Entering directory
/home/imanol/workspace/Noctiluca3D/VisualApp'
cd ../LibMath/ && make -f Makefile
make[5]: Entering directory/home/imanol/workspace/Noctiluca3D/LibMath' make -f Makefile.Release make[6]: Entering directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[6]: Nothing to be done forfirst'. make[6]: Leaving directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[5]: Leaving directory/home/imanol/workspace/Noctiluca3D/LibMath' cd ../VisualApp/ && make -f Makefile make[5]: Entering directory
/home/imanol/workspace/Noctiluca3D/VisualApp'
cd ../LibMath/ && make -f Makefile
make[6]: Entering directory/home/imanol/workspace/Noctiluca3D/LibMath' make -f Makefile.Release make[7]: Entering directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[7]: Nothing to be done forfirst'. make[7]: Leaving directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[6]: Leaving directory/home/imanol/workspace/Noctiluca3D/LibMath' cd ../VisualApp/ && make -f Makefile make[6]: Entering directory
/home/imanol/workspace/Noctiluca3D/VisualApp'
cd ../LibMath/ && make -f Makefile
make[7]: Entering directory/home/imanol/workspace/Noctiluca3D/LibMath' make -f Makefile.Release make[8]: Entering directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[8]: Nothing to be done forfirst'. make[8]: Leaving directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[7]: Leaving directory/home/imanol/workspace/Noctiluca3D/LibMath' cd ../VisualApp/ && make -f Makefile make[7]: Entering directory
/home/imanol/workspace/Noctiluca3D/VisualApp'
cd ../LibMath/ && make -f Makefile
make[8]: Entering directory/home/imanol/workspace/Noctiluca3D/LibMath' make -f Makefile.Release make[9]: Entering directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[9]: Nothing to be done forfirst'. make[9]: Leaving directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[8]: Leaving directory/home/imanol/workspace/Noctiluca3D/LibMath' cd ../VisualApp/ && make -f Makefile make[8]: Entering directory
/home/imanol/workspace/Noctiluca3D/VisualApp'
cd ../LibMath/ && make -f Makefile
make[9]: Entering directory/home/imanol/workspace/Noctiluca3D/LibMath' make -f Makefile.Release make[10]: Entering directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[10]: Nothing to be done forfirst'. make[10]: Leaving directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[9]: Leaving directory/home/imanol/workspace/Noctiluca3D/LibMath' cd ../VisualApp/ && make -f Makefile make[9]: Entering directory
/home/imanol/workspace/Noctiluca3D/VisualApp'
cd ../LibMath/ && make -f Makefile -
make[10]: Entering directory
/home/imanol/workspace/Noctiluca3D/LibMath' make -f Makefile.Release make[11]: Entering directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[11]: Nothing to be done forfirst'. make[11]: Leaving directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[10]: Leaving directory/home/imanol/workspace/Noctiluca3D/LibMath' cd ../VisualApp/ && make -f Makefile make[10]: Entering directory
/home/imanol/workspace/Noctiluca3D/VisualApp'
cd ../LibMath/ && make -f Makefile
make[11]: Entering directory/home/imanol/workspace/Noctiluca3D/LibMath' make -f Makefile.Release make[12]: Entering directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[12]: Nothing to be done forfirst'. make[12]: Leaving directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[11]: Leaving directory/home/imanol/workspace/Noctiluca3D/LibMath' cd ../VisualApp/ && make -f Makefile make[11]: Entering directory
/home/imanol/workspace/Noctiluca3D/VisualApp'
cd ../LibMath/ && make -f Makefile
make[12]: Entering directory/home/imanol/workspace/Noctiluca3D/LibMath' make -f Makefile.Release make[13]: Entering directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[13]: Nothing to be done forfirst'. make[13]: Leaving directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[12]: Leaving directory/home/imanol/workspace/Noctiluca3D/LibMath' cd ../VisualApp/ && make -f Makefile make[12]: Entering directory
/home/imanol/workspace/Noctiluca3D/VisualApp'
cd ../LibMath/ && make -f Makefile
make[13]: Entering directory/home/imanol/workspace/Noctiluca3D/LibMath' make -f Makefile.Release make[14]: Entering directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[14]: Nothing to be done forfirst'. make[14]: Leaving directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[13]: Leaving directory/home/imanol/workspace/Noctiluca3D/LibMath' cd ../VisualApp/ && make -f Makefile make[13]: Entering directory
/home/imanol/workspace/Noctiluca3D/VisualApp'
cd ../LibMath/ && make -f Makefile
make[14]: Entering directory/home/imanol/workspace/Noctiluca3D/LibMath' make -f Makefile.Release make[15]: Entering directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[15]: Nothing to be done forfirst'. make[15]: Leaving directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[14]: Leaving directory/home/imanol/workspace/Noctiluca3D/LibMath' cd ../VisualApp/ && make -f Makefile make[14]: Entering directory
/home/imanol/workspace/Noctiluca3D/VisualApp'
cd ../LibMath/ && make -f Makefile
make[15]: Entering directory/home/imanol/workspace/Noctiluca3D/LibMath' make -f Makefile.Release make[16]: Entering directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[16]: Nothing to be done forfirst'. make[16]: Leaving directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[15]: Leaving directory/home/imanol/workspace/Noctiluca3D/LibMath' cd ../VisualApp/ && make -f Makefile make[15]: Entering directory
/home/imanol/workspace/Noctiluca3D/VisualApp'
cd ../LibMath/ && make -f Makefile
make[16]: Entering directory/home/imanol/workspace/Noctiluca3D/LibMath' make -f Makefile.Release make[17]: Entering directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[17]: Nothing to be done forfirst'. make[17]: Leaving directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[16]: Leaving directory/home/imanol/workspace/Noctiluca3D/LibMath' cd ../VisualApp/ && make -f Makefile make[16]: Entering directory
/home/imanol/workspace/Noctiluca3D/VisualApp'
cd ../LibMath/ && make -f Makefile
make[17]: Entering directory/home/imanol/workspace/Noctiluca3D/LibMath' make -f Makefile.Release make[18]: Entering directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[18]: Nothing to be done forfirst'. make[18]: Leaving directory
/home/imanol/workspace/Noctiluca3D/LibMath'
make[17]: Leaving directory `/home/imanol/workspace/Noctiluca3D/LibMath'
cd ../VisualApp/ && make -f Makefile
^Cmake[16]: *** wait: No hi ha cap procés fill. Stop.
make[16]: *** Waiting for unfinished jobs....
make[16]: *** wait: No hi ha cap procés fill. Stop.
make[15]: *** [sub----VisualApp-make_default-ordered] Interromput
make[14]: *** [sub----VisualApp-make_default-ordered] Interromput
make[13]: *** [sub----VisualApp-make_default-ordered] Interromput
make[12]: *** [sub----VisualApp-make_default-ordered] Interromput
make[11]: *** [sub----VisualApp-make_default-ordered] Interromput
make[10]: *** [sub----VisualApp-make_default-ordered] Interromput
make[9]: *** [sub----VisualApp-make_default-ordered] Interromput
make[8]: *** [sub----VisualApp-make_default-ordered] Interromput
make[7]: *** [sub----VisualApp-make_default-ordered] Interromput
make[6]: *** [sub----VisualApp-make_default-ordered] Interromput
make[5]: *** [sub----VisualApp-make_default-ordered] Interromput
make[4]: *** [sub----VisualApp-make_default-ordered] Interromput
make[3]: *** [sub----VisualApp-make_default-ordered] Interromput
make[2]: *** [sub----VisualApp-make_default-ordered] Interromput
make[1]: *** [sub----VisualApp-make_default-ordered] Interromput
make: *** [sub----VisualApp-make_default-ordered] Interromput -
bq. From "qmake docs":/doc/qt-4.8/qmake-project-files.html"
When the subdirs template is used, qmake generates a Makefile to examine each specified subdirectory, process any project file it finds there, and run the platform's make tool on the newly-created Makefile. The SUBDIRS variable is used to contain a list of all the subdirectories to be processed.So you have
workspace/VisualApp/project.pro
workspace/VisualApp/VisualApp.proproject.pro includes workspace/VisualApp into the SUBDIRS variable and both .pro files are processed. Looks like the perfect endless recursion to me.
-
qmake does not keep track of state so it soon ruins filenames or make instructions. I compiled using scons and msys make to get zxing compiled. qmake then broke zxing compile with Version.h in 2 different folders clashing and saying multiple definitions. I am going to try and write a plugin to correct this.