-
-
Notifications
You must be signed in to change notification settings - Fork 784
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
msys2/mingw setenv and os.exec issue #3628
Comments
fix os.exec() call incorrect program from /mingw64/bin. e.g. python, .. because xmake is installed to /mingw64/bin/xmake, we install the xmake executable into a separate directory to ensure |
maybe #4658 |
So can |
I'm not sure if this is the cause of it yet, I need to do more testing to verify it and if it has indeed been fixed I can restore it. |
I tried it, it still does not work, so I cannot revert it. the current PATH PATH=C:\Users\wangrunqing\AppData\Local\.xmake\packages\p\python\3.11.8\c78c5a743ed7468ba683cd8a5ff50255\
bin;C:\Users\wangrunqing\AppData\Local\.xmake\packages\p\python\3.11.8\c78c5a743ed7468ba683cd8a5ff50
255\Scripts;C:\msys64\mingw64\bin;C:\msys64\usr\local\bin;C:\msys64\usr\bin;C:\Windows\System32;C:\W
indows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\msys64\usr\bin\site_p
erl;C:\msys64\usr\bin\vendor_perl;C:\msys64\usr\bin\core_perl when I call
we should get python 3.11.8
|
Xmake Version
2.7.8
Operating System Version and Architecture
windows/msys/mingw64
Describe Bug
I'm having a problem where when I run os.exec("python --version") on msys2/mingw64, CreateProcess will preferentially look for python from the /mingw64/bin directory and run it, even though I've set it to the path I specified via os.setenv.
Perhaps because xmake is installed to /mingw64/bin/xmake, CreateProcess always gives the highest priority to finding the process from /mingw64/bin (if it exists), rather than from the $PATH environment variable.
I don't know how to fix it. It affects xmake's installation of packages under mingw.
Maybe I can only modify the install script to install the xmake executable in another path and then wrap it with the /mingw64/bin/xmake shell script.
Expected Behavior
it works
Project Configuration
No response
Additional Information and Error Logs
No response
The text was updated successfully, but these errors were encountered: