-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
The AOT compiler doesn't support a MONO_PATH with a colon #90422
Comments
Colon is the unix path separator. Maybe we can support a backslash escaped colon. |
Would that require changing Xamarin build to escape the paths?
@rolfbjarne Does that mean targeting Windows from Unix platforms (or other way)? As Zoltan said, ':' is the unix path separator, while ';' is the windows path separator. It is already implemented in that way, but may require changing the runtime/src/mono/CMakeLists.txt Lines 805 to 831 in 8323e58
As a quick fix, we may implement escaping the ':\' for windows targets only. |
Yes.
It means building an iOS project on a (remote) Mac using Windows.
This isn't happening when executing on Windows, it's when executing on Mac, so doing something for Windows only won't help us :) That said, I believe that adding an escaping mechanism would be the solution (while colon is the unix path separator, it's also a legal character in a file name). |
Another option would be adding a --path command line argument which would append to the path. |
PR to fix this is #90544 |
This is fixed, PR merged to 8.0\rc1. Closing this issue |
Description
We use MONO_PATH to point to the directory where all the assemblies are for the AOT compiler.
Unfortunately, the Mono allows for multiple paths in MONO_PATH, splitting them by colon:
runtime/src/mono/mono/metadata/assembly.c
Line 137 in 34b6db9
this means that we can't use the AOT compiler for a path with a colon in it.
Now why would that ever happen?
It happens when building remotely from Windows, and [Intermediate]OutputPath is set to a full (Windows) path. In that case, all the assemblies end up in a directory with a colon in it on the Mac: xamarin/xamarin-macios#14904.
This wasn't very common, because [Intermediate]OutputPath used to be relative paths. However, with the new artifacts output path in .NET 8, [Intermediate]OutputPath are both absolute paths.
Reproduction Steps
Expected behavior
No crash.
Actual behavior
Crash.
Binlog:
msbuild.binlog.zip
Regression?
No, but importance has increased due to unrelated changes making the scenario more frequent.
Known Workarounds
No response
Configuration
Other information
No response
The text was updated successfully, but these errors were encountered: