Undefined symbols for architecture i386:
"_OBJC_CLASS_$_PINOperationGroup", referenced from:
objc-class-ref in PINCache.o
"_OBJC_CLASS_$_PINOperationQueue", referenced from:
objc-class-ref in PINCache.o
objc-class-ref in PINMemoryCache.o
objc-class-ref in PINDiskCache.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
https://github.com/pinterest/PINCache/pull/282 addresses the theory about Carthage building PINOperations twice causing some linking confusion.
I ran the repro steps with that branch and the error went away.
Error
Repro Steps
I am using Xcode 12 You will need to use the workaround introduced in https://github.com/Carthage/Carthage/issues/3019#issuecomment-664099506.
carthage_workaround.xcconfig
with the workaround mentioned aboveXCODE_XCCONFIG_FILE=carthage_workaround.xcconfig make carthage
Investigation
I suspect this has something to do with how
PINCache
linksPINOperations
twice for Carthage:PINCache.xcodeproj
target dependencyCartfile
Testing Theory
https://github.com/pinterest/PINCache/pull/282 addresses the theory about Carthage building
PINOperations
twice causing some linking confusion. I ran the repro steps with that branch and the error went away.