Bug 57826 - [mtouch] Symbol present in both assemblies using dlsym and assemblies not using dlsym
Summary: [mtouch] Symbol present in both assemblies using dlsym and assemblies not usi...
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: XI 10.12 (d15-3)
Hardware: PC Mac OS
: --- normal
Target Milestone: 15.4
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2017-06-28 10:53 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2017-06-28 14:33 UTC (History)
2 users (show)

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

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 Rolf Bjarne Kvinge [MSFT] 2017-06-28 10:53:41 UTC
[This is a spin-off from bug #57811]

The xamarin_start_wwan symbol is used in a P/Invoke in both Xamarin.iOS.dll and System.dll.

Xamarin.iOS.dll uses dlsym to call P/Invokes, while System.dll does not.

This confuses mtouch, and mtouch does not preserve the symbol when the executable is stripped, which prevents Xamarin.iOS.dll from calling the native function (System.dll still can though).
Comment 1 Rolf Bjarne Kvinge [MSFT] 2017-06-28 12:33:35 UTC
master: https://github.com/xamarin/xamarin-macios/pull/2260
Comment 2 Rolf Bjarne Kvinge [MSFT] 2017-06-28 12:34:53 UTC
There's a fairly trivial workaround: pass "--nosymbolstrip:<symbol>" as an additional mtouch argument.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2017-06-28 12:36:23 UTC
@Sebastien, this is a regression in 15.3, but since I believe this to be somewhat obscure, and in any case there's a trivial workaround (comment #2), I don't think we need to get this in 15.3. Does that sound good?
Comment 4 Sebastien Pouliot 2017-06-28 12:47:50 UTC
@rolf yes

Did this happen in 15.3 or earlier ? Please file the last known bold field with the data. Thanks!
Comment 5 Rolf Bjarne Kvinge [MSFT] 2017-06-28 14:33:10 UTC
This regressed here: https://github.com/xamarin/xamarin-macios/commit/d17cb6556a4cb4ae9fec59e5687518f4ac3dc460, which is include in 15.3 (but not 15.2).
Comment 6 Rolf Bjarne Kvinge [MSFT] 2017-06-28 14:33:45 UTC
Fixed (master): https://github.com/xamarin/xamarin-macios/commit/2fa55d410d6cf09fed7751069a2704881ba270b1