Skip to content
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

[Xcode10.2] XI unitests fail to build from bots with an error MTOUCH : error MT5106: Could not compile the file(s) #5512

Closed
GouriKumari opened this issue Jan 29, 2019 · 8 comments
Labels
bug If an issue is a bug or a pull request a bug fix iOS Issues affecting iOS
Milestone

Comments

@GouriKumari
Copy link
Contributor

Steps to Reproduce

  1. Update System to Xamarin.iOS, Xamarin.iOS
    Version: 12.4.0.15 (Visual Studio Community)
    Hash: 8a579bb and install Xcode10.2
  2. Build monotouch-test, donlink test or mini test

Expected Behavior

Tests Projects should build successfully

Actual Behavior

Failed to build with an error, MTOUCH : error MT5106: Could not compile the file(s) '/Users/xamarinqa/agent/_work/r1/a/xamarin-macios/tests/monotouch-test/obj/iPhone/Debug-unified/mtouch-cache/armv7/Xamarin.iOS.dll.s'. Please file a bug report at http://bugzilla.xamarin.com [/Users/xamarinqa/agent/_work/r1/a/xamarin-macios/tests/monotouch-test/monotouch-test.csproj]

Environment

Xamarin.iOS
Version: 12.4.0.15 (Visual Studio Community)
Hash: 8a579bbb

Build Logs

Build Log: http://xqa.blob.core.windows.net/gist/report-533d048480f24f6eb60d613792db0cf4.txt

Example Project (If Possible)

monotouch-test project from xamarin-macios/tests

Additional Info

This issue occurred only running from CI, I couldn't reproduce it locally.

@spouliot
Copy link
Contributor

That's because you use -nolink (Don't Link) on devices and you run into the 32bits native linker limit.

Are you using that same configuration locally ?

Was that same configuration working on XI 12.2 ?

@dalexsoto dalexsoto added bug If an issue is a bug or a pull request a bug fix iOS Issues affecting iOS labels Jan 30, 2019
@dalexsoto dalexsoto added this to the Future milestone Jan 30, 2019
@dalexsoto
Copy link
Member

I was able to reproduce this using dont link and targeting an iPhone 5 with iOS 10.3.3

Xamarin.iOS
Version: 12.4.0.0 (Visual Studio Enterprise)
Hash: b8b135fb
Branch: xcode10.2
Build date: 2019-01-29 21:38:11-0500

don't link build log
https://gist.github.com/dalexsoto/5d550608322f7da3aaac05f307a24463#file-dont-link-log

That said I was able to run monotouch-tests without issues: https://gist.githubusercontent.com/dalexsoto/5d550608322f7da3aaac05f307a24463/raw/86ea94194ef021c3c7ccf10946f2faace0572989/monotouch-test.log

@dalexsoto dalexsoto modified the milestones: Future, xcode10.2 Jan 30, 2019
@spouliot
Copy link
Contributor

@dalexsoto the default monotouch-tests has the linker enabled, otherwise it would be larger than don't link (and even more likely to hit the limit)

@GouriKumari
Copy link
Contributor Author

That's because you use -nolink (Don't Link) on devices and you run into the 32bits native linker limit.

Are you using that same configuration locally ?
I was checking with linksdk locally. But I couldn't reproduce it locally with dontlink enabled. It is happening only from CI for me.

Was that same configuration working on XI 12.2 ?
This is working with 12.2. I didn't see any build issues for 15.9 or 16.0.

@dalexsoto
Copy link
Member

@spouliot I can reproduce @GouriKumari findings, this does not happen if you try to build dont link for the iPhone 5 device using d15-9 + Xcode101.app.

BUT if you try to build dont link for the iPhone 5 using d15-9 + Xcode102-beta1.app you get the reported behavior as result (a bunch of error GDC116A36: can not encode offset 'xxxxxx' in resulting scattered relocation.).

@rolfbjarne
Copy link
Member

BUT if you try to build dont link for the iPhone 5 using d15-9 + Xcode102-beta1.app you get the reported behavior as result (a bunch of error GDC116A36: can not encode offset 'xxxxxx' in resulting scattered relocation.).

This is probably a good thing: my guess is that Xcode10.1 silently created broken native code that would just crash randomly at runtime.

@spouliot
Copy link
Contributor

spouliot commented Feb 1, 2019

it’s the same, old issue - and there’s nothing we can do
there’s a code size limit where this situation happens - and it’s not hard to hit without the linker
every new release grows Xamarin.iOS.dll so we keep eating the margin
and clang itself might produce larger/different code - again out of our control

dalexsoto added a commit that referenced this issue Feb 7, 2019
Our tests are currently failing when building for device + don't Link linker
configuration + armv7[1] so we modified said tests to do arm64 instead.

For more context see: #5512

[1]:

```
Xamarin.MTouch.Registrar(Dev,DontLink,Static,"") : Expected execution to succeed, but exit code was 1, and there were 1 error(s): build
	error MT5106: Could not compile the file(s) '/private/var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/mtouch.cache/u102nsmt.f5b/armv7/Xamarin.iOS.dll.s'. Please file a bug report at http://bugzilla.xamarin.com
at Xamarin.Tests.BundlerTool.AssertExecute (System.String message) [0x00095] in :0
at Xamarin.MTouchTool.AssertExecute (Xamarin.MTouchAction action, System.String message) [0x0000d] in :0
at Xamarin.MTouch.Registrar (Xamarin.Target target, Xamarin.Tests.LinkerOption linker, Xamarin.Tests.RegistrarOption registrar, System.String abi) [0x0005a] in :0
Xamarin.MTouch.Registrar(Dev,DontLink,Dynamic,"") : Expected execution to succeed, but exit code was 1, and there were 1 error(s): build
	error MT5106: Could not compile the file(s) '/private/var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/mtouch.cache/ma2r71ts.k3p/armv7/Xamarin.iOS.dll.s'. Please file a bug report at http://bugzilla.xamarin.com
at Xamarin.Tests.BundlerTool.AssertExecute (System.String message) [0x00095] in :0
at Xamarin.MTouchTool.AssertExecute (Xamarin.MTouchAction action, System.String message) [0x0000d] in :0
at Xamarin.MTouch.Registrar (Xamarin.Target target, Xamarin.Tests.LinkerOption linker, Xamarin.Tests.RegistrarOption registrar, System.String abi) [0x0005a] in :0
Xamarin.MTouch.TestCaseMismatchedAssemblyName : Expected execution to succeed, but exit code was 1, and there were 1 error(s): build: dontlink
	error MT5106: Could not compile the file(s) '/private/var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/mtouch.cache/2i0rdomc.jnq/armv7s/Xamarin.iOS.dll.s'. Please file a bug report at http://bugzilla.xamarin.com
at Xamarin.Tests.BundlerTool.AssertExecute (System.String message) [0x00095] in :0
at Xamarin.MTouchTool.AssertExecute (Xamarin.MTouchAction action, System.String message) [0x0000d] in :0
at Xamarin.MTouch.TestCaseMismatchedAssemblyName () [0x0021e] in :0
```
dalexsoto added a commit that referenced this issue Feb 7, 2019
Our tests are currently failing when building for device + don't Link linker
configuration + armv7[1] so we modified said tests to do arm64 instead.

For more context see: #5512

[1]:

