Bug 46521 - Linker error when building AWSSDK
Summary: Linker error when building AWSSDK
Alias: None
Product: Android
Classification: Xamarin
Component: Linker ()
Version: 7.1 (C9)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Radek Doulik
Depends on:
Reported: 2016-11-04 23:47 UTC by Stan H
Modified: 2017-10-04 16:48 UTC (History)
4 users (show)

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 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:

Description Stan H 2016-11-04 23:47:04 UTC
both Android and iOS:

When I try to install the AWSSDK.S3 to access Amazon services, I get the following linker error when trying to build iOS:

Failed to resolve "System.Void Amazon.Runtime.Internal.Util.AESEncryptionPutObjectStream::.ctor(System.IO.Stream,System.Byte[],System.Byte[])" reference from "AWSSDK.Core, Version=, Culture=neutral, PublicKeyToken=885c28607f98e604"

..Android build has a similar error.

I have the following libraries installed:

AWSSDK.S3 v3.1.1.1 
AWSSDK.Core v3.3.4 
AWSSDK.SecurityToken v3.3.0.2 
AWSSDK.CognitolIdenity v3.3.0.2 
AWSSDK.CognitoIdentityProvider v3.3.1.2 
PCLCrypto v2.0.147 
PCLStorage v1.0.2

this appears to be a bug in AWSSDK.Core, but reporting here, because documentation here:

says to please submit bug report "...If your application only works with -nolink"...which is the case here.

feel free to close if this is an AWS bug not fixable by Xamarin
Comment 2 Jon Douglas [MSFT] 2017-07-05 19:11:01 UTC
The issue here is that your application is linking out this item's constructor in the AWSSDK.Core library:

System.Void Amazon.Runtime.Internal.Util.AESEncryptionPutObjectStream::.ctor(System.IO.Stream,System.Byte[],System.Byte[])" reference from "AWSSDK.Core, Version=, Culture=neutral, PublicKeyToken=885c28607f98e604"

Now, is this your fault? Not really, it's partially the Linker to blame for being too aggressive, but also that this library probably doesn't preserve it's members and thus the linker links these items out.

I would consider this to be a bug on the AWSSDK.Core end where the maintainer could do a better job preserving the code:


Otherwise you can always mark this as a linkskip item:


For a bit more information about why this happens, check out my blog on this topic: 


I am marking this issue as NEEDINFO as we are missing a reproduction project that demonstrates this issue. Although this bug is a little old, we will need that to proceed investigation.
Comment 3 Jon Douglas [MSFT] 2017-10-04 16:48:01 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!