Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread-local storage is not supported for the current target + AsyncDisplayKit Framework name #969

Closed
Kaspik opened this issue Jun 15, 2018 · 16 comments

Comments

@Kaspik
Copy link
Contributor

Kaspik commented Jun 15, 2018

Hey Texture team! I haven't found any issue here (except #873).

I have problem with tests target. My main target runs okay on both XCode 9.4 and XCode 10.
But tests target on main target is not running because of:

  1. Framework not found
Ld /Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/ClassDojo.app/ClassDojo normal x86_64 (in target: ClassDojo)
    cd /Users/kaspik/Documents/Vyvoj/STRV/dojo-behavior
    export IPHONEOS_DEPLOYMENT_TARGET=9.0
    /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk -L/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator -LVendor -LVendor/DraggableCollectionView -LVendor/MFSideMenu -LVendor/ssdatakit -LVendor/DraggableCollectionView/Helpers -LVendor/DraggableCollectionView/Layout -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator -F/Users/kaspik/Documents/Vyvoj/STRV/dojo-behavior/Vendor -F/Users/kaspik/Documents/Vyvoj/STRV/dojo-behavior -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/AFNetworking -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/AMPopTip -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/Bolts -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/CDDesignSystem -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/CocoaAsyncSocket -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/CocoaLumberjack -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/DeviceUtil -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/EFCountingLabel -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/EZAudio -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/FBSDKCoreKit -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/FLAnimatedImage -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/FirebaseCore -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/FirebaseMessaging -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/GoogleToolboxForMac -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/JDStatusBarNotification -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/JGProgressHUD -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/JSQMessagesViewController -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/JSQSystemSoundPlayer -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/KeychainAccess -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/Kingfisher -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/Layout -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/LogglyLogger-CocoaLumberjack -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/PINCache -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/PINOperation -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/PINRemoteImage-Core-PINCache-iOS -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/PINRemoteImage.default-Core -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/PNChart -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/PaperTrailLumberjack -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/PersistentStreamPlayer -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/PromiseKit -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/Protobuf -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/PubNub -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/SAMKeychain -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/SnapKit -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/SwiftyStoreKit -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/TPCircularBuffer -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/TTTAttributedLabel -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/Texture -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/Tweaks -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/UICollectionViewLeftAlignedLayout -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/UICountingLabel -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/UIFloatLabelTextField -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/UIImageViewModeScaleAspect -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/YYText -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/iRate -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/nanopb -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/pop -F/Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/zipzap-iOS -F/Users/kaspik/Documents/Vyvoj/STRV/dojo-behavior/Pods/Crashlytics/iOS -F/Users/kaspik/Documents/Vyvoj/STRV/dojo-behavior/Pods/Fabric/iOS -F/Users/kaspik/Documents/Vyvoj/STRV/dojo-behavior/Pods/FirebaseAnalytics/Frameworks -F/Users/kaspik/Documents/Vyvoj/STRV/dojo-behavior/Pods/FirebaseInstanceID/Frameworks -F/Users/kaspik/Documents/Vyvoj/STRV/dojo-behavior/Vendor -F/Users/kaspik/Documents/Vyvoj/STRV/dojo-behavior -filelist /Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Intermediates.noindex/ClassDojo.build/Testing-iphonesimulator/ClassDojo.build/Objects-normal/x86_64/ClassDojo.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=9.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Intermediates.noindex/ClassDojo.build/Testing-iphonesimulator/ClassDojo.build/Objects-normal/x86_64/ClassDojo_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Intermediates.noindex/ClassDojo.build/Testing-iphonesimulator/ClassDojo.build/Objects-normal/x86_64/ClassDojo.swiftmodule -ObjC -lc++ -lsqlite3 -lz -framework AFNetworking -framework AMPopTip -framework AsyncDisplayKit -framework Bolts -framework CDDesignSystem -framework CocoaAsyncSocket -framework CocoaLumberjack -framework Crashlytics -framework DeviceUtil -framework EFCountingLabel -framework EZAudio -framework FBSDKCoreKit -framework FLAnimatedImage -framework Fabric -framework FirebaseAnalytics -framework FirebaseCore -framework FirebaseCoreDiagnostics -framework FirebaseInstanceID -framework FirebaseMessaging -framework FirebaseNanoPB -framework Foundation -framework GoogleToolboxForMac -framework JDStatusBarNotification -framework JGProgressHUD -framework JSQMessagesViewController -framework JSQSystemSoundPlayer -framework KeychainAccess -framework Kingfisher -framework Layout -framework LogglyLogger_CocoaLumberjack -framework PINCache -framework PINOperation -framework PINRemoteImage -framework PNChart -framework PaperTrailLumberjack -framework PersistentStreamPlayer -framework PromiseKit -framework Protobuf -framework PubNub -framework SAMKeychain -framework Security -framework SnapKit -framework StoreKit -framework SwiftyStoreKit -framework SystemConfiguration -framework TPCircularBuffer -framework TTTAttributedLabel -framework Tweaks -framework UICollectionViewLeftAlignedLayout -framework UICountingLabel -framework UIFloatLabelTextField -framework UIImageViewModeScaleAspect -framework UIKit -framework YYText -framework iRate -framework nanopb -framework pop -framework zipzap -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Intermediates.noindex/ClassDojo.build/Testing-iphonesimulator/ClassDojo.build/ClassDojo.app-Simulated.xcent -framework AVFoundation -framework AdSupport -weak_framework UserNotifications -framework Photos -framework Crashlytics -framework Fabric -lsqlite3 -framework AddressBook -framework Social -framework Accounts -framework SystemConfiguration -framework Security -framework MobileCoreServices -framework CoreLocation -framework CFNetwork -framework AudioToolbox -framework UIKit -framework StoreKit -framework CoreFoundation -framework QuartzCore -lz -framework CoreGraphics -framework CoreData -framework Foundation -framework Pods_ClassDojo -Xlinker -dependency_info -Xlinker /Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Intermediates.noindex/ClassDojo.build/Testing-iphonesimulator/ClassDojo.build/Objects-normal/x86_64/ClassDojo_dependency_info.dat -o /Users/kaspik/Library/Developer/Xcode/DerivedData/ClassDojo-atbalbdthvzlqngvkcwmnjpzninu/Build/Products/Testing-iphonesimulator/ClassDojo.app/ClassDojo

ld: framework not found AsyncDisplayKit
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Mainly issue - ld: framework not found AsyncDisplayKit. I'm not sure what's wrong / what's happening here as my Podfile setup looks okay and works last years without any change (Podfile included below).

  1. Thread-local storage in Texture when running tests on multiple simulators
    Thread-local storage is not supported for the current target - for example on ASLayoutElement.mm - static _Thread_local __unsafe_unretained ASLayoutElementContext *tls_context;

Is this because of iOS 9 support? I get it that it's probably related to 32bit simulators, but is it somehow possible to disable them? (only active arch is set to true - more info below). I get this error even when building tests for iPhone X.

Simplified podfile:

target 'ClassDojo' do
    
    pod 'Texture', '~> 2.7'
    
    target 'ClassDojo Unit Tests' do
        inherit! :complete
        pod 'OHHTTPStubs/Swift'
        pod 'FBSnapshotTestCase'
    end
    
    target 'ClassDojo UI Tests' do
        inherit! :complete
    end
end

post_install do |installer_representation|
    installer_representation.pods_project.targets.each do |target|
        
        if target.name == "Tweaks"
            target.build_configurations.each do |config|
                config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', 'FB_TWEAK_ENABLED=1']
            end
        end
        
        if target.name == "Texture" then
            target.build_configurations.each do |configuration|
                if configuration.name.include?("Debug") then
                    configuration.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
                end
            end
        end
    end
end

Actually the trick with ONLY_ACTIVE_ARCH if from #873 but still it didn't help.

  1. My last question is - are you going to rename the framework on CocoaPods to Texture? Right now it's confusing that the pod is Texture but framework in Pods is AsyncDisplaKit and is still AsyncDisplayKit as module in build settings.

I'm aware that XCode 10 is early beta but still I wanted to submit this so you all are aware of that if it's an issue.
Thank you for all your help if you have any ideas! :)

@Kaspik Kaspik changed the title Thread-local storage is not supported for the current target + Framework name Thread-local storage is not supported for the current target + AsyncDisplayKit Framework name Jun 15, 2018
@dox-mark
Copy link

dox-mark commented Jun 21, 2018

I'm getting issue 2 Thread-local storage is not supported for the current target if I build with Texture 2.7 on my tests target as well. Using Xcode 9.4.1.

@dox-mark
Copy link

Adding configuration.build_settings['ONLY_ACTIVE_ARCH'] = 'YES' to the pod file did fix my error with thread local storage.

@YanisSOTO
Copy link

Any update about the issue ? Dox-mark's solution doesn't work for me.

@PatrickSCLin
Copy link

Dox-mark's solution works for me~

@Kaspik
Copy link
Contributor Author

Kaspik commented Jul 2, 2018

That's great, but answer or at least any activity from Texture guys would be more appreciated.

What about you guys, @maicki, @appleguy any ideas or plans/roadmaps?

@Kaspik
Copy link
Contributor Author

Kaspik commented Jul 9, 2018

Any update?

@maicki
Copy link
Contributor

maicki commented Jul 9, 2018

cc @Adlai-Holler - Any idea how we could resolve this from the framework side?

@Kaspik
Copy link
Contributor Author

Kaspik commented Jul 23, 2018

@Adlai-Holler Thanks for taking care of th32-bit simulator issue!
Can we also help somehow with 3) that is related to 1) - AsyncDisplayKit vs Texture naming in core of the framework + CocoaPods?

@maicki
Copy link
Contributor

maicki commented Jul 23, 2018

@Kaspik You mind filing a new issue for that. This would have some wider consequences like every code need to change due to that and therefore I think needs some more discussion.

I will close this issue for now as it was mainly related to the thread local issue.

@Kaspik
Copy link
Contributor Author

Kaspik commented Jul 23, 2018

@maicki Yup, done - #1045

@irodrigo17
Copy link

irodrigo17 commented Aug 7, 2018

Hey guys, any updates on this? Every time I run pod install the build breaks for me because of this error.
I think it's also related to the fact that CocoaPods is not using the recommended Xcode project settings when creating the Pods project as described here: CocoaPods/CocoaPods#7206
Any updates would be very much appreciated, the workaround didn't work for me.
Also this is not fixed by #1045 AFAIK.

@mjjimenez
Copy link

@irodrigo17 it's fixed in #1025 not #1045. There's just no release yet. Point your pod installation to master branch. Don't do the work around using Build Active Architecture. That only works on debug build and not release.

@irodrigo17
Copy link

Oh, cool! I missed the other PR, thanks @mjjimenez! 👍

@diederikh
Copy link

Any update on this? When will #1025 be included in a release?

@Stree7
Copy link

Stree7 commented Feb 26, 2019

I correct this issue by the following steps: Remove all pod related files except podfile, then restart 'pod install' , and run again.

@Adlai-Holler
Copy link
Member

Fix released in 2.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants