mingw32-make: [install_target] make (e=2): The system cannot find the file specified. (Windows 10, Android)



  • I used to be able to simply build an APK package with Qt Creator. But now with Qt 5.7.1 and Qt Creator 4.2 I get the following error:

    12:59:11: The process "D:\Qt\Tools\mingw530_32\bin\mingw32-make.exe" exited normally.
    12:59:11: Starting: "D:\Qt\Tools\mingw530_32\bin\mingw32-make.exe" "INSTALL_ROOT=C:/Users/furkanzmc/ProjectBuilds/Ekinoks/Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0/Debug/android-build" install
    cp -f libEkinoks.so C:/Users/furkanzmc/ProjectBuilds/Ekinoks/Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0/Debug/android-build/libs/armeabi-v7a/libEkinoks.so
    Makefile:841: recipe for target 'install_target' failed
    process_begin: CreateProcess(NULL, cp -f libEkinoks.so C:/Users/furkanzmc/ProjectBuilds/Ekinoks/Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0/Debug/android-build/libs/armeabi-v7a/libEkinoks.so, ...) failed.
    make (e=2): The system cannot find the file specified.
    
    mingw32-make: [install_target] Error 2 (ignored)
    

    cp -f command gives the following error on PowerShell

    Copy-Item : Parameter cannot be processed because the parameter name 'f' is ambiguous. Possible matches include: -Force
     -Filter.
    At line:1 char:4
    + cp -f
    +    ~~
        + CategoryInfo          : InvalidArgument: (:) [Copy-Item], ParameterBindingException
        + FullyQualifiedErrorId : AmbiguousParameter,Microsoft.PowerShell.Commands.CopyItemCommand
    

    So I think mingw32-make is calling the cp with wrong parameter. Is there a way for me to override that behaviour?
    A possible solution is disabling the make install step and manually copying the libEkinoks.so file to the target folder. I can also add a custom step to copy that file every time. But I still have to run make install. So it's not a real solution.



  • I don't think it tries to use PowerShell's cp, but it thinks that the Unix set of commands are available. This might give some ideas:
    http://stackoverflow.com/questions/28801754/qmake-generated-makefile-for-win32-g-platform-contains-unix-commands

    Of course, as the building worked before, this could be a bug in 5.7.1. I'd try 5.8 -- it is now at release candidate stage and should work pretty well.


  • Moderators

    @Furkanzmc Why do you use MinGW for Android?
    It looks like your Android Kit isn't configured properly.



  • Thanks @mvuori, that did solve my problem. Tuırns out I had SourceTree's local git in my PATH, removing that from PATH solved the issue.


Log in to reply
 

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