Skip to content

The mono_marshal_ilgen_init symbol is private in libmonosgen-2.0.dylib #74628

Closed
@rolfbjarne

Description

@rolfbjarne

Description

In xamarin-macios, when the interpreter is enabled, we call mono_marshal_ilgen_init from the main method:

https://github.com/xamarin/xamarin-macios/blob/c55fbdfef95028ba03d0f7a35aebca03bd76f852/tools/common/Target.cs#L747

However, marshal-ilgen was recently made into a component, which looks like made this symbol private in libmonosgen-2.0.dylib:

$ nm dotnet-sdk-7.0.100-rc.1.22424.1/packs/Microsoft.NETCore.App.Runtime.Mono.maccatalyst-x64/7.0.0-rc.1.22423.4/runtimes/maccatalyst-x64/native/libmonosgen-2.0.dylib | g _mono_component_hot_reload_init
00000000002b4880 t _mono_component_hot_reload_init

This breaks the build for apps that have the interpreter enabled:

packs/Microsoft.MacCatalyst.Sdk/15.4.1010-rc.1/targets/Xamarin.Shared.Sdk.targets(1221,3): error : Undefined symbols for architecture x86_64: [/Users/rolf/work/maccore/net7.0/xamarin-macios/tests/dotnet/MySimpleApp/MacCatalyst/MySimpleApp.csproj]
packs/Microsoft.MacCatalyst.Sdk/15.4.1010-rc.1/targets/Xamarin.Shared.Sdk.targets(1221,3): error :   "_mono_marshal_ilgen_init", refere [/Users/rolf/work/maccore/net7.0/xamarin-macios/tests/dotnet/MySimpleApp/MacCatalyst/MySimpleApp.csproj]

Reproduction Steps

See description

Expected behavior

See description

Actual behavior

See description

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions