-
Notifications
You must be signed in to change notification settings - Fork 176
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
mbed compile not working in cygwin #299
Comments
@BlackstoneEngineering This is a very strange error, since it looks like it was able to compile a few source files before this particular file caused an issue. The stranger thing is, if you're compiling the blinky example, it shouldn't even try to compile that particular file since there's an Can you paste the full log of |
Will add to the documentation that cygwin is not supported at this time. PRs welcome! :) |
Right, here is the info on the cygpath tool for future reference: https://cygwin.com/cygwin-ug-net/cygpath.html . The problem seems to be the main processs in cygwin runs in cygwin env using POSIX paths, but all subprocesses get spun off into windows environments that need windows paths, thus a posix path is given to a windows path, which promptly blows up. The solution is
After discussing with @screamerbg we will not be supporting cygwin at this time, however it is a welcome PR feature update in the future. Low priority for the internal team, but more than welcome as a contribution. |
Now covered in the Troubleshooting section of mbed CLI documentation. |
You can sidestep the cygwin path issue by avoiding absolute paths. In mbed-os/tools/settings.py I set ROOT = ".." |
As an update to @mukymuk, the settings.py doesn't exist anymore. The relevant code is now contained in I just added |
This issue is closed. Should someone remove the "in progress" label? |
Problem
mbed compile does not work in cygwin. I believe this is due to it grabbing cygwin formatted paths and then calling the compiler in windows context. Thus it is passing linux formatted addresses to a tool that expects windows formatted addresses.
Solution
a) make a more universal call that doesnt pass in linux formatted paths
b) detect cygwin is running and call the cygwin path conversion tool on all addresses
c) grab the paths in a windows context instead of within the cygwin context.
Example
Running
mbed build
oncmd
works just fine, but if i run it in cygwin it returns the followingThe text was updated successfully, but these errors were encountered: