-
-
Notifications
You must be signed in to change notification settings - Fork 773
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
xmake dev causes "Wrong descriptor" error #3138
Comments
It turns out that it is indeed related to the recent modifications. I have encountered similar problems with bat twice before and have tried to make some changes to fix it, but it seems that it cannot fully support all bat calls. If it is enabled after UpdateProcThreadAttribute, it seems that the root of the problem is processing stdin/stdout, but I am not sure how to handle it better.
|
If I pass all std handle to inherit them, it work. os.execv(program, argv, {stdout=os.tmpfile(), stderr=os.tmpfile(), stdin=infile}) But I pass partial std handles, it does not work. os.execv(program, argv, {stdout=os.tmpfile(), stderr=os.tmpfile()}) |
so this error could be caused by having a missing stderr handle? if stderr is missing can't be pass stdout again? |
I'm not sure how to set the missing stdxx handles. Both setting them to UpdateProcThreadAttribute and just setting them to StartupInfo.hStdxxx will have some issues. |
case1
it maybe cause invalid handle in build-artifacts ci when running gh case2
it maybe cause detect vs fails, call vcallvars.bat failed. case3 (now)
it wil fix case1 and case2, but it will cause your problem. (emcc.bat) |
If I revert this patch tboox/tbox@e64ac7f , case2/case3 will works fine, but case1 does not work. hmm..
https://github.com/xmake-mirror/build-artifacts/actions/runs/3627766237/jobs/6118046735 |
I have improved it. |
It's working for emcc.bat and cl.exe 👍 |
stdout does not work when call with |
Xmake Version
dev
Operating System Version and Architecture
Windows 11
Describe Bug
I was building a project using emscripten on Windows, updated to the latest xmake dev version (
xmake update dev
) and when I tried to build, I couldn't because of this error:I think it's related to the execution of .bat or something like that, I don't have this error when building a Windows application.
Expected Behavior
That it compiles.
Project Configuration
No response
Additional Information and Error Logs
Everything works fine with the current binary (2.7.3) and the latest script, after doing
The text was updated successfully, but these errors were encountered: