Arfoundation-samples: Xcode linking errors when Face Tracking Enabled is FALSE

Created on 18 Jan 2019  路  12Comments  路  Source: Unity-Technologies/arfoundation-samples

Downloaded MASTER and opened in Unity 2018.3.1. In ARKitSettings, I unchecked "AR Kit Face Tracking Enabled" (leaving "AR Kit Requirement" as Required), and built for iOS, with only "SimpleAR" scene included. I get the "Update link.xml" pop-up and choose "Yes, fix". In Xcode when I compile, I get a bunch of Face Tracking related linking errors (see below).
If I re-enable Face Tracking in Unity, then rebuild (fixing link.xml automatically), then the project compiles fine in Xcode.

But I am not going to use Face Tracking, so I want to uncheck it. Are you seeing this too?

macOS 10.14.2
Xcode 10.1 (10B61)
Unity 2018.3.1
ARKit XR Plugin 1.0.0-preview.23
ARCore 1.0.0-preview.24
AR Foundation 1.0.0-preview.22

---- Linking Errors:

Undefined symbols for architecture arm64:
"_UnityARKit_FaceProvider_TryRemoveFace", referenced from:
_ARKitFaceSubsystem_UnityARKit_FaceProvider_TryRemoveFace_m311847F58873432C8C895CCC2F1CCB5A8991114F in Bulk_Unity.XR.ARKit.FaceTracking_0.o
_ARKitFaceSubsystem_TryRemoveFace_m602A91B84E0559639116D004186C7C3946A9748E in Bulk_Unity.XR.ARKit.FaceTracking_0.o
_ARKitFaceSubsystem_TryRemoveNativeFace_m23A47DE34E96D62D4F8A5677B38BE74C2DBFCBA8 in Bulk_Unity.XR.ARKit.FaceTracking_0.o
(maybe you meant: _ARKitFaceSubsystem_UnityARKit_FaceProvider_TryRemoveFace_m311847F58873432C8C895CCC2F1CCB5A8991114F)
"_UnityARKit_FaceProvider_TryGetFaceBlendCoefficients", referenced from:
_ARKitFaceSubsystem_UnityARKit_FaceProvider_TryGetFaceBlendCoefficients_m19E60ECE81157F4F9DCE2E9765A2134761AA4449 in Bulk_Unity.XR.ARKit.FaceTracking_0.o
_ARKitFaceSubsystem_TryGetNativeFaceBlendCoefficients_m394B48DF794BA51C2C560A42C4D64DD69F67B489 in Bulk_Unity.XR.ARKit.FaceTracking_0.o
(maybe you meant: _ARKitFaceSubsystem_UnityARKit_FaceProvider_TryGetFaceBlendCoefficients_m19E60ECE81157F4F9DCE2E9765A2134761AA4449)
"_UnityARKit_FaceProvider_TryGetFaceMeshIndices", referenced from:
_ARKitFaceSubsystem_UnityARKit_FaceProvider_TryGetFaceMeshIndices_m89DE521E400775BE204BF5342DF52FA020245999 in Bulk_Unity.XR.ARKit.FaceTracking_0.o
_ARKitFaceSubsystem_TryGetNativeFaceMeshIndices_m5B9319A726C2CB76B7A1CAB383BCA52FF656A1F1 in Bulk_Unity.XR.ARKit.FaceTracking_0.o
(maybe you meant: _ARKitFaceSubsystem_UnityARKit_FaceProvider_TryGetFaceMeshIndices_m89DE521E400775BE204BF5342DF52FA020245999)
"_UnityARKit_FaceProvider_TryGetFaceMeshVertices", referenced from:
_ARKitFaceSubsystem_UnityARKit_FaceProvider_TryGetFaceMeshVertices_mBA68D741B9E973699CD229737192CC2806731723 in Bulk_Unity.XR.ARKit.FaceTracking_0.o
_ARKitFaceSubsystem_TryGetNativeFaceMeshVertices_m2FDF81CC52182CE6B1DCA1508C987C6B0957643B in Bulk_Unity.XR.ARKit.FaceTracking_0.o
(maybe you meant: _ARKitFaceSubsystem_UnityARKit_FaceProvider_TryGetFaceMeshVertices_mBA68D741B9E973699CD229737192CC2806731723)
"_UnityARKit_FaceProvider_Stop", referenced from:
_ARKitFaceSubsystem_UnityARKit_FaceProvider_Stop_m814D4D3BBF89E7BC4E3F742C5C4A40FA0622CA81 in Bulk_Unity.XR.ARKit.FaceTracking_0.o
_ARKitFaceSubsystem_Stop_m23125CC2079371CF298714C706FA51959BA4F1E3 in Bulk_Unity.XR.ARKit.FaceTracking_0.o
(maybe you meant: _ARKitFaceSubsystem_UnityARKit_FaceProvider_Stop_m814D4D3BBF89E7BC4E3F742C5C4A40FA0622CA81)
"_UnityARKit_FaceProvider_Start", referenced from:
_ARKitFaceSubsystem_UnityARKit_FaceProvider_Start_m2687BC560F4269B7EB699F64B533FAE0BBE67167 in Bulk_Unity.XR.ARKit.FaceTracking_0.o
_ARKitFaceSubsystem_Start_m81DDAA372D4493F97320A9DA8C2356791BA4374E in Bulk_Unity.XR.ARKit.FaceTracking_0.o
(maybe you meant: _ARKitFaceSubsystem_UnityARKit_FaceProvider_Start_m2687BC560F4269B7EB699F64B533FAE0BBE67167)
"_UnityARKit_FaceProvider_TryGetAllFaces", referenced from:
_ARKitFaceSubsystem_UnityARKit_FaceProvider_TryGetAllFaces_mDB7119BF076A30AEC53514A5F06651B6C883C95D in Bulk_Unity.XR.ARKit.FaceTracking_0.o
_ARKitFaceSubsystem_TryGetNativeAllFaces_mDABACB017D0EA4CF9AED31AB117A2263D4451C53 in Bulk_Unity.XR.ARKit.FaceTracking_0.o
(maybe you meant: _ARKitFaceSubsystem_UnityARKit_FaceProvider_TryGetAllFaces_mDB7119BF076A30AEC53514A5F06651B6C883C95D)
"_UnityARKit_FaceProvider_TryGetFaceMeshUVs", referenced from:
_ARKitFaceSubsystem_UnityARKit_FaceProvider_TryGetFaceMeshUVs_mE8B345E671437DF81570A19F17E4E8731DE7E44F in Bulk_Unity.XR.ARKit.FaceTracking_0.o
_ARKitFaceSubsystem_TryGetNativeFaceMeshUVs_m2C2168403C67F53FE45A8083E25153ECD145EE8C in Bulk_Unity.XR.ARKit.FaceTracking_0.o
(maybe you meant: _ARKitFaceSubsystem_UnityARKit_FaceProvider_TryGetFaceMeshUVs_mE8B345E671437DF81570A19F17E4E8731DE7E44F)
"_UnityARKit_FaceProvider_Shutdown", referenced from:
_ARKitFaceSubsystem_UnityARKit_FaceProvider_Shutdown_mCFF708E77F0C69BBCD28FC35D2041DC9288BA76E in Bulk_Unity.XR.ARKit.FaceTracking_0.o
_ARKitFaceSubsystem_Destroy_mE0185004BEF17A21E21A5CE1E6FBE09159194F4A in Bulk_Unity.XR.ARKit.FaceTracking_0.o
(maybe you meant: _ARKitFaceSubsystem_UnityARKit_FaceProvider_Shutdown_mCFF708E77F0C69BBCD28FC35D2041DC9288BA76E)
"_UnityARKit_FaceProvider_SetFaceAnchorCallbacks", referenced from:
_ARKitFaceSubsystem_UnityARKit_FaceProvider_SetFaceAnchorCallbacks_mCCED563595101D0E86284CA574EED5AE9BE602E4 in Bulk_Unity.XR.ARKit.FaceTracking_0.o
(maybe you meant: _ARKitFaceSubsystem_UnityARKit_FaceProvider_SetFaceAnchorCallbacks_mCCED563595101D0E86284CA574EED5AE9BE602E4)
"_UnityARKit_FaceProvider_Initialize", referenced from:
_ARKitFaceSubsystem_UnityARKit_FaceProvider_Initialize_mDC61B1E4243285043F5A1CBC344F725EC0FC9E9F in Bulk_Unity.XR.ARKit.FaceTracking_0.o
_ARKitFaceSubsystem__ctor_mCFD2FDAC2B2FD45B7C15B697268F6D9B54691905 in Bulk_Unity.XR.ARKit.FaceTracking_0.o
(maybe you meant: _ARKitFaceSubsystem_UnityARKit_FaceProvider_Initialize_mDC61B1E4243285043F5A1CBC344F725EC0FC9E9F)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Most helpful comment

