bugmake - Bugs: bug #41830, make cannot find an existing file


bug #41830: make cannot find an existing file

Submitted by:  Tim Lebedkov <nasf82309>
Submitted on:  Tue 11 Mar 2014 07:50:30 AM UTC  
Severity:  1 - Wish Item Group:  Enhancement
Status:  Duplicate Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  4.0 Operating System:  MS Windows
Fixed Release:  None Triage Status:  Major Effort

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Tue 11 Mar 2014 06:12:29 PM UTC, comment #2: 

Sorry, I see that I've misread the log.  The batch file failed because it invoked Make, and that recursive Make invocation failed.

Now the error message says:

mingw32-make[1]: *** No rule to make target '../../../../../../../NpackdSymlinks/com.nokia.QtDev-x86_64-w64-Npackd-Release-5.2.1/qtbase/mkspecs/modules-inst/qt_lib_multimediawidgets_private.pri', needed by 'Makefile'. Stop.

However, the directory where Make runs is this:

mingw32-make[1]: Entering directory 'C:/Users/t/projects/windows-package-manager.npackd-scripts/build-packages/QuaZIP-static-x86_64-w32-0.6.2/quazip'

If you append the target path to this directory, you get a file name that is 260 characters long, which is 1 character more than Windows allows (256 for file name plus 3 more for the drive letter, the colon, and the leading slash).  Yes, this is what Windows does: it first appends the relative file name to the current directory, and only after that normalizes the result.

So what you see is a fundamental limitation of the file-name APIs used by Make on Windows.  Fixing this would be a major effort.  See https://savannah.gnu.org/bugs/?40344 for a relevant discussion (this bug is actually a duplicate of that one).

Alternatively, you can work around this issue by simplifying your file names, or by using SUBST to create a drive letter that points to one of the directories involved in this problem.

Eli Zaretskii <eliz>
Project Member
Tue 11 Mar 2014 05:49:20 PM UTC, comment #1: 

Why did you decide that Make did not find the file?

My reading of the log is that Make invoked the recipe commands via a temporary batch file (because your commands included shell built-in commands like 'cd' and 'if'), and that batch file exited with exit code of 2:

Live child 00000000005a4540 (sub-quazip-make_first) PID 6123872
Reaping losing child 00000000005a4540 PID 6123872
Cleaning up temp batch file C:\Users\t\AppData\Local\Temp\make6544-2.bat
Makefile:39: recipe for target 'sub-quazip-make_first' failed
mingw32-make: *** [sub-quazip-make_first] Error 2

I don't see anything weird in the contents of the batch file, and don't know why the batch file failed, but the first thing I would try is creating exactly such a batch file in the directory where Make created it, and then invoking that batch file from the cmd prompt.  If that fails as well, then it's not a Make problem.

Eli Zaretskii <eliz>
Project Member
Tue 11 Mar 2014 07:50:30 AM UTC, original submission:  

the exact same Makefile works in C:\windows-package-manager.npackd-scripts\build-packages, but fails in C:\Users\t\projects\windows-package-manager.npackd-scripts\build-packages with the following error message:

cd quazip\ && ( if not exist Makefile C:\NpackdSymlinks\com.nokia.QtDev-x86_64-w64-Npackd-Release-5.2.1\qtbase\bin\qmake.exe C:\Users\t\projects\w
indows-package-manager.npackd-scripts\build-packages\QuaZIP-static-x86_64-w32-0.6.2\quazip\quazip.pro "CONFIG=staticlib release" INCLUDEPATH=C:\wi
ndows-package-manager.npackd-scripts\build-packages LIBS+=-LC:\windows-package-manager.npackd-scripts\build-packages -o Makefile ) && C:/ProgramFi
les/MinGW-w64_x86_64_SEH_POSIX_threads/bin/mingw32-make -f Makefile
mingw32-make[1]: Entering directory 'C:/Users/t/projects/windows-package-manager.npackd-scripts/build-packages/QuaZIP-static-x86_64-w32-0.6.2/quaz
mingw32-make[1]: *** No rule to make target '../../../../../../../NpackdSymlinks/com.nokia.QtDev-x86_64-w64-Npackd-Release-5.2.1/qtbase/mkspecs/mo
dules-inst/qt_lib_multimediawidgets_private.pri', needed by 'Makefile'.  Stop.
mingw32-make[1]: Leaving directory 'C:/Users/t/projects/windows-package-manager.npackd-scripts/build-packages/QuaZIP-static-x86_64-w32-0.6.2/quazi
Makefile:39: recipe for target 'sub-quazip-make_first' failed
mingw32-make: *** [sub-quazip-make_first] Error 2

The file ../../../../../../../NpackdSymlinks/com.nokia.QtDev-x86_64-w64-Npackd-Release-5.2.1/qtbase/mkspecs/modules-inst/qt_lib_multimediawidgets_private.pri exists. Its full path is C:\NpackdSymlinks/com.nokia.QtDev-x86_64-w64-Npackd-Release-5.2.1/qtbase/mkspecs/modules-inst/qt_lib_multimediawidgets_private.pri

Attached is the full output with the -d option. See especially the line 80816

Tim Lebedkov <nasf82309>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #30854:  make.out.txt.zip added by nasf82309 (224KiB - application/x-zip-compressed)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by eliz (Posted a comment)
  • -email is unavailable- added by nasf82309 (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-03-11 eliz Severity3 - Normal => 1 - Wish
        Item GroupBug => Enhancement
        StatusNone => Duplicate
        Open/ClosedOpen => Closed
        Triage StatusNone => Major Effort
    2014-03-11 nasf82309 Attached File- => Added make.out.txt.zip, #30854

    Back to the top

    Powered by Savane 3.5