```
Xamarin.MTouch.Registrar(Dev,DontLink,Static,"") : Expected execution to succeed, but exit code was 1, and there were 1 error(s): build
	error MT5106: Could not compile the file(s) '/private/var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/mtouch.cache/u102nsmt.f5b/armv7/Xamarin.iOS.dll.s'. Please file a bug report at http://bugzilla.xamarin.com
at Xamarin.Tests.BundlerTool.AssertExecute (System.String message) [0x00095] in :0
at Xamarin.MTouchTool.AssertExecute (Xamarin.MTouchAction action, System.String message) [0x0000d] in :0
at Xamarin.MTouch.Registrar (Xamarin.Target target, Xamarin.Tests.LinkerOption linker, Xamarin.Tests.RegistrarOption registrar, System.String abi) [0x0005a] in :0
Xamarin.MTouch.Registrar(Dev,DontLink,Dynamic,"") : Expected execution to succeed, but exit code was 1, and there were 1 error(s): build
	error MT5106: Could not compile the file(s) '/private/var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/mtouch.cache/ma2r71ts.k3p/armv7/Xamarin.iOS.dll.s'. Please file a bug report at http://bugzilla.xamarin.com
at Xamarin.Tests.BundlerTool.AssertExecute (System.String message) [0x00095] in :0
at Xamarin.MTouchTool.AssertExecute (Xamarin.MTouchAction action, System.String message) [0x0000d] in :0
at Xamarin.MTouch.Registrar (Xamarin.Target target, Xamarin.Tests.LinkerOption linker, Xamarin.Tests.RegistrarOption registrar, System.String abi) [0x0005a] in :0
Xamarin.MTouch.TestCaseMismatchedAssemblyName : Expected execution to succeed, but exit code was 1, and there were 1 error(s): build: dontlink
	error MT5106: Could not compile the file(s) '/private/var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/mtouch.cache/2i0rdomc.jnq/armv7s/Xamarin.iOS.dll.s'. Please file a bug report at http://bugzilla.xamarin.com
at Xamarin.Tests.BundlerTool.AssertExecute (System.String message) [0x00095] in :0
at Xamarin.MTouchTool.AssertExecute (Xamarin.MTouchAction action, System.String message) [0x0000d] in :0
at Xamarin.MTouch.TestCaseMismatchedAssemblyName () [0x0021e] in :0
```
dalexsoto added a commit that referenced this issue Feb 8, 2019
Fixes xamarin/maccore#1392

* [tests|mtouch] armv7 to arm64 in a couple of device build tests

Our tests are currently failing when building for device + don't Link linker
configuration + armv7[1] so we modified said tests to do arm64 instead.

For more context see: #5512

[1]:

```
Xamarin.MTouch.Registrar(Dev,DontLink,Static,"") : Expected execution to succeed, but exit code was 1, and there were 1 error(s): build
	error MT5106: Could not compile the file(s) '/private/var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/mtouch.cache/u102nsmt.f5b/armv7/Xamarin.iOS.dll.s'. Please file a bug report at http://bugzilla.xamarin.com
at Xamarin.Tests.BundlerTool.AssertExecute (System.String message) [0x00095] in :0
at Xamarin.MTouchTool.AssertExecute (Xamarin.MTouchAction action, System.String message) [0x0000d] in :0
at Xamarin.MTouch.Registrar (Xamarin.Target target, Xamarin.Tests.LinkerOption linker, Xamarin.Tests.RegistrarOption registrar, System.String abi) [0x0005a] in :0
Xamarin.MTouch.Registrar(Dev,DontLink,Dynamic,"") : Expected execution to succeed, but exit code was 1, and there were 1 error(s): build
	error MT5106: Could not compile the file(s) '/private/var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/mtouch.cache/ma2r71ts.k3p/armv7/Xamarin.iOS.dll.s'. Please file a bug report at http://bugzilla.xamarin.com
at Xamarin.Tests.BundlerTool.AssertExecute (System.String message) [0x00095] in :0
at Xamarin.MTouchTool.AssertExecute (Xamarin.MTouchAction action, System.String message) [0x0000d] in :0
at Xamarin.MTouch.Registrar (Xamarin.Target target, Xamarin.Tests.LinkerOption linker, Xamarin.Tests.RegistrarOption registrar, System.String abi) [0x0005a] in :0
Xamarin.MTouch.TestCaseMismatchedAssemblyName : Expected execution to succeed, but exit code was 1, and there were 1 error(s): build: dontlink
	error MT5106: Could not compile the file(s) '/private/var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/mtouch.cache/2i0rdomc.jnq/armv7s/Xamarin.iOS.dll.s'. Please file a bug report at http://bugzilla.xamarin.com
at Xamarin.Tests.BundlerTool.AssertExecute (System.String message) [0x00095] in :0
at Xamarin.MTouchTool.AssertExecute (Xamarin.MTouchAction action, System.String message) [0x0000d] in :0
at Xamarin.MTouch.TestCaseMismatchedAssemblyName () [0x0021e] in :0
```

* Fix indentation
@dalexsoto
Copy link
Member

Fixed in
41cd8e7

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug If an issue is a bug or a pull request a bug fix iOS Issues affecting iOS
Projects
None yet
Development

No branches or pull requests

4 participants