dyld-image-loading-performance icon indicating copy to clipboard operation
dyld-image-loading-performance copied to clipboard

Duplicate symbol issue

Open yxztj opened this issue 8 years ago • 3 comments

I followed the steps, but stuck at linking with error below:

duplicate symbol OBJC_CLASS$_PodsDummy_Pods_Ruguo in: /Users/jasonyu/Library/Developer/Xcode/DerivedData/Ruguo-grsyzxtiialcjibgdcbnmohgdsed/Build/Intermediates/Pods.build/Debug-iphoneos/Pods-Ruguo.build/Objects-normal/arm64/Pods-Ruguo-dummy.o /Users/jasonyu/Library/Developer/Xcode/DerivedData/Ruguo-grsyzxtiialcjibgdcbnmohgdsed/Build/Products/Debug-iphoneos/Pods_Ruguo.framework/Pods_Ruguo(Pods-Ruguo-dummy.o) duplicate symbol OBJC_METACLASS$_PodsDummy_Pods_Ruguo in: /Users/jasonyu/Library/Developer/Xcode/DerivedData/Ruguo-grsyzxtiialcjibgdcbnmohgdsed/Build/Intermediates/Pods.build/Debug-iphoneos/Pods-Ruguo.build/Objects-normal/arm64/Pods-Ruguo-dummy.o /Users/jasonyu/Library/Developer/Xcode/DerivedData/Ruguo-grsyzxtiialcjibgdcbnmohgdsed/Build/Products/Debug-iphoneos/Pods_Ruguo.framework/Pods_Ruguo(Pods-Ruguo-dummy.o) ld: 2 duplicate symbols for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

After removing Pods_Ruguo.framework from Linked Frameworks and Libraries, the error is gone, but then pods targets are not built before main app target, so I'll get another error. Is there anything I might have missed?

yxztj avatar Jun 25 '16 02:06 yxztj

Can you try setting Pods_Ruguo.framework dependency as Optional?

Also, if you delete the DerivedData folder and build, does the build work the first time around? I had to use

if [[ "$CONFIGURATION" == "Debug" ]]; then
  cd "${TARGET_BUILD_DIR}" && rm -rf *.framework && cd -
fi

to prevent build artifact conflicts.

stepanhruda avatar Jun 27 '16 14:06 stepanhruda

Same issue for me, I can't fix with the two proposed above.

Even if a clean derived data and build the first time it doesn't work

lucabartoletti avatar May 31 '17 15:05 lucabartoletti

Facing a similar issue for architecture x86_64. Tried adding the dependency as optional. I'm not sure where should I be adding the script to prevent build artifact conflicts. @stepanhruda If you could please help me out regarding where should that script be added.

nishantdesai avatar Aug 07 '17 07:08 nishantdesai