Bug 46479 - mkbundle broke and mlaunch does not longer compile.
Summary: mkbundle broke and mlaunch does not longer compile.
Status: RESOLVED FIXED
Alias: None
Product: Tools
Classification: Mono
Component: mkbundle ()
Version: 4.8.0 (C9)
Hardware: Macintosh Mac OS
: --- major
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-11-04 15:40 UTC by Manuel de la Peña [MSFT]
Modified: 2017-09-07 10:23 UTC (History)
11 users (show)

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

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 GitHub or Developer Community 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 Manuel de la Peña [MSFT] 2016-11-04 15:40:35 UTC
When trying to compile the iOS project you will get the following after the version Mono JIT compiler version 4.8.0 (mono-4.8.0-branch/e51aa0a Fri Oct 28 11:48:43 EDT 2016).

Gist: https://gist.github.com/mandel-macaque/383a4254d565df601730c40dacadf5dc

Looks like the issue  might be related to https://github.com/mono/mono/commit/244124e6170ba0325f82e6545e5fd2b7cc62a788
Comment 1 Vincent Dondain [MSFT] 2016-11-04 15:44:59 UTC
Had the same issue using Mono 4.8.0.305 (mono-4.8.0-branch/c7cb8e9) – Gist: https://gist.github.com/VincentDondain/689aaa473b4bef402c083b585b82b329
Comment 2 Rolf Bjarne Kvinge [MSFT] 2016-11-04 15:47:36 UTC
@Miguel, it looks like your mkbundle changes broke our mkbundle usage.
Comment 3 Miguel de Icaza [MSFT] 2016-11-04 17:41:48 UTC
Can someone run the command manually and get more details on why mkbundle is producing an error 1?

The changes on that commit affect mostly a codepath for the "--simple" setup, not the old legacy one.
Comment 4 Stephen Shaw 2016-11-09 19:43:28 UTC
ok, If I use:
https://github.com/mono/mono/commit/244124e6170ba0325f82e6545e5fd2b7cc62a788
I get the mkbundle error 1

(*** this is the previous commit ***)
https://github.com/mono/mono/commit/e51aa0a7043a8185e264d6332ac7bc1f8f87cd39
I get:

"/Users/sshaw/code/md-addins/Authenticator/Authenticator.csproj (default targets) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.Common.targets (_CompileToNative target) ->

	MMP: error MM5109: Native linking failed with error code 1.  Check build log for details."

 Which I thought was fixed with a change to BTLS (in master?)
Undefined symbols for architecture x86_64:
"_mono_btls_bio_flush", referenced from:

9f4abc - fails
085b65 - fails - https://github.com/mono/mono/commit/085b653a
a2ebdc - works 4.8.0.249 - last working build
4917a5 - works
a63e74 - works
8be6ec - works
1db906 - works

Not sure if this is helpful at all, but here it is :)
Comment 5 Manuel de la Peña [MSFT] 2016-11-10 18:25:19 UTC
I executed the command manually and had no issues as long as we do not use the exec in the script. I'm trying to debug this with mono --debug and gdb and I have not yet found the issue. 

When I ran the command with exec I get a 1 in $? while if I do not go via exec I get $?. I've got a feeling that mono is not the issue. Will get back here with more info ASAP.
Comment 6 Alexander Köplinger [MSFT] 2016-11-10 19:00:18 UTC
I ran into this a few days ago too while building maccore. mkbundle tries to lookup  the I18N assemblies and fails here: https://github.com/mono/mono/blob/d9fdda567d246386c7b9f6f994747a4c8458bd3b/mcs/tools/mkbundle/mkbundle.cs#L1106-L1107

Adding `--i18n none` fixed the problem for me.
Comment 7 Alan McGovern 2016-11-10 23:00:33 UTC
Ooh, good find! Can we fix the two places in that file which call `Environemnt.Exit` without providing a message to actually provide an actionable message?
Comment 8 Manuel de la Peña [MSFT] 2016-11-25 11:16:19 UTC
Hello, 

I  have tested the build with the following mono version:

MacBook-Pro:xamarin-macios mandel$ mono --version
Mono JIT compiler version 4.9.0 (master/60b660d Wed Oct 26 22:38:57 EDT 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com


And after the mono bump we did in maccore we do not longer have the issue. Will close the bug and will ask someone else in the team to double check what I found.
Comment 9 Alan McGovern 2016-11-25 11:37:48 UTC
it's not invalid - it was an issue that had to be patched. We should also address the two places where we call Environment.Exit(1) without actually printing an error message. One of those places is linked in comment 6.
Comment 10 Alexander Köplinger [MSFT] 2016-11-25 11:46:17 UTC
Opened https://github.com/mono/mono/pull/4024 for adding the error messages.
Comment 11 Manuel de la Peña [MSFT] 2016-11-30 18:09:14 UTC
Correct, the issue in master does not longer exist because we do not mkbundle anymore, so comment 6 is correct. Sorry for the misunderstanding.
Comment 12 Marek Safar 2017-09-07 10:23:59 UTC
Closing as the issues have been addressed