Skip to content

0.72.5 fails to link using Xcode 14.3 #39713

Closed

Description

@colincarter

Description

Using Xcode 14.3 and react-native 0.72.5 the app fails to link with a ld: library not found for -ld_classic error.

React Native Version

0.72.5

Output of npx react-native info

npx react-native info
info Fetching system and libraries information...
System:
  OS: macOS 13.6
  CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
  Memory: 1022.44 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.16.0
    path: ~/.nvm/versions/node/v18.16.0/bin/node
  Yarn:
    version: 1.22.19
    path: /usr/local/bin/yarn
  npm:
    version: 9.5.1
    path: ~/.nvm/versions/node/v18.16.0/bin/npm
  Watchman:
    version: 2023.09.25.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.11.3
    path: /Users/colincarter/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 22.4
      - iOS 16.4
      - macOS 13.3
      - tvOS 16.4
      - watchOS 9.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2022.3 AI-223.8836.35.2231.10671973
  Xcode:
    version: 14.3.1/14E300c
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.16.1
    path: /Users/colincarter/.sdkman/candidates/java/current/bin/javac
  Ruby:
    version: 3.2.2
    path: /Users/colincarter/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.5
    wanted: 0.72.5
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Steps to reproduce

  • Create a new project with npx react-native@latest init AwesomeProject
  • With Xcode 14.3 compile project either in Xcode or with npx react-native run-ios
  • See linker error ld: library not found for -ld_classic

Snack, screenshot, or link to a repository

Screenshot 2023-09-29 at 10 21 35 Screenshot 2023-09-29 at 10 22 30

https://github.com/colincarter/AwesomeProject

Activity

  1. added
    Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.
    and removed
    Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.
    on Sep 29, 2023
  2. qs-wang commented on Oct 1, 2023

    @qs-wang

    I am facing same issue.

  3. qs-wang commented on Oct 2, 2023

    @qs-wang

    I removed the ""-ld_classic" in project file and the build was running successfully.

  4. cipolleschi commented on Oct 2, 2023

    @cipolleschi
    Contributor

    This is a known issue at the moment. The fix is already in main with 63884b4 and the release crew will release a new version of RN 0.72 whenever they can.

  5. monochrome-yeh commented on Oct 2, 2023

    @monochrome-yeh

    I removed the ""-ld_classic" in project file and the build was running successfully.

    Do you mind if you could tell where to remove "-ld_classic" ?

  6. qs-wang commented on Oct 2, 2023

    @qs-wang

    I removed the ""-ld_classic" in project file and the build was running successfully.

    Do you mind if you could tell where to remove "-ld_classic" ?

    ios/yourproject.xcodeproj/project.pbxproj

    open with a text editor and search for "-ld_classic"

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution: FixedA PR that fixes this issue has been merged.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions