Duplicated entry in 'link binary with libraries' for specific-target pod library #363

Closed
digal opened this Issue Jul 1, 2012 · 8 comments

Projects

None yet

3 participants

@digal

I've just updated to 0.6.0 and my Pods.xcodeproj seem to be broken after pod install:

I have a target-specific section in my podfile:

target :Tests, :exclusive => true do
  dependency 'GHUnitIOS',      '0.4.33'
end

Pods xcode project now contains two Foundation.framework entries in "Link Binary With Libraries" for Pods-Tests target, so I get a linker error. It could be easily "fixed" manually, by removing duplicating entry, but the Pods.xcodeproj created on the CI server automatically (via 'pod install') during each build for our project.

@alloy
CocoaPods member

I think this is a bug in Xcodeproj. Will look into it tonight.

@alloy
CocoaPods member

Fixed by CocoaPods/Xcodeproj@ae2d4b9.

@irrationalfab Are you working on anything (or planning to do do) that should go into the bug fix releases of today? If I don’t hear back in 30 min, then I will go ahead and release.

@alloy alloy closed this Jul 2, 2012
@fabiopelosin
CocoaPods member

@alloy Nothing in the pipeline, please go ahead :-)

@alloy
CocoaPods member

Okeydokey! :)

@digal I have pushed CocoaPods 0.6.1 and Xcodeproj 0.2.1. Please update and give a try.

@digal

Works like a charm, thanks a lot!

@digal

Hmm, not sure if I should reopen this ticket, or create a new one. Now I have one Foundation.framework, but still having problems with duplicating stuff in separate targets.

  • If I mark my :Tests deps target as non-exclusive, I get

ld: duplicate symbol _a2_dataSourceProtocol in /Users/digal/Library/Developer/Xcode/DerivedData/Projectname-gdsrrwyjyagsdqcsbzbpaiofhfxc/Build/Products/Test-iphonesimulator/libPods.a(A2DynamicDelegate.o) and /Users/digal/Library/Developer/Xcode/DerivedData/Projectname-gdsrrwyjyagsdqcsbzbpaiofhfxc/Build/Products/Test-iphonesimulator/libPods-Tests.a(A2DynamicDelegate.o) for architecture i386

when building my Tests target (A2DynamicDelegate is a common dependency).

  • If I mark :Tests as exclusive, I get

ld: duplicate symbol _OBJC_METACLASS_$_PodsDummy in /Users/digal/Library/Developer/Xcode/DerivedData/Projectname-gdsrrwyjyagsdqcsbzbpaiofhfxc/Build/Products/Test-iphonesimulator/libPods.a(PodsDummy.o) and /Users/digal/Library/Developer/Xcode/DerivedData/Projectname-gdsrrwyjyagsdqcsbzbpaiofhfxc/Build/Products/Test-iphonesimulator/libPods-Tests.a(PodsDummy.o) for architecture i386

Upd: Actually, A2DynamicDelegate is not an explicit dependency. It's a dependency of the BlocksKit, whish is used in the project.

@fabiopelosin
CocoaPods member

I encoutered a similar issue but I'm not able to reproduce it. @digal it would be better to open another ticket and try to isolate the source.

@digal

@irrationalfab Here it is: #370

I'll try to play a bit with :exclusive => false mode, I guess it should work if I'll remove the libPods from the Tests target

@zhengrf225 zhengrf225 pushed a commit to zhengrf225/Xcodeproj that referenced this issue Nov 30, 2015
@alloy alloy Only ever add a system framework once. ae2d4b9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment