Hi, we are integrating react-viro into our iOS project, while we got this error: ld: 25 duplicate symbols for architecture arm64 and
duplicate symbol _zipOpenNewFileInZip3_64 in:
/Users/samuandris/Documents/AR_development/drops-react-native/ios/Pods/GVRSDK/Libraries/libGVRSDK.a(zip_6df76a0f0a81f58a36d4f1080f6b32db.o)
/Users/samuandris/Library/Developer/Xcode/DerivedData/Drops-chwfszhvmgifwfgkazlkjrhclmir/Build/Products/Debug-iphoneos/SSZipArchive/libSSZipArchive.a(zip.o)
As far as I understand we include SSZipArchive and also cardboardSDK includes it, and the duplication comes from this. (cardboardSDK is included in react-viro).
Did you face the same problem before? Could you suggest a solution for this?
Thanks Andras
+1
Would it be possible to not to use the cardboardSDK for apps that only use AR? We don't have a VR version, and this would resolve our problem instantaneously.
Hi @itchingpixels,
We're looking at this issue and we have this tentative solution that removes the GVRSDK dependency while making sure Viro doesn't crash when it starts up, but we're still trying to reproduce the issue you see. We tried using SSZipArchive as well as GVRSDK through Cocoapods, but that compiled just fine for us (maybe using frameworks works fine with these conflicting dependencies?).
In any case, here's the tentative solution:
s.dependency 'GVRSDK', '1.120.0' from {your_project}/node_modules/react-viro/ios/dist/ViroRenderer/ViroKit.podspec.cd {your_project}/iosrm Podfile.lockpod 'ViroKit', ... line: pod 'GTMSessionFetcher/Core', '1.1.6'
pod 'GoogleToolboxForMac/Logger', '2.1.0'
pod 'GoogleToolboxForMac/Defines', '2.1.0'
pod install.xcworkspace and perform a Clean Build Folder... before building your application again.That should remove the libGVRSDK.a that is conflicting with your included library.
Alternatively, you might want to try importing SSZipArchive.a through Cocoapods. Not sure why including it for us doesn't cause a compilation error on our side.
Thanks,
great, thank you! is the a repo we can fork, to make these changes permanent for ourselves?
Hey @itchingpixels,
Did that work for you?
Unfortunately, we don't have a repo, but making Viro more modular is something that we're considering (so AR people don't need VR and vice-versa).
Something you can consider doing is writing a script that is executed after running npm install in your workspace.
ie. in your package.json you have a scripts section that looks like the following:
"scripts": {
"prestart": "./node_modules/react-viro/bin/run_ngrok.sh",
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
You can add a "postinstall" : "./your/script/here.sh" line to it and that'll execute your script at the end of a npm install.
Thanks,
Hi!
Hi!
We tried this, but it seems like it's missing AWSCore now.
dyld: Library not loaded: @rpath/AWSCore.framework/AWSCore
Referenced from: /private/var/containers/Bundle/Application/7019EE13-0E5E-4564-A473-9AE5102F5DD3/DropsKorean.app/Frameworks/ViroKit.framework/ViroKit
Reason: image not found
Message from debugger: Terminated due to signal 6
This happens even if we add AWSCore to our podfile, and install it.
Do you have any suggestions?
Thank you!
Hey @itchingpixels,
Sorry for the delayed response, after following the instructions above, this is how my Podfile & Podfile.lock look like:
Podfile:
platform :ios, '9.3'
target 'FinalTest' do
use_frameworks!
pod 'ViroReact', :path => '../node_modules/react-viro/ios/'
pod 'ViroKit', :path => '../node_modules/react-viro/ios/dist/ViroRenderer/'
pod 'GTMSessionFetcher/Core', '1.1.6'
pod 'GoogleToolboxForMac/Logger', '2.1.0'
pod 'GoogleToolboxForMac/Defines', '2.1.0'
end
Podfile.lock:
PODS:
- AWSCore (2.6.12)
- AWSDynamoDB (2.6.12):
- AWSCore (= 2.6.12)
- GoogleToolboxForMac/Defines (2.1.0)
- GoogleToolboxForMac/Logger (2.1.0):
- GoogleToolboxForMac/Defines (= 2.1.0)
- GTMSessionFetcher/Core (1.1.6)
- GVRAudioSDK (1.120.0)
- ViroKit (1.0):
- AWSDynamoDB (~> 2.6.7)
- GVRAudioSDK (= 1.120.0)
- ViroReact (1.0)
DEPENDENCIES:
- GoogleToolboxForMac/Defines (= 2.1.0)
- GoogleToolboxForMac/Logger (= 2.1.0)
- GTMSessionFetcher/Core (= 1.1.6)
- ViroKit (from `../node_modules/react-viro/ios/dist/ViroRenderer/`)
- ViroReact (from `../node_modules/react-viro/ios/`)
EXTERNAL SOURCES:
ViroKit:
:path: ../node_modules/react-viro/ios/dist/ViroRenderer/
ViroReact:
:path: ../node_modules/react-viro/ios/
SPEC CHECKSUMS:
AWSCore: d0d6e4f6831754aaf98058d2306a016ae71510fe
AWSDynamoDB: a1626a8e025a12fa71723da8eee0c1ff51da5dc0
GoogleToolboxForMac: 2b2596cbb7186865e98cadf2b1e262d851c2b168
GTMSessionFetcher: 6aacd0ab48ddf0c3633ab2642d792abfcad1b08a
GVRAudioSDK: 302f0a8f190d855868ea07f246ce4f9b44c392ae
ViroKit: 765de9cd78943d1fbaa08ea89bfac9c8427fc0b5
ViroReact: 7ec32276dcd1883662b4587eaedfff67f7fc3625
PODFILE CHECKSUM: 2e2eefa6aa82c44c2b577dbe28d332c5eefcb7c2
COCOAPODS: 1.3.1
As you can see, the dependency is ViroKit -> AWSDynamoDB -> AWSCore. In the instructions I gave above to remove, the line s.dependency 'GVRSDK', '1.120.0', make sure you only removed the 1 line and not the others.
My {project_name}/node_modules/react-viro/ios/dist/ViroRenderer/ViroKit.podspec looks like the following:
Pod::Spec.new do |s|
s.name = 'ViroKit'
s.version = '1.0'
s.summary = 'Framework containing the ViroRenderer'
s.source = { :path => '.' } # source is required, but path will be defined in user's Podfile (this value will be ignored).
s.vendored_frameworks = 'ViroKit.framework'
s.homepage = 'http://viromedia.com'
s.license = {:type => 'Copyright', :text => "Copyright 2018 ViroMedia, Inc" }
s.author = 'Viro Media'
s.requires_arc = true
s.platform = :ios, '9.3'
s.dependency 'GVRAudioSDK', '1.120.0'
s.dependency 'AWSDynamoDB', '~> 2.6.7'
end
Thanks,
@achuvm I fixed it
https://github.com/facebook/react-native/issues/18022#issuecomment-372760977
@achuvm : it's really weird. I have the same Podfile & Podfile.lock, except we're not (and we can not) using use_frameworks!
HI @itchingpixels what is the reason you can't use use_frameworks? Viro React is a framework so it needs to be dynamically linked. Frameworks effectively let you get around this problem since you can pick the dependencies you want. If you can't use `use_frameworks to get around this you can manually link the dynamic frameworks that are in the podfile to your project and remove it from the Podfile. Let us know if that works :)
Hi!
We're trying to make this work with the use_frameworks! , but always end up with this error, coming from AWSCore:
https://user-images.githubusercontent.com/5416288/39262392-284d6f36-48b7-11e8-8878-205dd9916320.png
have you experienced something similar before?
Thank you!
Hi @itchingpixels,
Can you see which AWSCore version is being used by your project? (It should be listed in your Podfile.lock).
Looking at our ViroKit.podspec file, our dependency on AWSDynamoDB is ~> 2.6.7 which means that it'll pull in any version between 2.6.7 up to, but excluding, 2.7.0.
The version I can confirm works is 2.6.12 for us.
Thanks,
Closing this issue due to inactivity. If you are still experiencing problems, please re-open with the additional information request. Thanks
I'm having this exact issue:
duplicate symbol __ZN3fLI9FLAGS_novE in:
/Users/stephentetreault/git/tetreault/react-native-arkit-demo/Viro3dModelDemo/ios/Pods/GVRSDK/Libraries/libGVRSDK.a(vlog_is_on_8d2e7d29c7bb2e5dfa3670dcea4320a0.o)
/Users/stephentetreault/Library/Developer/Xcode/DerivedData/Viro3dModelDemo-dxpnrezwfovlmmcvnefqbdbopnao/Build/Products/Debug-iphoneos/libReact.a(vlog_is_on.o)
duplicate symbol __ZN3fLI7FLAGS_vE in:
/Users/stephentetreault/git/tetreault/react-native-arkit-demo/Viro3dModelDemo/ios/Pods/GVRSDK/Libraries/libGVRSDK.a(vlog_is_on_8d2e7d29c7bb2e5dfa3670dcea4320a0.o)
/Users/stephentetreault/Library/Developer/Xcode/DerivedData/Viro3dModelDemo-dxpnrezwfovlmmcvnefqbdbopnao/Build/Products/Debug-iphoneos/libReact.a(vlog_is_on.o)
ld: 2 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
but this comment resolved it https://github.com/viromedia/viro/issues/181#issuecomment-372773008
I had the exact same issue too, fixed by the comment pointed out by @Tankerxyz
@achuvm I fixed it
facebook/react-native#18022 (comment)
"react": "16.6.1"
"react-native": "0.57.7"
"react-viro": "2.13.0"
EDIT:
Ultimately, this issue (and some others in my case) came from the fact that React and some of its dependencies were already linked manually directly in Xcode (done by $ react-native init MyProject), and the duplicates from the Podfile were messing up everything. I ended up removing all manual linking in Xcode (emptied the MyProject > Libraries folder in my Xcode file tree), and the error got away, even after removing the above workaround.
Most helpful comment
Hi @itchingpixels,
We're looking at this issue and we have this tentative solution that removes the GVRSDK dependency while making sure Viro doesn't crash when it starts up, but we're still trying to reproduce the issue you see. We tried using SSZipArchive as well as GVRSDK through Cocoapods, but that compiled just fine for us (maybe using frameworks works fine with these conflicting dependencies?).
In any case, here's the tentative solution:
s.dependency 'GVRSDK', '1.120.0'from{your_project}/node_modules/react-viro/ios/dist/ViroRenderer/ViroKit.podspec.cd {your_project}/iosrm Podfile.lockpod 'ViroKit', ...line:pod install.xcworkspaceand perform aClean Build Folder...before building your application again.That should remove the
libGVRSDK.athat is conflicting with your included library.Alternatively, you might want to try importing
SSZipArchive.athrough Cocoapods. Not sure why including it for us doesn't cause a compilation error on our side.Thanks,