Invinite make loop when cross-compiling with subdirs project



  • I need to cross compile some applications for an ARM linux system (developer pc is windows 7).
    For this i use the LINARO GCC toolchain and the gnuwin32 make tool (linaro toolchain as no own make tool)
    Some of my applications depend on shared or static libs so i created a 'subdirs-project' to manage them.

    Main-Project.pro

    TEMPLATE = subdirs
    
    SUBDIRS = app1.pro \
              libs/libCommon.pro
    
    CONFIG += ordered
    
    app1.depends = libCommon
    

    Then i tried to compile.

    First thing what happed was that the make tool was started 2600 times (i only noticed it as my pc got very very slow)
    The QT Creator compile output shows me

    C:/Qt/Qt5.4.1/5.4/arm_linux/bin/qmake.exe -spec devices/linux-imx6-g++ CONFIG+=debug CONFIG+=qml_debug -o Makefile ..\..\..\Main-Project.pro
    C:\Program Files\Linaro\gcc-linaro-arm-linux-gnueabihf-4.7-2013.01\bin\arm-linux-gnueabihf-g++.exe
    ( test -e Makefile.app1 || C:\Qt\Qt5.4.1\5.4\arm_linux\bin\qmake.exe C:\Apps\Main-Project\app1.pro -spec devices/linux-imx6-g++ CONFIG+=debug CONFIG+=qml_debug -o Makefile.app1) && C:/Programme/gnu/utils/bin/make -f Makefile.app1
    make[1]: Entering directory `C:/Apps/Main-Project/build/debug/Main-Project-i_MX6_5_4_1-Debug'
    ( test -e Makefile.app1 || C:\Qt\Qt5.4.1\5.4\arm_linux\bin\qmake.exe C:\Apps\Main-Project\app1.pro -spec devices/linux-imx6-g++ CONFIG+=debug CONFIG+=qml_debug -o Makefile.app1) && C:/Programme/gnu/utils/bin/make -f Makefile.app1
    make[2]: Entering directory `C:/Apps/Main-Project/build/debug/Main-Project-i_MX6_5_4_1-Debug'
    ( test -e Makefile.app1|| C:\Qt\Qt5.4.1\5.4\arm_linux\bin\qmake.exe C:\Apps\Main-Project\app1.pro -spec devices/linux-imx6-g++ CONFIG+=debug CONFIG+=qml_debug -o Makefile.app1) && C:/Programme/gnu/utils/bin/make -f Makefile.app1
    ....
    

    First i thought the test command failed, so i removed it from the Makefile, but then i got another error

    ( C:\Qt\Qt5.4.1\5.4\arm_linux\bin\qmake.exe C:\Apps\Main-Project\app1.pro -spec devices/linux-imx6-g++ CONFIG+=debug CONFIG+=qml_debug -o Makefile.app1) && C:/Programme/gnu/utils/bin/make -f Makefile.app1
    /usr/bin/sh: C:QtQt5.4.15.4arm_linuxbinqmake.exe: command not found
    make: *** [sub-app1-pro-make_first-ordered] Error 127
    

    So it seems my make tool does not work with the windows path delimiter.
    If i change all \ in the Makefile to / than it works.
    Also if i call 'make -f Makefile.app1' it works (although there are windows path delimiter in it)

    Question one: Why is the make started again and again and again and..?
    Question two: What make tool can i use with windows which has no problems with the delimiter?

    My makefile for the subdirs-project (which is produced by qmake) looks like

    MAKEFILE      = Makefile
    
    first: make_first
    QMAKE         = C:\Qt\Qt5.4.1\5.4\arm_linux\bin\qmake.exe
    DEL_FILE      = rm -f
    CHK_DIR_EXISTS= test -d
    MKDIR         = mkdir -p
    COPY          = cp -f
    COPY_FILE     = cp -f
    COPY_DIR      = cp -f -R
    INSTALL_FILE  = install -m 644 -p
    INSTALL_PROGRAM = install -m 755 -p
    INSTALL_DIR   = $(COPY_DIR)
    DEL_FILE      = rm -f
    SYMLINK       = ln -f -s
    DEL_DIR       = rmdir
    MOVE          = mv -f
    TAR           = tar -cf
    COMPRESS      = gzip -9f
    DISTNAME      = Main-Project1.0.0
    DISTDIR = C:\Apps\Main-Project\.tmp\Main-Project1.0.0
    SUBTARGETS    =  \
    		sub-app1-pro \
    		sub-libs-libCommon-pro
    
    
    sub-app1-pro-qmake_all:  FORCE
    	$(QMAKE) C:\Apps\Main-Project\app1.pro -spec devices/linux-imx6-g++ CONFIG+=debug CONFIG+=qml_debug -o Makefile.app1
    	$(MAKE) -f Makefile.app1 qmake_all
    sub-app1-pro: FORCE
    	( test -e Makefile.app1 || $(QMAKE) C:\Apps\Main-Project\app1.pro -spec devices/linux-imx6-g++ CONFIG+=debug CONFIG+=qml_debug -o Makefile.app1) && $(MAKE) -f Makefile.app1
    sub-app1-pro-make_first-ordered: FORCE
    	( test -e Makefile.app1 || $(QMAKE) C:\Apps\Main-Project\app1.pro -spec devices/linux-imx6-g++ CONFIG+=debug CONFIG+=qml_debug -o Makefile.app1) && $(MAKE) -f Makefile.app1
    sub-app1-pro-make_first: FORCE
    	( test -e Makefile.app1 || $(QMAKE) C:\Apps\Main-Project\app1.pro -spec devices/linux-imx6-g++ CONFIG+=debug CONFIG+=qml_debug -o Makefile.app1) && $(MAKE) -f Makefile.app1
    sub-app1-pro-all-ordered: FORCE
    	( test -e Makefile.app1 || $(QMAKE) C:\Apps\Main-Project\app1.pro -spec devices/linux-imx6-g++ CONFIG+=debug CONFIG+=qml_debug -o Makefile.app1) && $(MAKE) -f Makefile.app1 all
    sub-app1-pro-all: FORCE
    	( test -e Makefile.app1 || $(QMAKE) C:\Apps\Main-Project\app1.pro -spec devices/linux-imx6-g++ CONFIG+=debug CONFIG+=qml_debug -o Makefile.app1) && $(MAKE) -f Makefile.app1 all
    ...
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.