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

Xcode Error (Xcode 14.1 & 14.3.1): "library not found for -ld_classic" #83085

Closed
jpetersen23 opened this issue Oct 10, 2023 · 2 comments · Fixed by #83088
Closed

Xcode Error (Xcode 14.1 & 14.3.1): "library not found for -ld_classic" #83085

jpetersen23 opened this issue Oct 10, 2023 · 2 comments · Fixed by #83088

Comments

@jpetersen23
Copy link

Godot version

4.2-dev6

System information

Godot v4.2.dev6 - macOS 13.6.0 - Vulkan (Mobile) - integrated Apple M2 Max - Apple M2 Max (12 Threads)

Issue description

Building a project in Xcode 14.1, I get the following error on ios:

ld: library not found for -ld_classic

I believe the origin of it is (but I'm new to the codebase):
https://github.com/godotengine/godot/blob/master/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj#L258

Steps to reproduce

I included the basically empty test project, but I'm listing the steps to make that project for completeness in case I'm doing something wrong:

  1. create a new project.
  2. click 3d scene button.
  3. save scene.
  4. click run button.
  5. click set current scene to main scene.
  6. Export level (Project>Export...)
  7. Add ios.
  8. Fix error message about Enable "Import ETC2 ASTC"
  9. Set App Store Team Id & Bundle Identifier to stuff that works for your account.
  10. Click "Export Project..."
  11. See [Xcode Build]: Xcode project build failed, see editor log.
  12. Read in Editor Logs:

"ld: library not found for -ld_classic
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** ARCHIVE FAILED **"

Minimal reproduction project

TestNoMono.zip

I tried Xcode 14.1 and 14.3.1, both gave the same error when the editor called them.

Xcode 15 gave me a different error which is not relevant I don't think to the flag issue:
"objc[32763]: Class XROS1_0SimRuntime is implemented in both /Library/Developer/CoreSimulator/Volumes/xrOS_21N5207f/Library/Developer/CoreSimulator/Profiles/Runtimes/xrOS 1.0.simruntime/Contents/MacOS/xrOS 1.0 (0x10a4300e0) and /Library/Developer/CoreSimulator/Volumes/xrOS_21N5165g/Library/Developer/CoreSimulator/Profiles/Runtimes/xrOS 1.0.simruntime/Contents/MacOS/xrOS 1.0 (0x1105e40e0). One of the two will be used. Which one is undefined."

@akien-mga
Copy link
Member

@jpetersen23 I updated the 4.1.2-stable export templates with the changes from #83088, so if you re-download them today, it should work fine.

@guopeng-wei-103
Copy link

I added a swift dependency library, so I added the "use_frameworks!" configuration in the podfile. After reinstalling the dependency, I kept getting this errors.

After check blow, my project worked.

Build Setting - Linking General - Other Linker Flags.

See if there is any extra configuration here. For example, the library that cannot be found is configured here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants