viro icon indicating copy to clipboard operation
viro copied to clipboard

Building with bitcode enabled

Open kimhafr opened this issue 7 years ago • 8 comments

  • [ X] Review the documentation: https://docs.viromedia.com/
  • [ X] Search for existing issues: https://github.com/viromedia/viro
  • [ X] Use the latest ViroReact release: https://docs.viromedia.com/docs/releases

Environment

Please provide the following information about your environment:

  1. Development OS: Mac
  2. Device OS & Version: iOS 12.0
  3. Version: ViroReact version 2.11 and React Native version 0.57.2
  4. Device(s): iOS

Description

When building a release-version of our app with bitcode enabled I get this error: ❌ ld: ~/node_modules/react-viro/ios/dist/lib/libViroReact.a(VRTPortalScene.o) does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. file ~/node_modules/react-viro/ios/dist/lib/libViroReact.a for architecture arm64

The wierd thing is that this command: lipo -info ../../node_modules/react-viro/ios/dist/lib/libViroReact.a returns Architectures in the fat file: ../../node_modules/react-viro/ios/dist/lib/libViroReact.a are: armv7 x86_64 arm64

Is this is known issue? It works when bitcode is disabled, but we don't want that.

kimhafr avatar Nov 07 '18 11:11 kimhafr

Just ran into this after a hell of a time resolving the errors caused by RN/xcode 10 not properly installing third party contents from react-native/third-party, and then it turns out glog creates a broken config if you just run ./configure in the glog folder so you need to run the script in react-native/script, and THEN a reference to libfishook.a wasn't properly linked in RCTWebsocket so you need to delete it and re-add and NOW finally the last error I get is the linker error, requiring bitcode to be disabled.

React native is quite a headache sometimes... 😆

tetreault avatar Nov 07 '18 18:11 tetreault

Hi @KimAM, this is a known issue as compiling with bitcode is not supported at this time. Is there a reason you need bitcode supported? The issue might be occurring due to one of our dependencies.

VikAdvani avatar Nov 08 '18 01:11 VikAdvani

Hi @KimAM , As @VikAdvani pointed out earlier - ViroReact is built with enable_bitcode set to NO since one of our dependencies -> GVR IOS SDK is built without bitcode. That's why we have to build without bitcode.

manbod avatar Nov 09 '18 00:11 manbod

There are plans to make viro more modular right? In the sense that I need none of the VR components if I'm making purely an AR app. I believe I saw a comment about this on a closed github issue, and am just wondering out of curiosity.

tetreault avatar Nov 09 '18 14:11 tetreault

This is on our roadmap/backlog but has not been a priority. It is something we will take a look at as we add more device support but there are no near term plans for greater modularity.

dam00n avatar Nov 09 '18 16:11 dam00n

It's mostly because enabling bitcode would shrink our app size significantly. So not a huge problem, but a highly desired feature.

kimhafr avatar Nov 09 '18 17:11 kimhafr

Hi guys

there're any update on this?

alexzaganelli avatar Jul 30 '21 08:07 alexzaganelli

Hasn't GVR been removed from Viro? If so, it should be easy for a maintainer recompile the library with bitcode enabled correct?

ramicaza avatar Dec 21 '21 08:12 ramicaza