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

Undefined symbols for architecture x86_64 (React Native 0.61.2, Mac Catalyst) #27166

Closed
thesba opened this issue Nov 8, 2019 · 17 comments
Closed
Labels
Bug Resolution: Locked This issue was locked by the bot.

Comments

@thesba
Copy link

thesba commented Nov 8, 2019

The goal is to run React Native Apps as a MacOS App, using the released Mac Catalyst technology.
The error occurs with a blank React Native Project (0.61.2), when building it for MacOS.
The app runs for iOS and iPadOS.

React Native version:
System:
OS: macOS 10.15
CPU: (8) x64 Intel(R) Core(TM) i7-4750HQ CPU @ 2.00GHz
Memory: 90.74 MB / 8.00 GB
Shell: 5.0.11 - /usr/local/bin/bash
Binaries:
Node: 10.16.3 - /usr/local/bin/node
npm: 6.11.3 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
API Levels: 28, 29
Build Tools: 28.0.3, 29.0.2
System Images: android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5791312
Xcode: 11.2/11B44 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.2 => 0.61.2
npmGlobalPackages:
create-react-native-app: 2.0.2
react-native-cli: 2.0.1
react-native-macos-cli: 2.0.1

Steps To Reproduce

  1. Create a blank react-native project (without Expo) and install pods
  2. Open Xcode workspace with Xcode 11.2+ (Beta)
  3. First run on iOS to test if it builds
  4. Then, select the iPad and Mac checkbox in Deployment Info (Project Settings)

image

  1. Run the project for release and "My Mac"
    image

Expected Behaviour

Building without errors and run the MacOS app.

Actual Behaviour

Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_RCTSRWebSocket", referenced from: l_OBJC_$_CATEGORY_RCTSRWebSocket_$_React in libReact-Core.a(RCTWebSocketModule.o) objc-class-ref in libReact-Core.a(RCTWebSocketModule.o) objc-class-ref in libReact-Core.a(RCTReconnectingWebSocket.o) objc-class-ref in libReact-Core.a(RCTWebSocketExecutor.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

image

Approaches already tried:

#17320
#14925

Also we found out that the file React-RCTWebSocket.podspec is still on version 0.60.5:
{ "name": "React-RCTWebSocket", "version": "0.60.5", ... }

@thesba thesba added the Bug label Nov 8, 2019
@thesba
Copy link
Author

thesba commented Nov 8, 2019

We could solve the issue with following solution:
react-native-community/discussions-and-proposals#131 (comment)

@thesba thesba closed this as completed Nov 8, 2019
@Daniel-Griffiths
Copy link

Thanks for linking the solution, that worked for me! 🙂

@Pines-Cheng
Copy link

not work for me in iPhoneX simulator.

@ghasemikasra39
Copy link

I am getting:

Undefined symbols for architecture x86_64:
  "___darwin_check_fd_set_overflow", referenced from:
      _RAND_poll in libcrypto.a(rand_unix.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

After upgrade to 0.63.3

@lzhlewis2015
Copy link

@ghasemikasra39 i'm getting the same issue with you, do you find any solution for it?

@KirankumarDafda
Copy link

KirankumarDafda commented Oct 17, 2020

Yes, same. Getting error on 0.63.3 with new fresh project

  Undefined symbol: ___darwin_check_fd_set_overflow

Anyone can please help for this

@ghasemikasra39
Copy link

@ghasemikasra39 i'm getting the same issue with you, do you find any solution for it?

Upgrade Xcode to the latest version. It's fixed on ios 14

@ghasemikasra39
Copy link

Yes, same. Getting error on 0.63.3 with new fresh project

  Undefined symbol: ___darwin_check_fd_set_overflow

Anyone can please help for this

Upgrade Xcode to the latest version. It's fixed on ios 14

@ThalKod
Copy link

ThalKod commented Oct 17, 2020

I'm getting the same error after upgrading to RN 0.63.3 from 0.62
@ghasemikasra39 Do you mean Xcode 12 GM seed ?

@ghasemikasra39
Copy link

I'm getting the same error after upgrading to RN 0.63.3 from 0.62
@ghasemikasra39 Do you mean Xcode 12 GM seed ?

Yes, Upgrade your MacOS to latest version first to be able tp upgrade Xcode to v12. Then you have ios 14 on your simulators and everything works fine

@unmec
Copy link

unmec commented Oct 18, 2020

I was with Xcode 11.3.1 on Mojave 10.14.6, got error after pod updating an existing project.
Solved it by installing Xcode 11.7 here https://developer.apple.com/download/more/ and edit LSMinimumSystemVersion in info.plist file.

@KirankumarDafda
Copy link

Upgrade Xcode to the latest version. It's fixed on ios 14

Yes, this solved my issues, now same project, React Native 0.63.3 is running fine in XCode 12.0.1

@harshiththota
Copy link

I am using Xcode 11.3.1, react native 0.63. I also encountered the same issue while I am integrating Facebook SDK. Is there any other solution other than upgrading the Xcode version? Thank you

@anastely
Copy link

I was with Xcode 11.3.1 on Mojave 10.14.6, got error after pod updating an existing project.
Solved it by installing Xcode 11.7 here https://developer.apple.com/download/more/ and edit LSMinimumSystemVersion in info.plist file.

Hey, What exactly you edit in LSMinimumSystemVersion?

@unmec
Copy link

unmec commented Oct 27, 2020

I was with Xcode 11.3.1 on Mojave 10.14.6, got error after pod updating an existing project.
Solved it by installing Xcode 11.7 here https://developer.apple.com/download/more/ and edit LSMinimumSystemVersion in info.plist file.

Hey, What exactly you edit in LSMinimumSystemVersion?

Just changed it to 10.14 as Mojave is 10.14

@harshiththota
Copy link

I degraded the react-native version from 0.63 to 0.61 and the problem got solved.

@antoinerousseau
Copy link
Contributor

Also make sure you cd ios && pod install when you upgrade RN or any other dependency ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests