Bug 55097 - 2017-04 has Windows p/invokes without #if guards
Summary: 2017-04 has Windows p/invokes without #if guards
Status: VERIFIED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: master
Hardware: PC Mac OS
: High normal
Target Milestone: 15.3
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2017-04-12 15:34 UTC by Andi McClure
Modified: 2017-07-18 09:28 UTC (History)
3 users (show)

Tags: 2017-04
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:
VERIFIED FIXED

Description Andi McClure 2017-04-12 15:34:44 UTC
Failing on four iOS platforms

https://jenkins.mono-project.com/job/xamarin-macios-pr-builder/3505/testReport/(root)/iOSApiPInvokeTest/ApiPInvokeTest_Corlib/

                                                  14 errors found in 66 symbol lookups:
Could not find the symbol 'CoreLibNative_MemAlloc' in System.Private.CoreLib.Native
Could not find the symbol 'CoreLibNative_MemFree' in System.Private.CoreLib.Native
Could not find the symbol 'GetProcessHeap' in api-ms-win-core-heap-l1-1-0.dll
Could not find the symbol 'HeapAlloc' in api-ms-win-core-heap-l1-1-0.dll
Could not find the symbol 'HeapFree' in api-ms-win-core-heap-l1-1-0.dll
Could not find the symbol 'CreateThreadpoolIo' in api-ms-win-core-threadpool-l1-2-0.dll
Could not find the symbol 'CloseThreadpoolIo' in api-ms-win-core-threadpool-l1-2-0.dll
Could not find the symbol 'StartThreadpoolIo' in api-ms-win-core-threadpool-l1-2-0.dll
Could not find the symbol 'CancelThreadpoolIo' in api-ms-win-core-threadpool-l1-2-0.dll
Could not find the symbol 'FormatMessageW' in kernel32.dll
Could not find the symbol 'EnumDynamicTimeZoneInformation' in api-ms-win-core-timezone-l1-1-0.dll
Could not find the symbol 'GetDynamicTimeZoneInformation' in api-ms-win-core-timezone-l1-1-0.dll
Could not find the symbol 'GetDynamicTimeZoneInformationEffectiveYears' in api-ms-win-core-timezone-l1-1-0.dll
Could not find the symbol 'GetTimeZoneInformationForYear' in api-ms-win-core-timezone-l1-1-0.dll

Test was on mono-2017-04 branch of xamarin-macios, which at the moment is using mono 6bd84694a5a8b22b4b824017342252afa132cfe1

These p/invokes need #if MONOTOUCH-es. Also if they're failing with MONOTOUCH they're very likely also failing with MONODROID and ORBIS so it would be great if we could fix the monodroid and orbis platforms too.
Comment 1 Marek Safar 2017-04-18 09:53:51 UTC
Fixed in master and 2017-04
Comment 2 Alok Kulkarni 2017-07-13 07:08:49 UTC
Hi @Andi McClure, Will you please provide specific steps to verify this?
Comment 3 Andi McClure 2017-07-13 14:48:48 UTC
The consequence of this bug was that the iOS product could not build. Verify-fixed steps are "build xamarin iOS". If you can run xamarin iOS at all the bug was fixed.
Comment 4 Andi McClure 2017-07-13 18:55:34 UTC
I'm sorry, my previous comment was inaccurate. This was in the test phase, not the compile phase. The repro steps are to run the automated test iOSApiPInvokeTest.ApiPInvokeTest.Corlib, which is part of the iOS automated test suite