Open peterlendvay opened 3 years ago
When executing:
xcodebuild -project /Users/myusername/Workspace/<project_folder>/_Prebuild/Pods.xcodeproj -target RxSwift -target Swinject -target Realm -target RealmSwift -target RxRelay -target Alamofire -target CryptoSwift -target Curve25519Kit -target OHHTTPStubs -target RxAlamofire -target RxCocoa -target RxRealm -target RxSwiftExt -target ClusterKit -target Differentiator -target FirebaseCore -target FirebaseCoreDiagnostics -target FirebaseInstallations -target GoogleDataTransport -target GoogleUtilities -target PromisesObjC -target RxDataSources -target RxWebKit -target SideMenu -target ZXingObjC -target lottie-ios -target nanopb -target Bagel -target CocoaAsyncSocket -target FirebaseInstanceID -target FirebaseMessaging -target IQKeyboardManagerSwift -target RxGesture -target Nimble -target SwiftyMocky -target RxBlocking -target RxTest -configuration Debug -sdk iphonesimulator -destination "generic/platform=iOS Simulator" ARCHS=x86_64 ONLY_ACTIVE_ARCH=NO build 2>&1
I receive this error:
PhaseScriptExecution [CP]\ Copy\ XCFrameworks /Users/myusername/Workspace/<project_folder>/build/Pods.build/Debug-iphonesimulator/Realm.build/Script-09B3CC1BE888023438D24E0BDEE9A40E.sh (in target 'Realm' from project 'Pods')
cd /Users/myusername/Workspace/<project_folder>/_Prebuild
/bin/sh -c /Users/myusername/Workspace/<project_folder>/build/Pods.build/Debug-iphonesimulator/Realm.build/Script-09B3CC1BE888023438D24E0BDEE9A40E.sh
/Users/myusername/Workspace/<project_folder>/build/Pods.build/Debug-iphonesimulator/Realm.build/Script-09B3CC1BE888023438D24E0BDEE9A40E.sh: line 2: /Target Support Files/Realm/Realm-xcframeworks.sh: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code
ProcessInfoPlistFile /Users/myusername/Workspace/<project_folder>/build/Debug-iphonesimulator/Realm.framework/Info.plist /Users/myusername/Workspace/<project_folder>/_Prebuild/Target\ Support\ Files/Realm/Realm-Info.plist (in target 'Realm' from project 'Pods')
cd /Users/myusername/Workspace/<project_folder>/_Prebuild
builtin-infoPlistUtility /Users/myusername/Workspace/<project_folder>/_Prebuild/Target\ Support\ Files/Realm/Realm-Info.plist -producttype com.apple.product-type.framework -expandbuildsettings -format binary -platform iphonesimulator -o /Users/myusername/Workspace/<project_folder>/build/Debug-iphonesimulator/Realm.framework/Info.plist
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution [CP]\ Copy\ XCFrameworks /Users/myusername/Workspace/<project_folder>/build/Pods.build/Debug-iphonesimulator/Realm.build/Script-09B3CC1BE888023438D24E0BDEE9A40E.sh
(1 failure)
Setting Realm to non binary seems to fix this issue, but brings in other problems:
> Linking nanopb
> Touching nanopb.framework (in target 'nanopb' from project 'Pods')
> Copying GoogleDataTransport-umbrella.h
> Copying GoogleDataTransport.h
> Copying GDTCORTransport.h
> Copying GDTCORTargets.h
> Copying GDTCOREventTransformer.h
> Copying GDTCOREventDataObject.h
> Copying GDTCOREvent.h
> Copying GDTCORConsoleLogger.h
> Copying GDTCOREndpoints.h
> Copying GDTCORClock.h
> Processing GoogleDataTransport-Info.plist
> Compiling GDTCORStorageEventSelector.m
[x] /Users/myusername/Workspace/<project_folder>/_Prebuild/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORStorageEventSelector.m:17:9: 'GoogleDataTransport/GDTCORLibrary/Internal/GDTCORStorageEventSelector.h' file not found
#import "GoogleDataTransport/GDTCORLibrary/Internal/GDTCORStorageEventSelector.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Compiling GDTCORReachability.m
[x] /Users/myusername/Workspace/<project_folder>/_Prebuild/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORReachability.m:17:9: 'GoogleDataTransport/GDTCORLibrary/Internal/GDTCORReachability.h' file not found
#import "GoogleDataTransport/GDTCORLibrary/Internal/GDTCORReachability.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Compiling GoogleDataTransport-dummy.m
> Compiling GDTCORUploadCoordinator.m
[x] /Users/myusername/Workspace/<project_folder>/_Prebuild/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORUploadCoordinator.m:17:9: 'GoogleDataTransport/GDTCORLibrary/Private/GDTCORUploadCoordinator.h' file not found
#import "GoogleDataTransport/GDTCORLibrary/Private/GDTCORUploadCoordinator.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Compiling GDTCORRegistrar.m
[x] /Users/myusername/Workspace/<project_folder>/_Prebuild/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORRegistrar.m:17:9: 'GoogleDataTransport/GDTCORLibrary/Internal/GDTCORRegistrar.h' file not found
#import "GoogleDataTransport/GDTCORLibrary/Internal/GDTCORRegistrar.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Compiling GDTCORTransformer.m
[x] /Users/myusername/Workspace/<project_folder>/_Prebuild/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORTransformer.m:17:9: 'GoogleDataTransport/GDTCORLibrary/Private/GDTCORTransformer.h' file not found
#import "GoogleDataTransport/GDTCORLibrary/Private/GDTCORTransformer.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Compiling GDTCORPlatform.m
[x] /Users/myusername/Workspace/<project_folder>/_Prebuild/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORPlatform.m:17:9: 'GoogleDataTransport/GDTCORLibrary/Internal/GDTCORPlatform.h' file not found
#import "GoogleDataTransport/GDTCORLibrary/Internal/GDTCORPlatform.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Compiling GDTCORTransport.m
[x] /Users/myusername/Workspace/<project_folder>/_Prebuild/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORTransport.m:17:9: 'GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCORTransport.h' file not found
#import "GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCORTransport.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Compiling cct.nanopb.c
[x] /Users/myusername/Workspace/<project_folder>/_Prebuild/GoogleDataTransport/GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.c:20:10: 'GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.h' file not found
#include "GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Compiling GDTCORLifecycle.m
[x] /Users/myusername/Workspace/<project_folder>/_Prebuild/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORLifecycle.m:17:9: 'GoogleDataTransport/GDTCORLibrary/Internal/GDTCORLifecycle.h' file not found
#import "GoogleDataTransport/GDTCORLibrary/Internal/GDTCORLifecycle.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Compiling GDTCORFlatFileStorage.m
> Compiling GoogleDataTransport_vers.c
I had the same problem after the Realm build failed. Clearing all Cocoapods data & DerivedData resolved this:
rm -rf ~/Library/Caches/CocoaPods Pods ~/Library/Developer/Xcode/DerivedData/*
Thanks @savage7, but I'm still facing the same issue after clearing both DerivedData and Cocoapods cache folder.
Is this library actively supported? @trinhngocthuyen
Sorry for the late response.
Regarding the problems in which some headers are not found, @savage7 was correct.
The issue should be fixed in https://github.com/grab/cocoapods-binary-cache/commit/b1896f30fe90c9660362d7a3361ed2cdbcc1d46b. But removing cocoapods cache is still needed, but just once. You can either run rm -rf <path/to/cache>
or pod cache clean --all
Hello!
Having a similar issue after installing latest version 0.1.13
, clearing DerivedData
and the pod cache.
Configured Podfile
like so:
plugin "cocoapods-binary-cache"
config_cocoapods_binary_cache(
cache_repo: {
"default" => {
# "remote" => "git@cache_repo.git",
"local" => "~/.cocoapods-binary-cache/prebuilt-frameworks"
}
},
prebuild_config: "Debug"
)
And the output of prebuild
:
[x] [...]/_Prebuild/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKCoreKit+Internal.h:119:11: '../AppEvents/Internal/AAM/FBSDKMetadataIndexer.h' file not found
#import "../AppEvents/Internal/AAM/FBSDKMetadataIndexer.h"
^
> Compiling FBSDKWebDialogView.m
[x] [...]/_Prebuild/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKCoreKit+Internal.h:119:11: '../AppEvents/Internal/AAM/FBSDKMetadataIndexer.h' file not found
#import "../AppEvents/Internal/AAM/FBSDKMetadataIndexer.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Compiling _FBSDKTemporaryErrorRecoveryAttempter.m
> Compiling FBSDKWebDialog.m
> Compiling FBSDKViewImpressionTracker.m
[x] [...]/_Prebuild/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKCoreKit+Internal.h:119:11: '../AppEvents/Internal/AAM/FBSDKMetadataIndexer.h' file not found
#import "../AppEvents/Internal/AAM/FBSDKMetadataIndexer.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Compiling FBSDKViewHierarchy.m
[x] [...]/_Prebuild/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKCoreKit+Internal.h:119:11: '../AppEvents/Internal/AAM/FBSDKMetadataIndexer.h' file not found
#import "../AppEvents/Internal/AAM/FBSDKMetadataIndexer.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Compiling FBSDKUtility.m
[x] [...]/_Prebuild/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKCoreKit+Internal.h:119:11: '../AppEvents/Internal/AAM/FBSDKMetadataIndexer.h' file not found
#import "../AppEvents/Internal/AAM/FBSDKMetadataIndexer.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@devmea Sorry, 0.1.13 does not include the above commit (https://github.com/grab/cocoapods-binary-cache/commit/b1896f30fe90c9660362d7a3361ed2cdbcc1d46b). The release 0.1.14 should include this change.
Thanks @trinhngocthuyen!
My bad! Installed 0.1.14
and went through the same steps, but the error persists.
Because I don't have a cache repo, I run bundle exec pod binary prebuild
directly.
❯❯❯ Step: Fetching cache
You're using local cache at: [...]/.cocoapods-binary-cache/prebuilt-frameworks.
To enable remote cache (with a git repo), add the `remote` field to the repo config in the `cache_repo` option.
For more details, check out this doc:
https://github.com/grab/cocoapods-binary-cache/blob/master/docs/configure_cocoapods_binary_cache.md#cache_repo-
Unzipping cache: [...]/.cocoapods-binary-cache/prebuilt-frameworks -> _Prebuild
❯❯❯ Step: Installation
-----------------------------------------
🚀 Prebuild frameworks
-----------------------------------------
Detect implicit dependencies
Exclude pods with empty source files: ["Firebase", "FirebaseAnalytics", ...]
Validate prebuilt cache
Cache validation: hit (0) []
Prebuilding...
Installing Alamofire (4.9.1)
[...]
Prebuild frameworks (total 0): []
No changes in prebuild
Pod installation complete! There are 42 dependencies from the Podfile and 65 total pods installed.
-----------------------------------------
🤖 Resume pod installation
-----------------------------------------
Installing Alamofire (4.9.1)
[...]
Diagnosing cocoapods-binary-cache
Pod installation complete! There are 42 dependencies from the Podfile and 65 total pods installed.
Then, I run the command again so the prebuild process takes place. It validates the cache and prebuilds the frameworks. This is the step that fails with the error I posted above.
Regular pod install
(without the plugin) works, the project builds in Xcode, and runs successfully.
I checked the docs, but maybe I'm missing something? For instance, why doesn't it prebuilds the first time?
Checklist
Issue Description
Command executed
What went wrong?
Stack trace
Environment
Plugin version
Installed CocoaPods plugins