[SOLVED][Mac][Qt5.2] Error: Circular dependency dropped.



  • Could you please help me with following issue?

    There is some small project (it's only test project for more good visibility, real project is more difficult):
    @QT =
    TEMPLATE = aux
    TARGET = installer

    win32{
    QMAKE_POST_LINK += $$quote($${QMAKE_COPY} "C:\Users\ruslan\Projects\TestProject\test_unit.exe" "C:\Users\ruslan\Projects\TestProject\bin")$$escape_expand(\n\t)
    }else:macx{
    QMAKE_POST_LINK += $$quote($${QMAKE_COPY} "/Users/ruslan/Documents/TestProject/test_unit" "/Users/ruslan/Documents/TestProject/bin")$$escape_expand(\n\t)
    }

    installer.commands = $$QMAKE_POST_LINK
    QMAKE_EXTRA_TARGETS += installer
    PRE_TARGETDEPS = installer@

    During building the error is occurred:
    error: Circular installer <- installer dependency dropped.

    What does it mean?

    PS: compile output:
    @
    16:50:00: Running steps for project DesktopClient...
    16:50:00: Starting: "/usr/local/Qt-5.2.1/bin/qmake" /Users/ruslan/Documents/PWF/DesktopClient/branches/Qt5.2_migration/installer/installer.pro -r -spec macx-clang CONFIG+=x86_64
    16:50:00: The process "/usr/local/Qt-5.2.1/bin/qmake" exited normally.
    16:50:00: Starting: "/usr/bin/make"
    Makefile:354: warning: overriding commands for target installer' Makefile:174: warning: ignoring old commands for targetinstaller'
    cp -f "/Users/ruslan/Documents/TestProject/test_unit" "/Users/ruslan/Documents/TestProject/bin"
    make: Circular installer <- installer dependency dropped.
    16:50:00: The process "/usr/bin/make" exited normally.
    16:50:00: Elapsed time: 00:00.
    @



  • These two lines generate a circular dependency
    @
    TARGET = installer
    PRE_TARGETDEPS = installer
    @

    In Makefile it looks like below
    @
    ...
    TARGET = installer
    ...
    $(TARGET): installer $(OBJECTS)
    ...
    @

    As a result the TARGET depends on itself.



  • Thank you very much!
    It has helped me.
    I thought that lines:
    @installer.commands = $$QMAKE_POST_LINK
    QMAKE_EXTRA_TARGETS += installer
    PRE_TARGETDEPS = installer@
    they are related to the project "installer". I mean that I add commands to the "installer" and I add installer to the "targets".
    But I can to do following:
    @
    TARGET = installer

    #install is separate variable
    install.commands = $$QMAKE_POST_LINK
    QMAKE_EXTRA_TARGETS += install
    PRE_TARGETDEPS = install
    @


Log in to reply
 

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