Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Failed while running Xcode #1151

Open
ansrthy opened this issue Jan 8, 2024 · 19 comments
Open

Build Failed while running Xcode #1151

ansrthy opened this issue Jan 8, 2024 · 19 comments
Labels
bug A bug in an ARFoundation-related package third party

Comments

@ansrthy
Copy link

ansrthy commented Jan 8, 2024

Encountering two problems: 1. Undefined symbols, 2. Linker command failed with exit code 1. I'm using simulators to execute the project; could this be causing the issues? Seeking assistance to resolve these issues.

@andyb-unity
Copy link
Collaborator

Apple does not support ARKit in the iOS Simulator. It's impossible to run ARKit apps in the simulator, so this is expected to fail.

@ansrthy
Copy link
Author

ansrthy commented Jan 10, 2024

Thank you for the information. Can I use an iPad instead of an iPhone, and are there any specific configurations, such as the iOS version and XCode version, that I need to consider?

@imamura-mmj
Copy link

I also encountered the same issue. The build for the real device fails with the error mentioned above.

The versions I'm using are as follows:
MacBook Pro M2 Venture 13.5
Unity: 2023.2.2f1 Apple Silicon
XCode: 15.2

I just opened the cloned repo with a freshly installed Unity 2023.2.2f1, then build it.

@andyb-unity andyb-unity added bug A bug in an ARFoundation-related package needsinvestigation Requires further investigation by Unity labels Jan 23, 2024
@andyb-unity
Copy link
Collaborator

We have reproduced the linker error on Xcode 15.2 with Apple Silicon. We're not sure why yet, but investigation has begun.

@andyb-unity andyb-unity added third party and removed needsinvestigation Requires further investigation by Unity labels Jan 23, 2024
@andyb-unity
Copy link
Collaborator

Ok after our team has looked at this, it appears that the issue is that Apple has broken forward compatibility in Xcode 15.2 with binaries that were compiled on Xcode 14.3. Our next patch release of 6.0 will contain recompiled binaries on a newer version of Xcode, and this is no longer a problem.

For now the recommendation is to use an older version of Xcode. We haven't seen this issue reported on 15.1 or 15.0.

@ansrthy
Copy link
Author

ansrthy commented Jan 24, 2024

Thank you for the information....
I'm using macOS Sonoma 14.2.1 (Intel Core i3) and Xcode version 15.2. I'm encountering a problem again. Is this version also having problems, or is it only for Silicon?

@andyb-unity
Copy link
Collaborator

We didn't test this build with an Intel Mac on Xcode 15.2, but I think it's safe to assume that this is an Xcode 15.2 issue. Same instructions apply for Intel most likely.

@ansrthy
Copy link
Author

ansrthy commented Jan 25, 2024

Thank you for responding so quickly.

@r618
Copy link

r618 commented Jan 25, 2024

Ok after our team has looked at this, it appears that the issue is that Apple has broken forward compatibility in Xcode 15.2 with binaries that were compiled on Xcode 14.3. Our next patch release of 6.0 will contain recompiled binaries on a newer version of Xcode, and this is no longer a problem.

For now the recommendation is to use an older version of Xcode. We haven't seen this issue reported on 15.1 or 15.0.

is it correct to assume this will(should) be 6.0.0-pre.6 ?

@andyb-unity
Copy link
Collaborator

is it correct to assume this will(should) be 6.0.0-pre.6 ?

The next release of 6.0 is actually likely going to be 6.0.0. We are preparing to bring the package out of pre-release.

@ansrthy
Copy link
Author

ansrthy commented Jan 29, 2024

We didn't test this build with an Intel Mac on Xcode 15.2, but I think it's safe to assume that this is an Xcode 15.2 issue. Same instructions apply for Intel most likely.

I tried the steps on an Intel-based Mac running Xcode 15.0.1, but encountered the same problems(1. Undefined symbols, 2. Linker command failed with exit code 1). Is there an issue specific to Intel Macs, or is there an alternative solution available?

@imamura-mmj
Copy link

imamura-mmj commented Feb 5, 2024

The following worked on my M2 Mac.

  • Install Xcode 15.0.1. xcode-select if you install it at different location
  • Download v5.0.6 zip file, instead of cloning latest git repo
  • Install Unity 2022.3.18f1 instead of the version specified by the repo (older version of Unity has another issue with xcode 15)
  • Start Unity
  • In the Build Setting > iOS > "Run in Xcode", make sure the right Xcode installation is specified if you have multiple Xcode installs
  • Build it on Unity
  • Open the xcodeproject by XCode and make sure Xcode 15.0.1 is used

@ansrthy
Copy link
Author

ansrthy commented Feb 5, 2024

The following worked on my M2 Mac.

  • Install Xcode 15.0.1. xcode-select if you install it at different location
  • Download v5.0.6 zip file, instead of cloning latest git repo
  • Install Unity 2022.3.18f1 instead of the version specified by the repo (older version of Unity has another issue with xcode 15)
  • Start Unity
  • In the Build Setting > iOS > "Run in Xcode", make sure the right Xcode installation is specified if you have multiple Xcode installs
  • Build it on Unity
  • Open the xcodeproject by XCode and make sure Xcode 15.0.1 is used

Thank you so much! Let me give it a try.

@ansrthy
Copy link
Author

ansrthy commented Feb 6, 2024

I tried, but it shows version problems.

The following worked on my M2 Mac.

  • Install Xcode 15.0.1. xcode-select if you install it at different location
  • Download v5.0.6 zip file, instead of cloning latest git repo
  • Install Unity 2022.3.18f1 instead of the version specified by the repo (older version of Unity has another issue with xcode 15)
  • Start Unity
  • In the Build Setting > iOS > "Run in Xcode", make sure the right Xcode installation is specified if you have multiple Xcode installs
  • Build it on Unity
  • Open the xcodeproject by XCode and make sure Xcode 15.0.1 is used

Thank you so much! Let me give it a try.

@andyb-unity
Copy link
Collaborator

@ansrthy We just released 6.0.0-pre.6. Let us know how it goes for you. Note that we have changed the minimum Unity version of AR Foundation 6 from 2023.2 to 2023.3 due to significant changes in URP and plugin serialization in 2023.3 that are not backwards-compatible.

@ansrthy
Copy link
Author

ansrthy commented Feb 15, 2024

@andyb-unity Yes , it worked for me. Thank you so much for sharing such valuable content on AR Foundation With Unity3d! and also for being so quick to respond and support . Your dedication to helping us learn is truly appreciated!. Keep up the great work!

@artfail
Copy link

artfail commented Mar 23, 2024

It might be a similar issue. I am using xcode 15.3. I cannot build this demo to my iphone. I basically get 100 Undefined symbol errors (Undefined symbol: _ARReferenceImage_class, Undefined symbol: ARReferenceImage_referenceImagesInGroupNamed_bundle, you get the idea) I am using 2023.2.15 on an M1 mac.

@andyb-unity
Copy link
Collaborator

@artfail The main branch of this repo is not compatible with Unity 2023.2. You must use 2023.3 (Unity 6) or newer.

@ansrthy
Copy link
Author

ansrthy commented Mar 26, 2024

@andyb-unity I have tried to add new 3D models of lungs and brains created using 3D Slicer, etc., into Unity, but they're not importing properly. Can you suggest any solutions? Also, instead of tracking whole body using a robot, can we track specific parts of the body like hands and legs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug in an ARFoundation-related package third party
Projects
None yet
Development

No branches or pull requests

5 participants