Closed james-allison closed 4 years ago
Can you please attach the csproj, or at least note what architectures you are building for?
This might be another flavor of issues when your code size is too large for 32-bit.
I've attached the .csproj and the response-file.rsp from the failed call to mtouch in the logs. The architecture is ARM64 only - so I'd assume not a 32bit issue. I'm attempting to build the iPhone Debug target, though the only configurations which currently work are those using the LLVM compiler - which prohibits use of the debugger.
After further investigation, this appears to have been caused by a change I'd made whilst the 16.6.0 VS Studio release had broken iOS builds - apologies for misleading description earlier, and assuming it was another new problem.
Including the following struct in a shared library prevents non LLVM builds completing on iOS, and causes the LLVM builds to take 6x longer.
Android builds didn't have an issue however.
[StructLayout(LayoutKind.Explicit)]
public unsafe struct DenoiseState
{
[FieldOffset(0)]
public fixed float analysis_mem[480];
[FieldOffset(1920)]
public fixed float cepstral_mem[176];
[FieldOffset(2624)]
public int memid;
[FieldOffset(2628)]
public fixed float synthesis_mem[480];
[FieldOffset(4548)]
public fixed float pitch_buf[1728];
[FieldOffset(11460)]
public fixed float pitch_enh_buf[1728];
[FieldOffset(18372)]
public float last_gain;
[FieldOffset(18376)]
public int last_period;
[FieldOffset(18380)]
public fixed float mem_hp_x[2];
[FieldOffset(18388)]
public fixed float lastg[22];
[FieldOffset(18476)]
public RNNState rnn;
};
public struct RNNState
{
}
This issue was moved to mono/mono#20149
@james-allison Thank you for providing more info! I've moved this issue over to mono/mono as it doesn't appear to be related to the SDK. You can follow https://github.com/mono/mono/issues/20149 for updates :)
Steps to Reproduce
Expected Behavior
Build completes and the world is good.
Actual Behavior
Only builds using the LLVM optimizing compiler succeed - (which means I can not debug my project on iOS). This used to build fine on Visual Studio 16.5.x - I think it broke (along with so many other things) switching to 16.6.x. I've tried upgrading the version of Xamarin.iOS.pkg on the mac to 13.20.1.18, but the error remains identical to the version that ships with 16.6.3 (13.18.2.1) Looking at the source for the assertion location in the mono repo (https://github.com/mono/mono/blob/master/mono/mini/memory-access.c) - it is preceded with the comment
/*FIXME arbitrary hack to avoid unbound code expansion.*/
- which doesn't fill me with confidence.Environment
Build Logs
murmur-ios.log
Example Project (If Possible)
Happy to share the obj/Debug folder for the build privately to allow you to reproduce - please get in touch.