Forum Xamarin.iOS
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Native linking error: 2 duplicate symbols for architecture arm64

tanriverditanriverdi USMember ✭✭

Hi all,

I can't build Xamarin.IOS project for days because errors below. I tried the suggestions such as writing "--registrar:static" to additional mtouch arguments and cleaning-rebuilding, uninstalling-installing components but nothing worked so I'm desperate. I will be grateful for suggestions.

Duplicate symbol in: /Users/---/Library/Caches/Xamarin/mtbs/builds/---/---/obj/iPhone/Debug/mtouch-cache/arm64/registrar.o (Location related to previous error)
Duplicate symbol in: /Users/---/Library/Caches/Xamarin/mtbs/builds/---/---/obj/iPhone/Debug/mtouch-cache/arm64/registrar.o (Location related to previous error)
Duplicate symbol in:
/Users/---/Library/Caches/Xamarin/mtbs/builds/---/---/obj/iPhone/Debug/mtouch-cache/EstimoteSDK.framework/EstimoteSDK(ESTNotificationTransporter.o) (Location related to previous error)
Duplicate symbol in: /Users/---/Library/Caches/Xamarin/mtbs/builds/---/---/obj/iPhone/Debug/mtouch-cache/EstimoteSDK.framework/EstimoteSDK(ESTNotificationTransporter.o) (Location related to previous error)
Native linking error: 2 duplicate symbols for architecture arm64
Native linking failed, duplicate symbol: 'OBJC_CLASS$ESTNotificationTransporter'.
Native linking failed, duplicate symbol: '_OBJC_METACLASS
$_ESTNotificationTransporter'.
Native linking failed. Please review the build log.

Have a good day.

Answers

  • JohandePJohandeP NLMember ✭✭

    I have exactly the same issue. Did you find a fix for this?

  • tanriverditanriverdi USMember ✭✭

    Unfortunately I couldn't. I uninstalled Estimote package and used native iBeacon methods.

  • JohandePJohandeP NLMember ✭✭

    Ok, I recompiled the binding myself and linked it and that seems to work.

  • tanriverditanriverdi USMember ✭✭
    Yes that worked for me too but it created some exceptions in Json serialization for rest API so I didn’t prefer that way. I recommend a full API test if you are using because it may be more difficult in the future to have a serialization issue.
  • dlawnickidlawnicki Member

    I just started running into this yesterday on projects that have been working fine for quite a while. The only way I can get it to build the release apps is if I remove all references to the Estimotes package.

    If anyone has any other ideas, I'm all ears. I've been trying everything all day with no luck.

    Here's the conflicting files:

    Native linking failed, duplicate symbol: 'OBJC_METACLASS$_ESTNotificationTransporter'. My4.iOS

    /Users/dlawnicki/Library/Caches/Xamarin/mtbs/builds/My4.iOS/2f389e8870043956b9dea8819051a257/obj/iPhone/AppStore/mtouch-cache/arm64/registrar.o (Location related to previous error)

    /Users/dlawnicki/Library/Caches/Xamarin/mtbs/builds/My4.iOS/2f389e8870043956b9dea8819051a257/obj/iPhone/AppStore/mtouch-cache/EstimoteSDK(ESTNotificationTransporter.o) (Location related to previous error)

  • marcfermarcfer BRMember ✭✭

    Any news ? I am stucked in this.

  • marcfermarcfer BRMember ✭✭

    Any news ? I am stucked in this.

  • dlawnickidlawnicki Member

    Not good news. I found a post on the Xamarin forums that appears that xamarin may have put in a breaking change, but I have no idea how to work around it.

    I downgraded to the last release of Xamarn.iOS before the May update on my Mac (11.8.1.29), and then was able to build again. Going forward though, something needs to change in these libraries, but I have no idea where to begin... Hopefully someone finds this and gives some advice on how to update these libraries to work with newer Xamarin.iOS...

  • alexmaniealexmanie ESMember ✭✭

    same here :(
    any news on that?

  • alexmaniealexmanie ESMember ✭✭

    Solved by adding this to mtouch arguments
    --registrar:dynamic

  • dlawnickidlawnicki Member

    Alex, thank you for the post, that solved my problem. I had only tried static in the past, which didn't solve the issue. I am now on iOS 12.1 with working beacons.

Sign In or Register to comment.