Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

Duplicate symbols between react-native and GVRKit

$
0
0

I'm trying to get 360 Videos working in my iOS react-native app (With VR support)

I attempted using the various react-native npm packages that offer this functionality, they work on Android but not on iOS. (And most haven't been updated for at least 2 years...)

I decided to attempt making my own package to see if I could resolve the problem myself. But it seems react-native iOS and GVRKit just aren't compatible.

I'm getting "7 duplicate symbols for architecture x86_64":

duplicate symbol 'fLB::FLAGS_nolog_prefix' in:

    /Users/beau/Documents/MMT/ModuleTester/ios/Pods/GVRSDK/Libraries/libGVRSDK.a(logging_ddb19c79df368f1c1db7fe052bc2a5d9.o)
    /Users/beau/Library/Developer/Xcode/DerivedData/ModuleTester-eaufazkgozuyyvfhpezutrvzceza/Build/Products/Debug-iphonesimulator/glog/libglog.a(logging.o)
duplicate symbol 'fLB::FLAGS_log_prefix' in:
    /Users/beau/Documents/MMT/ModuleTester/ios/Pods/GVRSDK/Libraries/libGVRSDK.a(logging_ddb19c79df368f1c1db7fe052bc2a5d9.o)
    /Users/beau/Library/Developer/Xcode/DerivedData/ModuleTester-eaufazkgozuyyvfhpezutrvzceza/Build/Products/Debug-iphonesimulator/glog/libglog.a(logging.o)
duplicate symbol 'fLB::FLAGS_nosymbolize_stacktrace' in:
    /Users/beau/Documents/MMT/ModuleTester/ios/Pods/GVRSDK/Libraries/libGVRSDK.a(examine_stack_fca476d0593b9f715e19264b75811e08.o)
    /Users/beau/Library/Developer/Xcode/DerivedData/ModuleTester-eaufazkgozuyyvfhpezutrvzceza/Build/Products/Debug-iphonesimulator/glog/libglog.a(utilities.o)
duplicate symbol 'fLB::FLAGS_symbolize_stacktrace' in:
    /Users/beau/Documents/MMT/ModuleTester/ios/Pods/GVRSDK/Libraries/libGVRSDK.a(examine_stack_fca476d0593b9f715e19264b75811e08.o)
    /Users/beau/Library/Developer/Xcode/DerivedData/ModuleTester-eaufazkgozuyyvfhpezutrvzceza/Build/Products/Debug-iphonesimulator/glog/libglog.a(utilities.o)
duplicate symbol 'fLI::FLAGS_nov' in:
    /Users/beau/Documents/MMT/ModuleTester/ios/Pods/GVRSDK/Libraries/libGVRSDK.a(vlog_is_on_0129e25e84d5880e84b763ce61020e1c.o)
    /Users/beau/Library/Developer/Xcode/DerivedData/ModuleTester-eaufazkgozuyyvfhpezutrvzceza/Build/Products/Debug-iphonesimulator/glog/libglog.a(vlog_is_on.o)
duplicate symbol 'fLI::FLAGS_v' in:
    /Users/beau/Documents/MMT/ModuleTester/ios/Pods/GVRSDK/Libraries/libGVRSDK.a(vlog_is_on_0129e25e84d5880e84b763ce61020e1c.o)
    /Users/beau/Library/Developer/Xcode/DerivedData/ModuleTester-eaufazkgozuyyvfhpezutrvzceza/Build/Products/Debug-iphonesimulator/glog/libglog.a(vlog_is_on.o)
duplicate symbol 'fLS::FLAGS_vmodule' in:
    /Users/beau/Documents/MMT/ModuleTester/ios/Pods/GVRSDK/Libraries/libGVRSDK.a(vlog_is_on_0129e25e84d5880e84b763ce61020e1c.o)
    /Users/beau/Library/Developer/Xcode/DerivedData/ModuleTester-eaufazkgozuyyvfhpezutrvzceza/Build/Products/Debug-iphonesimulator/glog/libglog.a(vlog_is_on.o)
ld: 7 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I can't get GVRKit and react-native to get along, is there anyway to resolve these errors myself?

Any suggestions are welcome! Thanks in advance! Beau

Edit

I have tried using this shell script (available with react-native-gvr) but it changed nothing :

    #!/bin/bash

cd ./Pods/GVRSDK/Libraries/
lipo -info libGVRSDK.a

# Divide to each platform
lipo -thin armv7 libGVRSDK.a -output libGVRSDK_armv7
lipo -thin i386 libGVRSDK.a -output libGVRSDK_i386
lipo -thin x86_64 libGVRSDK.a -output libGVRSDK_x86_64
lipo -thin arm64 libGVRSDK.a -output libGVRSDK_arm64

# Delete duplicate file
chmod 777 libGVRSDK_armv7
chmod 777 libGVRSDK_i386
chmod 777 libGVRSDK_x86_64
chmod 777 libGVRSDK_arm64

ar -dv libGVRSDK_armv7 vlog_is_on.o
ar -dv libGVRSDK_i386 vlog_is_on.o
ar -dv libGVRSDK_x86_64 vlog_is_on.o
ar -dv libGVRSDK_arm64 vlog_is_on.o

# rm libGVRSDK.a
lipo -create libGVRSDK_armv7 libGVRSDK_i386 libGVRSDK_x86_64 libGVRSDK_arm64 -output libGVRSDK.a

# Delete media
rm libGVRSDK_armv7
rm libGVRSDK_i386
rm libGVRSDK_x86_64
rm libGVRSDK_arm64

cd ../../../

The pod install output :

Architectures in the fat file: libGVRSDK.a are: armv7 i386 x86_64 arm64 
ar: vlog_is_on.o: not found in archive
ar: vlog_is_on.o: not found in archive
ar: vlog_is_on.o: not found in archive
ar: vlog_is_on.o: not found in archive
Integrating client project

I've tried replacing vlog_is_on.o with logging.o and utilities.o to see what happens, but they are also not found.

Any help would reeeaallly be appreciated ;) Thanks !


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>