-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
App crashes with dyld[38734]: symbol not found in flat namespace '_jump_fcontext'
with use_frameworks!
#39945
Comments
|
Hi Luiz, can you try if this is happening also with Xcode 14? I fear that it is an Xcode 15 issue, unfortunately... |
Hi, I get the following different error in XCode 14.3.1 when building the app:
Following the hint from this issue I'm able to build by removing the |
yes, so... to run it in Xcode 14.3, you need to switch the build tool with Can you try again with Xcode 15.1? My app works with Xcode 15.1... |
Hi! |
@cipolleschi i have the exact same problem. React Native info:
|
same on |
@cipolleschi, I tried those steps, and I get the Here's the requested info, if it helps: $ xcodebuild -version
Xcode 15.1
Build version 15C65 And the output of $ npx react-native@latest info
info Fetching system and libraries information...
System:
OS: macOS 14.2
CPU: (10) arm64 Apple M1 Max
Memory: 2.28 GB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.10.0
path: ~/.nvm/versions/node/v20.10.0/bin/node
Yarn:
version: 1.22.21
path: /opt/homebrew/bin/yarn
npm:
version: 10.2.5
path: ~/.nvm/versions/node/v20.10.0/bin/npm
Watchman:
version: 2023.12.04.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.14.3
path: /Users/rfontes/.rvm/gems/ruby-3.0.6/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.2
- iOS 17.2
- macOS 14.2
- tvOS 17.2
- watchOS 10.2
Android SDK: Not Found
IDEs:
Android Studio: 2023.1 AI-231.9392.1.2311.11076708
Xcode:
version: 15.1/15C65
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.21
path: /usr/bin/javac
Ruby:
version: 3.0.6
path: /Users/rfontes/.rvm/rubies/ruby-3.0.6/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.73.1
wanted: 0.73.1
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false |
I managed to reproduce it. Have you tried with Xcode 15.2-beta already? |
So, I made another test. Meanwhile, I found that |
Hi there @cipolleschi , I keep getting the error mentioned in the issue when running on a physical device (using the Using Xcode 15.1:
The output of
Any ideas on how to get on this? Thank you! EDIT: managed to build & run successfully by removing |
which version of Xcode are you using? That flag has been added by Apple because we actually asked them to give us a way to make C++'s weak symbols work with their new linker. |
I'm actually using Xcode 15.1 (Build version 15C65). Maybe it's the case and we can remove that flag? |
@piraces yes, I'll work on that this week or next week, worst case scenario. |
Hi! For the record, I had the same issue as mention above:
Switching to Static Frameworks was enough 🙂 I'm available to give more info / to test other workaround, ideally I would like to go back to dynamics later! |
Thanks for the reporting. My understanding, as of today is that:
I want to test these hypothesis, but my current connectivity foes not allow me to download 30+ Gb in a day 🤦 |
@mateioprea It works on simulator but not on real device |
@cipolleschi, I've attempted to target iOS 17 using Xcode 15.1, but I'm encountering the same issue on a real device: dyld[1495]: symbol not found in flat namespace '_jump_fcontext' |
Hi everyone.
project.build_configurations.each do |config|
# fix for weak linking
self.safe_init(config, other_ld_flags_key)
- if self.is_using_xcode15_or_greater(:xcodebuild_manager => xcodebuild_manager)
+ if self.is_using_xcode15_0(:xcodebuild_manager => xcodebuild_manager)
- def self.is_using_xcode15_or_greater(xcodebuild_manager: Xcodebuild)
+ def self.is_using_xcode15_0(xcodebuild_manager: Xcodebuild)
xcodebuild_version = xcodebuild_manager.version
# The output of xcodebuild -version is something like
# Xcode 15.0
# or
# Xcode 14.3.1
# We want to capture the version digits
regex = /(\d+)\.(\d+)(?:\.(\d+))?/
if match_data = xcodebuild_version.match(regex)
major = match_data[1].to_i
+ minor = match_data[2].to_i
- return major >= 15
+ return major == 15 && minor == 0
end
return false
end With these changes, I was able to run a 0.73 app on the device. However, the reason why we have to add the Now, I cannot install iOS 14.5 on my laptop anymore, because it is not compatible with Sonoma. Is there someone that can help out by:
The help would be much appreciated and will help the whole community! |
Summary: While developing Xcode 15, Apple reimplemented the linker. In Xcode 15.0, the linker was making old iOS (< 15) crash when they were built using Xcode 15. To fix that, we make Apple create new compiler flags (`-ld_classic`) to have a backward compatible linker. In Xcode 15.1, Apple fixed that behavior, so the flags should not be required anymore. But now, if we pass `-ld_classic` to the linker and we have an app that is using `use_framworks!`, that app crashes at startup. This change remove the flags if the Xcode that is used is 15.1 or greater. *Note:* The previous change added the flags to Hermes as well. I tested this fix in a configuration where Hermes has the flags and React Native does not, and it works. So we are removing the flags only from React Native. This Fixes facebook#39945 ## Changelog: [Internal] - Do not add the `-ld_classic` flag if the app is built with Xcode 15.1 or greater. Differential Revision: D52658197
So, I was able to test using Firebase Test Lab and it looks like that older devices are working. I created PRs also for the supported versions: |
) Summary: While developing Xcode 15, Apple reimplemented the linker. In Xcode 15.0, the linker was making old iOS (< 15) crash when they were built using Xcode 15. To fix that, we make Apple create new compiler flags (`-ld_classic`) to have a backward compatible linker. In Xcode 15.1, Apple fixed that behavior, so the flags should not be required anymore. But now, if we pass `-ld_classic` to the linker and we have an app that is using `use_framworks!`, that app crashes at startup. This change remove the flags if the Xcode that is used is 15.1 or greater. *Note:* The previous change added the flags to Hermes as well. I tested this fix in a configuration where Hermes has the flags and React Native does not, and it works. So we are removing the flags only from React Native. This Fixes facebook#39945 ## Changelog: [Internal] - Do not add the `-ld_classic` flag if the app is built with Xcode 15.1 or greater. Reviewed By: cortinico Differential Revision: D52658197
) Summary: While developing Xcode 15, Apple reimplemented the linker. In Xcode 15.0, the linker was making old iOS (< 15) crash when they were built using Xcode 15. To fix that, we make Apple create new compiler flags (`-ld_classic`) to have a backward compatible linker. In Xcode 15.1, Apple fixed that behavior, so the flags should not be required anymore. But now, if we pass `-ld_classic` to the linker and we have an app that is using `use_framworks!`, that app crashes at startup. This change remove the flags if the Xcode that is used is 15.1 or greater. *Note:* The previous change added the flags to Hermes as well. I tested this fix in a configuration where Hermes has the flags and React Native does not, and it works. So we are removing the flags only from React Native. This Fixes facebook#39945 ## Changelog: [Internal] - Do not add the `-ld_classic` flag if the app is built with Xcode 15.1 or greater. Reviewed By: cortinico Differential Revision: D52658197
) Summary: While developing Xcode 15, Apple reimplemented the linker. In Xcode 15.0, the linker was making old iOS (< 15) crash when they were built using Xcode 15. To fix that, we make Apple create new compiler flags (`-ld_classic`) to have a backward compatible linker. In Xcode 15.1, Apple fixed that behavior, so the flags should not be required anymore. But now, if we pass `-ld_classic` to the linker and we have an app that is using `use_framworks!`, that app crashes at startup. This change remove the flags if the Xcode that is used is 15.1 or greater. *Note:* The previous change added the flags to Hermes as well. I tested this fix in a configuration where Hermes has the flags and React Native does not, and it works. So we are removing the flags only from React Native. This Fixes facebook#39945 ## Changelog: [Internal] - Do not add the `-ld_classic` flag if the app is built with Xcode 15.1 or greater. Reviewed By: cortinico Differential Revision: D52658197
) Summary: Pull Request resolved: facebook#42230 While developing Xcode 15, Apple reimplemented the linker. In Xcode 15.0, the linker was making old iOS (< 15) crash when they were built using Xcode 15. To fix that, we make Apple create new compiler flags (`-ld_classic`) to have a backward compatible linker. In Xcode 15.1, Apple fixed that behavior, so the flags should not be required anymore. But now, if we pass `-ld_classic` to the linker and we have an app that is using `use_framworks!`, that app crashes at startup. This change remove the flags if the Xcode that is used is 15.1 or greater. *Note:* The previous change added the flags to Hermes as well. I tested this fix in a configuration where Hermes has the flags and React Native does not, and it works. So we are removing the flags only from React Native. This Fixes facebook#39945 ## Changelog: [Internal] - Do not add the `-ld_classic` flag if the app is built with Xcode 15.1 or greater. Reviewed By: cortinico Differential Revision: D52658197 fbshipit-source-id: 37d6bc895921c0fc3661f301870477191e7e42b3
Hey @cipolleschi, I hate that this is coming back up but I am having this problem with
And system
Our app is rather large and has a mix of dynamic and static frameworks. I also tried manually removing all the |
same problem here with Xcode@15.3 and react-native 0.73.6 just npx react-native@latest init AwesomeProjectTest
USE_FRAMEWORKS=dynamic NO_FLIPPER=1 pod install System: |
Same for me, were you able to find a fix? |
1 similar comment
Same for me, were you able to find a fix? |
Hi everyone, I was on a long PTO (3 weeks) and came back this week. |
@sunzongzheng @wkwyatt I just tried the following steps:
Build: ⌘+B I'm using React Native 0.73.6 and Xcode 15.3. I think that there is something funky in your local setups, perhaps caching. Could you try to:
|
Are you running it on a device later? Because my issue is not compiling/building but if I run it on a physical device |
No I was only building. I'll try to connect a device, then. |
I'm very sad. This is an Xcode regression.
|
Some good and bad news here. The good news are that:
The reason why 0.74 is not affected even with Dynamic Frameworks is the following:
The bad news is that, even by re-enabling the @bruno-centanaro @sunzongzheng how critical is the dynamic framework setup for you? Would your app work also with the static framework setup? |
Thanks for the update. Dynamic frameworks is a must for my app but installing xcode 15.1 does the job so I guess I'll need to instruct my team to change it manually. Thanks again |
I'm really sorry for this as I hoped we fixed this for good. :( |
I just disabled Hermes on iOS in Podfile and it helped. |
yeah, that's another workaround. The problem is that React-Hermes depends on a subpod of Folly which depends on the |
Dynamic frameworks are not critical in my app, so let's get back to the good old static 🐢 🐢 Thanks for looking into this! Got really confused to have the crash back when upgrading to XCode 15.3 🥲 |
same here, any update on this?
Xcode: SDKs: CocoaPods: |
update: after downgrade Xcode to 15.2, this error gone (Xcode 15.3 not work either) |
Has anyone tried with Xcode 15.4 already? (haven't had the time yet!) |
yes , see my commont above, i already tried Xcode 15.4 |
Problem was solved on 0.74.x
now everything works! |
New Version
0.73.0-rc.1
Old Version
0.72.5
Build Target(s)
iOS simulator
Output of
react-native info
Issue and Reproduction Steps
npx react-native@latest init MyApp --version 0.73.0-rc.1
(cd ios && USE_FRAMEWORKS=dynamic pod install)
The app crashes immediately with the following error:
XCode screenshot:
The text was updated successfully, but these errors were encountered: