Bug 164 - Error 134 reported when compiling with LLVM enabled
Summary: Error 134 reported when compiling with LLVM enabled
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: 4.x
Hardware: Macintosh Mac OS
: --- critical
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2011-08-03 14:43 UTC by scott
Modified: 2011-08-23 18:14 UTC (History)
6 users (show)

Tags: llvm compiler
Is this bug a regression?: ---
Last known good build:


Attachments
Full output from compiler that shows 134 error. (83.37 KB, text/plain)
2011-08-03 14:43 UTC, scott
Details
NewtonSoft json DLL (268.00 KB, application/x-msdownload)
2011-08-04 16:55 UTC, scott
Details
Looking to see if private option is available. (654.04 KB, image/png)
2011-08-15 17:35 UTC, scott
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description scott 2011-08-03 14:43:33 UTC
Created attachment 59 [details]
Full output from compiler that shows 134 error.

I receive an error 134 when compiling with LLVM enabled (release/iPhone.)  Attached is the complete compiler output.  Below is my additional compiler arguments:  -v -v -v -aot="nimt-trampolines=2048" -v -v -v
Comment 1 Sebastien Pouliot 2011-08-03 16:42:44 UTC
Likely duplicate of bug #144 which also return 134.
Comment 2 Sebastien Pouliot 2011-08-03 21:10:44 UTC
Does your build fails if you turn off linking ? i.e. "Don't link" in Linker Options

If so then it could be a duplicate* of bug #144 (fixed) - otherwise it can be another issue sharing the same error code, like:
http://ios.xamarin.com/Documentation/Troubleshoot#Error_134.3a_mtouch_failed_with_the_following_message.3a

* even if the workaround from #144 works I cannot be 100% certain the solution is identical without compiling your solution.
Comment 3 scott 2011-08-04 11:57:20 UTC
My build fails with "don't link" and with "link sdk" and with "link all assemblies", if LLVM is enabled.   Adding -nosymbolstrip did not change the behavior.  Anything else I should try?
Comment 4 Sebastien Pouliot 2011-08-04 16:01:20 UTC
Googling on Newtonsoft.Json.MonoTouch.dll returned my this link:
http://lists.ximian.com/pipermail/monotouch/2011-February/002658.html

If you're using the same version (as above) or that your assembly still reference System.Reflection.Emit (after the linking process*) then this could be (related to) the error.

* if the linker can eliminate it (that would require using "Link all assemblies") then it should not be an issue anymore.

