Running Hermes for VisionOS #1164
Replies: 4 comments 12 replies
-
Just to chime in, we saw this error building Hermes from source for RN macOS too. Looks like something broke recently on main. |
Beta Was this translation helpful? Give feedback.
-
We will look into this. FWIW, I am building Hermes on MacOS daily and it certainly builds without error. However I am not using CocoaPods. Unfortunately no one on our team really understands or uses CocoaPods. Last time I tried even installing it, it was a challenge (see https://x.com/tmikov/status/1705991622100676812?s=20). FWIW, I don't understand why TvOS needs a fork of Hermes. IIRC, there was a PR which needed some minor improvements, but they didn't seem interested in working on it. |
Beta Was this translation helpful? Give feedback.
-
Hey @okwasniewski, could you share repro steps for observing this linker error on macOS? These symbols are exported by libhermes, so they should be resolved when you link against libhermes. |
Beta Was this translation helpful? Give feedback.
-
I've spent a significant amount of time debugging what's actually happening here. And it turns out for MacOS Hermes wasn't properly linked for local Xcode builds. I've adjusted the build script here to fix the issue for MacOS: facebook/react-native#41387 Regarding visionOS first issue was the same - Hermes wasn't linked properly. But it also wasn't built targeting visionOS (it was built for MacOS as it's the default for CMake). The issue was laying inside of CMake and flag that it passes ( Only after temporarily passing correct target flag (and compiling CMake from source removing previous flags), it started to work:
Here is the corresponding issue in CMake repo: https://gitlab.kitware.com/cmake/cmake/-/issues/25188 I'll wait with adding visionOS support to Hermes until that issue is resolved and a stable version of CMake 3.28 will be released. Screenshot of visionOS running Hermes: |
Beta Was this translation helpful? Give feedback.
-
Hey!
I'm working on bringing React Native to VisionOS (here). I've been trying to compile the app with Hermes enabled but unfortunately without success.
After bringing this topic on RN Contributors Discord folks from Microsoft working on RN MacOS pointed out that building Hermes from source didn't work for them either and they suggested trying out the prebuilt version.
However, the prebuilt version doesn't support VisionOS (as it supports MacOS and iOS). I don't want to follow the path of React Native TvOS which has its own fork of Hermes. Can we add support for VisionOS in Hermes podspec or is there any different way to make it work for Out Of Tree Platforms?
Coming back to the error I was getting when building from source:
Undefined symbols: hermes::vm::NopCrashManager::~NopCrashManager()
Expand the full error log
Feel free to let me know if you need more details!
Beta Was this translation helpful? Give feedback.
All reactions