-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad file descsriptor in building with make
in w64devkit on Windows 11
#107
Comments
This is actually a known CreateProcess limitation, paths with spaces needs to be quoted. |
I see it's hung up on a "$(shell ...)" in the Makefile. This should mostly
work even if the tools or your working directory contains spaces. If I put
both w64devkit and llama.cpp under paths with spaces, including different
drives like you showed, it works for me, and I'm unable to reproduce the
issue.
It's curious that the first argument to CreateProcess is populated. Make
normally leaves it null when starting sh.exe. That suggests it's picking
up something from your environment ($SHELL, etc.), or gets confused when
searching $PATH. However, nothing I try reproduces the issue. There must
be something in your environment triggering path-with-spaces bugs in GNU
Make.
As a kind of "strace" I ran make under gdb with dprintfs in kernel32.dll
(note: requires first starting once in order to load the DLL symbols):
(gdb) set new-console
(gdb) dprintf KERNEL32!CreateProcessA,"1=%s\n",$rcx
(gdb) dprintf KERNEL32!CreateProcessA,"2=%s\n",$rdx
(gdb) dprintf KERNEL32!SearchPathA,"fname=%s\n",$rdx
In my own experiments, and shown in your output, the command line string
is wrong, which is a Make bug. The executable path isn't quoted, making it
ambiguous, invoking CreateProcess magic following a documented process
that usually fixes it.
The SearchPathA argument also reveals Make is confused about $PATH and
searches for the wrong file names — another Make bug. I thought maybe if
you had something at "C:/Users/Asus" it would throw off that search, but
when I tried it myself I couldn't cause a build issue.
|
Can you suggest a way to log things better for debugging and reproducing the issue? Also there's no path as |
@VIS-WA Could you try 1.19.0 version. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was trying to compile
llama.cpp
on a Windows 11 laptop with the instructions provided here. However, while usingmake
inw64devkit
console for building in directories containing spaces in their names, themake
command fails with the following error:In the above, the folders where
w64devkit
and thellama.cpp
are located are different, and both the directory locations have spaces (i.eZ:/Lab Work/llama.cpp
andC:/Users/Asus pc/Downloads
). I was able to build succesfully by placing the files in different folders named without spaces; however, I feel the need to support spaces in directory names is essential for a more flexible workflow.I am raising this as an issue on both the repos (
llama.cpp
andwdevkit64
) to both notify other users and the repo maintainers. Apologies for any typos.Thanks
The text was updated successfully, but these errors were encountered: