-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Symbols required for AOT are private in libmonosgen-2.0.dylib #55000
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
@lambdageek @vargaz Can either one of you take a look and help us triage? |
@vargaz do these arguments make sense? I'm not sure if @rolfbjarne Do you also get problems if you're doing a fullaot build, or just interp-only? |
Those are declared using ICALL_EXTERN_C, the runtime probably needs to be built with |
Or direct-icalls needs to be dropped from the aot command line. |
Are there any tests in dotnet/runtime which run into this problem ? |
I think no, because we've been doing static linking in dotnet/runtime. I have a PR to switch to dynamic linking (#54241) but I didn't get far enough to finish it. I suspect it probably hits this issue. |
We're actually missing |
This is still an issue with
|
The PR above only fixes it for device builds, simulator builds need the same define. |
The problem is that those are jit icalls which are only marked with ICALL_EXTERN_C which doesn't actually export them. |
…ibmonosgen.so. Fixes dotnet#55000.
This is still a problem in Mac Catalyst and macOS (but not on iOS):
|
This isn't fully fixed yet - it's fixed for some symbols, but not others. I tested for
Testing for the first (
|
Maybe we should avoid using direct-icalls in non-static mode as a simpler fix. |
I can have a look and see if that works. |
Did it work out ? |
* [dotnet] Remove workaround for private symbols for AOT. * [tools] Make Application.AotArguments a list of string. This is just a simple refactoring to make Application.AotArguments a list of strings instead of a comma-separated list of values. * [tools] Only use direct-icalls when linking mono statically. Ref: dotnet/runtime#55000 * [mtouch] Fix aot arguments comparison. * [tests] Adjust mtouch test according to mtouch changes. * [tests] Add minimum OS version to the Mac Catalyst variation of the MySimpleApp test case.
Yes, it did, so this can be closed. |
Description
Mono's AOT compiler generates references to numerous functions in lib mono, but those functions are not public in libmonosgen-2.0.dylib, only libmonosgen-2.0.a.
Example for
mono_array_new_1
:The end result is that we can't link dynamically with libmonosgen-2.0.dylib when using the AOT compiler, we have to link with the static libmonosgen-2.0.a library.
Example native link failures:
Example binlog: msbuild.binlog.zip
The text was updated successfully, but these errors were encountered: