Arcore-unity-sdk: ARCore and Firebase Messaging compatibility issue

Created on 11 Jul 2018  路  12Comments  路  Source: google-ar/arcore-unity-sdk

I tried to add Firebase Messaging to my project that have ARCore (and ARKit). Unity build just fine but once I tried to build project for my device with xcode (9.3) I got error: Apple Mach-O Linker (ld) Error - linker command failed with exit code 1 (use -v to see invocation) and before that there is 551 duplicate symbols for architecture arm64.

I am trying to figure out what is the issue here. Removing either ARCore or Firebase Messaging and all problems are gone. I am also using Firebase realtime database but that doesn't seems to cause any trouble.

I am using ARCore v. 1.3.0 and I tried first with Firebase v. 4.5.2 and then upgrade to 5.1.1 but that didn't help.

I won't paste whole list of 551 duplicate symbols but they all seems to be part of "Protobuf/libProtobuf.a". I can find it on my project but what can I do?

Here is the snippet:

duplicate symbol _OBJC_METACLASS_$_GPBUInt32Value in:
    /Users/arnora/Library/Developer/Xcode/DerivedData/Unity-iPhone-eeiookellmkkvdbzucboowoqjcno/Build/Products/ReleaseForRunning-iphoneos/Protobuf/libProtobuf.a(Wrappers.pbobjc.o)
    /Users/arnora/Projects/COMPANY/XXX/Build/iOS/XXX/Pods/ARCore/Frameworks/ARCore.framework/ARCore(Wrappers.pbobjc_8940b06ba7205568da36560b58225827.o)
duplicate symbol _OBJC_CLASS_$_GPBInt32Value in:
    /Users/arnora/Library/Developer/Xcode/DerivedData/Unity-iPhone-eeiookellmkkvdbzucboowoqjcno/Build/Products/ReleaseForRunning-iphoneos/Protobuf/libProtobuf.a(Wrappers.pbobjc.o)
    /Users/arnora/Projects/COMPANY/XXX/Build/iOS/XXX/Pods/ARCore/Frameworks/ARCore.framework/ARCore(Wrappers.pbobjc_8940b06ba7205568da36560b58225827.o)
duplicate symbol _OBJC_METACLASS_$_GPBInt32Value in:
    /Users/arnora/Library/Developer/Xcode/DerivedData/Unity-iPhone-eeiookellmkkvdbzucboowoqjcno/Build/Products/ReleaseForRunning-iphoneos/Protobuf/libProtobuf.a(Wrappers.pbobjc.o)
    /Users/arnora/Projects/COMPANY/XXX/Build/iOS/XXX/Pods/ARCore/Frameworks/ARCore.framework/ARCore(Wrappers.pbobjc_8940b06ba7205568da36560b58225827.o)
ld: 551 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
bug fixed in upcoming release

All 12 comments

Anyone, any ideas? I am still stuck with this issue. I had to remove Firebase Messaging to be able to work with ARCore but that's not really solution.

We have the same problem, we uninstall the Firebase messaging but this is not a solution - as you said. waiting for solution
Thanks!

+1

Hi, thanks for the report. I added it to our internal tracker to fix it for next releases. As a workaround, if you are not using CloudAnchors see #261. Disabling ARCore for iOS should fix this. Let me know if that helped.

Hi, can you guys point to me how the Firebase Messaging is setup in Unity? Does it use cocoapod to manage its dependencies?

@pablisho Thanks for the tip! Sadly we are using CloudAnchors in one part of our project so we might need to wait for the fix.

@bopangzz
Firebase Cloud Messaging is unitypackage file that can be downloaded here. It is adding Podfile:

pod 'Firebase/Core', '5.3.0'
pod 'Firebase/Messaging', '5.3.0'

But I don't know if there is more special going on since all the imported files are dll.

Hi, ARCore SDK for Unity v1.4.0 has been released and this issue has been fixed. Feel free to comment if you still experience it.

Sorry @pablisho that took so long to have time to test this out. I tried this with ARCore 1.4.0 and 1.5.0 and updating Firebase SDK to latest 5.4.2 (https://firebase.google.com/support/release-notes/unity) but same issue still exists.

I realise that we are using .net 3.5, not the latest 4.x. Could this be issue here? Hope not, since I won't be able to use .net 4.5 since unity/firebase has this websocket issue (https://github.com/firebase/quickstart-unity/issues/162).

Hello, did someone managed to solve this issue?
I updated to ARCore SDK for Unity v1.6.0 and Firebase Unity SDK 5.4.3. I do have iOS support disabled on Unity ARCore Project Settings, however I'm having the same "551 duplicate symbols" as @Arnoho

@cruxdavid Sadly but no I have not found real solution. Only way to build project was remove Firebase Messaging. We don't have push notifications support but at least we can build project.

Hello there!
I currently use the latest ARCore (v1.10.0) and Firebase SDK (6.2.1) and I still get the 551 duplicate symbols error. I've made sure I disabled ARCore and iOS support of it, but no luck.
Has anyone been able to solve this issue without removing the FirebaseMessaging from Unity?
Thanks your time and help in advance!

@Armando113 I haven't tested for while but last time the only solution for this problem was to remove completely FirebaseMessaging package. I am still hoping to find solution to have both ARCore and Firebase Messaging installed. I will let you know if I can find solution.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pIuszak picture pIuszak  路  6Comments

joshliebe picture joshliebe  路  3Comments

pshah123 picture pshah123  路  6Comments

ArigarasuthanRepo picture ArigarasuthanRepo  路  5Comments

iBicha picture iBicha  路  4Comments