joltup / rn-fetch-blob

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
2.81k stars 770 forks source link

duplicated symbold #797

Open fukemy opened 1 year ago

fukemy commented 1 year ago

hi, i got this problem after install rnfetchblob, please help

duplicate symbol '_bridgeRef' in:
   .../Build/Products/Release-iphonesimulator/react-native-blob-util/libreact-native-blob-util.a(ReactNativeBlobUtil.o)
   .../Build/Products/Release-iphonesimulator/rn-fetch-blob/librn-fetch-blob.a(RNFetchBlob.o)
duplicate symbol '_fsQueue' in:
    .../Build/Products/Release-iphonesimulator/react-native-blob-util/libreact-native-blob-util.a(ReactNativeBlobUtil.o)
    .../Build/Products/Release-iphonesimulator/rn-fetch-blob/librn-fetch-blob.a(RNFetchBlob.o)
duplicate symbol '_commonTaskQueue' in:
   .../Build/Products/Release-iphonesimulator/react-native-blob-util/libreact-native-blob-util.a(ReactNativeBlobUtil.o)
  .../Build/Products/Release-iphonesimulator/rn-fetch-blob/librn-fetch-blob.a(RNFetchBlob.o)
duplicate symbol '_fileStreams' in:
    .../Build/Products/Release-iphonesimulator/react-native-blob-util/libreact-native-blob-util.a(ReactNativeBlobUtilFS.o)
   .../Build/Products/Release-iphonesimulator/rn-fetch-blob/librn-fetch-blob.a(RNFetchBlobFS.o)
duplicate symbol '_expirationTable' in:
   .../Build/Products/Release-iphonesimulator/react-native-blob-util/libreact-native-blob-util.a(ReactNativeBlobUtilNetwork.o)
   .../Build/Products/Release-iphonesimulator/rn-fetch-blob/librn-fetch-blob.a(RNFetchBlobNetwork.o)
ld: 5 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
RonRadtke commented 1 year ago

ReactNativeBlobUtil is a still maintained fork of this lib here. Thus the collision. But there is no need to user rn-fetch-blob. React-native-blob-util can do the same and more, and is fully compatible to this lib here.

anoopbk1989 commented 1 year ago

In Xcode, below your ProjectName, you have Pods. Click on Pods, and you will get list of components under TARGETS. Go to Build settings of both the components(react-native-blob-util and rn-fetch-blob) and set No Common Blocks=No

am2619015 commented 1 year ago

Yeah same, on android is working, but on IOS, cant be build or debug

fukemy commented 1 year ago

@am2619015 because I am using react-native-blob-util, it's make duplicate symbols, just remove it then my ios project work namlly

deepbag commented 1 year ago

can anyone know what is the actual problem?

duplicate symbol '_fsQueue' in: /Users/macbook/Library/Developer/Xcode/DerivedData/vedaAcademy-deupwmlotwduujghkytxiearynbs/Build/Products/Release-iphonesimulator/react-native-blob-util/libreact-native-blob-util.a(ReactNativeBlobUtil.o) /Users/macbook/Library/Developer/Xcode/DerivedData/vedaAcademy-deupwmlotwduujghkytxiearynbs/Build/Products/Release-iphonesimulator/rn-fetch-blob/librn-fetch-blob.a(RNFetchBlob.o) duplicate symbol '_commonTaskQueue' in: /Users/macbook/Library/Developer/Xcode/DerivedData/vedaAcademy-deupwmlotwduujghkytxiearynbs/Build/Products/Release-iphonesimulator/react-native-blob-util/libreact-native-blob-util.a(ReactNativeBlobUtil.o) /Users/macbook/Library/Developer/Xcode/DerivedData/vedaAcademy-deupwmlotwduujghkytxiearynbs/Build/Products/Release-iphonesimulator/rn-fetch-blob/librn-fetch-blob.a(RNFetchBlob.o) duplicate symbol '_fileStreams' in: /Users/macbook/Library/Developer/Xcode/DerivedData/vedaAcademy-deupwmlotwduujghkytxiearynbs/Build/Products/Release-iphonesimulator/react-native-blob-util/libreact-native-blob-util.a(ReactNativeBlobUtilFS.o) /Users/macbook/Library/Developer/Xcode/DerivedData/vedaAcademy-deupwmlotwduujghkytxiearynbs/Build/Products/Release-iphonesimulator/rn-fetch-blob/librn-fetch-blob.a(RNFetchBlobFS.o) duplicate symbol '_expirationTable' in: /Users/macbook/Library/Developer/Xcode/DerivedData/vedaAcademy-deupwmlotwduujghkytxiearynbs/Build/Products/Release-iphonesimulator/react-native-blob-util/libreact-native-blob-util.a(ReactNativeBlobUtilNetwork.o) /Users/macbook/Library/Developer/Xcode/DerivedData/vedaAcademy-deupwmlotwduujghkytxiearynbs/Build/Products/Release-iphonesimulator/rn-fetch-blob/librn-fetch-blob.a(RNFetchBlobNetwork.o) ld: 4 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

RonRadtke commented 1 year ago

You have react-native-blob-util and rnfetchblob installed. Deinstall rnfetchblob and do a clean build and it should work fine. React-native-blob-util is a fork because rnfetchblob is not maintained and thus the duplicate symbols. React-native-blob-util can replace rnfetchblob, only thing to migrate is adjusting the imports

deepbag commented 1 year ago

thanks @RonRadtke now it's working

ghost commented 7 months ago

@RonRadtke Thanks, too.

OguzEkinci commented 6 months ago

ReactNativeBlobUtil is a still maintained fork of this lib here. Thus the collision. But there is no need to user rn-fetch-blob. React-native-blob-util can do the same and more, and is fully compatible to this lib here.

it's what it's, thx bro