Can you attach your Newtonsoft.Json.MonoTouch.dll (to make sure I'll be testing the same binary as yours) to this bug report ? Thanks
Comment 5 scott 2011-08-04 16:55:53 UTC
Created attachment 69 [details]
NewtonSoft json DLL
Comment 6 scott 2011-08-04 16:58:18 UTC
Thank you much - I've attached my Newtonsoft.Json.MonoTouch.dll.    I tried compiling with "link all assemblies" and still get the error.
Comment 7 Sebastien Pouliot 2011-08-04 17:36:33 UTC
I cannot duplicate this with the following commands. That _should_ be identical to what you're doing (without linking) as it will use monotouch assemblies to resolve (including using the SRE-less mscorlib.dll). 
 

imac:src sebastienpouliot$ mkdir tmp
imac:src sebastienpouliot$ cd tmp
imac:tmp sebastienpouliot$ cp /Developer/MonoTouch/usr/lib/mono/2.1/*.dll .imac:tmp sebastienpouliot$ cp mscorlib-runtime.dll mscorlib.dll 
imac:tmp sebastienpouliot$ MONO_PATH=. /Developer/MonoTouch/usr/bin/arm-darwin-mono --llvm --aot=mtriple=thumbv7-darwin,nimt-trampolines=2048,full,static,asmonly,nodebug,llvm-path=/Developer/MonoTouch/LLVM/bin/,outfile=Newtonsoft.Json.MonoTouch.dll.7.s ~/Downloads/Newtonsoft.Json.MonoTouch.dll


Mono Ahead of Time compiler - compiling assembly /Users/sebastienpouliot/Downloads/Newtonsoft.Json.MonoTouch.dll
Executing opt: /Developer/MonoTouch/LLVM/bin/opt -f -simplifycfg -domtree -domfrontier -scalarrepl -instcombine -simplifycfg -basiccg -prune-eh -inline -functionattrs -domtree -domfrontier -scalarrepl -simplify-libcalls -instcombine -simplifycfg -instcombine -simplifycfg -reassociate -domtree -loops -loopsimplify -domfrontier -loopsimplify -lcssa -loop-rotate -licm -lcssa -loop-unswitch -instcombine -scalar-evolution -loopsimplify -lcssa -iv-users -indvars -loop-deletion -loopsimplify -lcssa -loop-unroll -instcombine -memdep -gvn -memdep -memcpyopt -sccp -instcombine -domtree -memdep -dse -adce -simplifycfg -preverify -domtree -verify -o Newtonsoft.Json.MonoTouch.dll.7.s.opt.bc Newtonsoft.Json.MonoTouch.dll.7.s.bc
Executing llc: /Developer/MonoTouch/LLVM/bin/llc -mattr=+v6 -asm-verbose=false -mtriple=thumbv7-darwin -relocation-model=static -unwind-tables -disable-gnu-eh-frame -enable-mono-eh-frame -o Newtonsoft.Json.MonoTouch.dll.7.s Newtonsoft.Json.MonoTouch.dll.7.s.opt.bc
Code: 58112 Info: 16430 Ex Info: 23551 Unwind Info: 1112 Class Info: 8170 PLT: 2156 GOT Info: 62465 GOT: 13720 Offsets: 33093
Output file: 'Newtonsoft.Json.MonoTouch.dll.7.s'.
Linking symbol: '_mono_aot_module_Newtonsoft_Json_MonoTouch_info'.
Compiled 3765 out of 3765 methods (100%)
Methods compiled with LLVM: 3604 (95%)
Methods without GOT slots: 2245 (59%)
Direct calls: 67 (46%)
JIT time: 548 ms, Generation time: 7450 ms, Assembly+Link time: 0 ms.
Comment 8 scott 2011-08-04 17:48:13 UTC
OK.  Is there anything additional I can tell you (or give you) concerning my project that would make it different?
Comment 9 Sebastien Pouliot 2011-08-04 17:55:06 UTC
There has been a few other issues present in 4.0.4.1 that are fixed in 'master' (and will be part of 4.1). But to be 100% sure (about the way I tested) I'll ask Zoltan (when he's back online) for feedback.

Other than that the only thing I can do is to build your solution myself and either:
(a) confirm that it works with the most recent code (i.e. will work in 4.1); or
(b) confirm the bug (if I can't build it)
Comment 10 scott 2011-08-04 17:57:44 UTC
Is there a private channel I could use to send that to you, and when do you expect 4.1 would be available for external use ?
Comment 11 Sebastien Pouliot 2011-08-04 22:45:37 UTC
Bug reports (or comments/attachement) can be made private (at least I can see those options, I assume everyone can do such, if not please let me know). Once marked 'private' they will be only visible to xamarin's people.

You can also send things as email attachement - but the former is easier if we need to share the data between employees.

I'm not sure exactly when 4.1 will be released (we're working hard to solve as many bugs as possible :-) but iirc Miguel said it would hit the "alpha" channel soon.
Comment 12 brian 2011-08-09 02:50:53 UTC
FWIW we are experiencing the same issue (mtouch failed with no output and 134 error w/ newtonsoft json assembly); it appears to be a regression in the latest release of monotouch. Same code compiled successfully with LLVM enabled prior to the Xamarin release of monotouch. Happy to offer any other help.
Comment 13 Sebastien Pouliot 2011-08-09 08:04:37 UTC
Brian, you can try to duplicate what I did on comment #7 and tell me if you get the same results (as me) or the same error you have when building from MD. Otherwise see comment #11, i.e. attach a self-contained test case.
Comment 14 scott 2011-08-15 17:35:44 UTC
Created attachment 132 [details]
Looking to see if private option is available.

Looking to see if private option is available.
Comment 16 Admin 2011-08-16 09:40:28 UTC
Scott, could you check if you can see the "Make comment private" checkbox now, and if it works for you?
Comment 18 Sebastien Pouliot 2011-08-16 13:24:37 UTC
After editing the project to use my own certificate the build ends with:

Executing: /Users/sebastienpouliot/src/LSiOS/LSMobileNative/iOS/LSiOS/bash -v AfterReleaseBuild.sh

---------------------- Done ----------------------

Build: 0 errors, 17 warnings
Custom command executable not exist
Custom command executable not exist
Custom command executable not exist


which is because I do not have your custom scripts but, afaik, this is way after the crash you're experiencing. I _believe_ the bug to be fixed (since I never could reproduce it) and I hope you'll be able to confirm this once MonoTouch 4.1 is released in our beta channel.
Comment 20 scott 2011-08-23 18:09:05 UTC
I can confirm that our build now works with MonoTouch 4.1 beta.  Thanks!
Comment 21 Sebastien Pouliot 2011-08-23 18:14:33 UTC
Glad to hear (read) this :-)
Thanks for your "test" case!