@tikilittle I had to delete the prefabs from my project entirely to get it to compile. I also deleted the script ARFaceArkitBlendShapeVisualizer.cs.

All 12 comments

This is expected; you cannot use face tracking types in your project if you disable face tracking.

All the native code which controls face tracking is in a separate static library which is omitted from the build if you disable face tracking. Apple is pretty strict about this, so if we did not do this, then apps which do not wish to use face tracking would fail App Store validation.

It's unfortunate that you don't get any feedback on this until Xcode actually tries to link, but it's a difficult situation for us to detect during the Player build.

So, what do I need to delete from the MASTER branch for this to compile with Face Tracking disabled? I thought that by only including SimpleAR scene and not others, then Unity would not include any scenes/scripts/etc that had the Face Tracking calls.

I suspect its the components that are on the FaceMeshPrefab and FaceBlendShapes prefabs. The samples are intended to show lots of different functionality, so they include everything. What are you trying to accomplish?

Hey! I'm getting this same error as above when I link with XCode even though I've unchecked ARKitFaceTracking in ARKitSettings. I'm using ARFoundation (1.0.0-preview.22), ARKit XR Plugin (1.0.0-preview.23), XCode (10.1), and Unity 2018.30f2.

I'm running this on a iPhone 6S.

Is this still a known bug? Again, I'm not using any FaceMeshPrefabs or FaceBlendShapes prefabs in my scene.

@tikilittle I had to delete the prefabs from my project entirely to get it to compile. I also deleted the script ARFaceArkitBlendShapeVisualizer.cs.

Ohhh thanks @hawkwood ! That did the trick. 馃憤

fantastic @hawkwood

it's that simple - delete the hopeless script ARFaceArkitBlendShapeVisualizer.cs

Thank you so much!

Hi!
I have the same issue, but even after removing all Face-related scripts and prefabs, I get the above mentioned errors. Running OS 10.14.3, Unity 2018.3.2, Xcode 10.2.1, iOS 12.2, ARFoundation (1.0.0-preview.22), ARKit XR Plugin (1.0.0-preview.23). All worked fine on Xcode 10.1 and iOS 12.1. So there must be some xcode-realted things here...

I麓d be very thankful for any suggestrions.

Best

Hi @homajo - I'm pretty sure you have to update Unity to 2019 ... is the thing

(Even though this git project is now unsupported, has not been touched forever, it only seems to work if you totally update everything.)

I have latest (as of today) Unity, so that's 2019+, literally the latest available (as of today) Xcode, OSX, iOS,

and importantly for anyone reading - you may know this already - inside Unity then the package manager, there's an obscure function to update the Packages; I updated them all to the latest.

It does seem to work then.

FWIW another thread about this/similar issues...

https://forum.unity.com/threads/he-type-or-namespace-name-spatialtracking-does-not-exist-in-the-namespace-unityengine-are-you-m.650662/

Hope it helps somehow.

Hi!
Thanks - 2019 did the trick, I got a lot of other compiler errors from other assets, but managed to solve it.
Thank you again!

Best

So pleased to hear it @homajo - good one!

Yes these demos from Unity are critical - they don't often get the chance to update them all the time. Cheers

We moved ARKit face tracking support to a separate package to make it easier to completely exclude face tracking support. Closing issue.

Was this page helpful?
0 / 5 - 0 ratings