-
Notifications
You must be signed in to change notification settings - Fork 336
Carthage + Xcode 10 beta 3 fails to compile the framework #246
Comments
Same thing here! |
@uson1x - Thanks for adding a test project. That helps us immensely with resolving these issues. I've got some stuff on my plate, but I'll do my best to resolve asap. Also, if anyone else finds a solution, feel free to submit a PR. |
Coming around a bit late, but have you tried compiling the frameworks with Swift 4.0 or 4.1 ? It solved a similar problem for me |
I've run into the same issue. I'm using Xcode beta 5 (
Is there any known work around? |
Try changing the SWIFT_VERSION in the build settings of the facebook projects to 4.0 or 4.1. in 4.2, |
I'm having the same issue. The following line is what is causing the issue: Checkouts/facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit.xcodeproj/project.pbxproj:2541
I also found the following, but I don't get to it yet: Checkouts/Facebook-SDK-Swift/Carthage/Checkouts/facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit.xcodeproj/project.pbxproj:2391
|
Hi @codisms, I also noticed that the problem is in a script that runs as a build phase in the Did you come up with some workaround for this? |
@leobarrospereira I have not yet found a workaround. The issue is that facebook-ios-sdk is not compatible with Bolts-ObjC 1.9.0. The output directory has changed from "ios" to "iphoneos". So I think this line needs to be changed: |
@codisms - Thanks for this diagnosis. I'm going to close this issue for now, as this appears to be an issue with the ObjC SDK. |
I was able to work around this (and another issue I ran into) executing the following. (Yuck!)
|
I can confirm that on Beta 5 it still doesn't work. Any workaround suggested ? |
Hi @vitorhugomagalhaes, this is the workaround that I did to build the Facebook library with Carthage and to be able to build my app:
I hope it can help you too. |
any suggestions on best way to get this done asap? |
@Nonnus - I'm personally working to resolve the issues described. Although bugs with the Objective-C SDK are directed to the external bugs tool, all three SDKs accept pull requests. If you submit pull requests from your 3 forked repos, I'll examine them all asap. |
@codytwinton thats great news! thanks a lot for your fast input :) ps: i am very intrigued about this issue regarding |
Absolutely! Thanks for working with us on this. |
just for reference, bolts builds fine by itself when i run carthage directly, |
@codytwinton prs created (only 2 as the only changes i did to |
@Nonnus - Thank you so much! We had an issue with the latest iOS SDK release where PRs were accidentally reverted on release. I'm going to do some internal investigation and/or resolution of that issue, then I'll work to accept the facebook-ios-sdk PR. I'm going to leave the Bolts PR to Nikita. |
I think it's pretty likely that Xcode 10 will ship alongside macOS 10.14 towards the end of September—hopefully we can get an official solution by then. I've yet to get this library built with Xcode 10 (it started with that Carthage archive issue). I'm currently running Xcode 10 beta 6 on macOS 10.13.6. I've tried running $ xcode-select --print-path
/Applications/Xcode-beta.app/Contents/Developer
$ carthage build --platform iOS
*** xcodebuild output can be found in /var/folders/qr/yc93hcdn05bb2q615s9z_1440000gn/T/carthage-xcodebuild.rxJdrg.log
*** Building scheme "Bolts-iOS" in Bolts.xcodeproj
*** Building scheme "Bolts-iOS-Dynamic" in Bolts.xcodeproj
*** Building scheme "FBSDKCoreKit-Dynamic" in FacebookSDK.xcworkspace
*** Building scheme "FBSDKCoreKit-Universal" in FacebookSDK.xcworkspace
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -workspace /Users/jacob/workspace/fundu-ios/Carthage/Checkouts/facebook-ios-sdk/FacebookSDK.xcworkspace -scheme FBSDKCoreKit-Universal -configuration Release -derivedDataPath /Users/jacob/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10L232m/facebook-ios-sdk/sdk-version-4.35.0 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/qr/yc93hcdn05bb2q615s9z_1440000gn/T/facebook-ios-sdk SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/jacob/workspace/fundu-ios/Carthage/Checkouts/facebook-ios-sdk)
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/qr/yc93hcdn05bb2q615s9z_1440000gn/T/carthage-xcodebuild.rxJdrg.log
The changes I made are: $ git diff
diff --git a/Carthage/Checkouts/Bolts-ObjC/scripts/build_framework.sh b/Carthage/Checkouts/Bolts-ObjC/scripts/build_framework.sh
index b7534aa..385ab6e 100755
--- a/Carthage/Checkouts/Bolts-ObjC/scripts/build_framework.sh
+++ b/Carthage/Checkouts/Bolts-ObjC/scripts/build_framework.sh
@@ -120,7 +120,6 @@ function xcode_build_target() {
-configuration "${2}" \
SYMROOT="$BOLTS_BUILD" \
CURRENT_PROJECT_VERSION="$BOLTS_VERSION_FULL" \
- clean build \
|| die "Xcode build failed for platform: ${1}."
}
diff --git a/Carthage/Checkouts/facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit.xcodeproj/project.pbxproj b/Carthage/Checkouts/facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit.xcodeproj/project.pbxproj
index 512b756..66b6541 100644
--- a/Carthage/Checkouts/facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit.xcodeproj/project.pbxproj
+++ b/Carthage/Checkouts/facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit.xcodeproj/project.pbxproj
@@ -2538,7 +2538,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "rm -rf ../Bolts-IOS/build/ ../build/Bolts.framework\n../Bolts-IOS/scripts/build_framework.sh -c Release\ncp -R ../Bolts-IOS/build/ios/Bolts.framework ../build/\n";
+ shellScript = "rm -rf ../Bolts-IOS/build/ ../build/Bolts.framework\n../Bolts-IOS/scripts/build_framework.sh -c Release\ncp -R ../Bolts-IOS/build/Release-iphonesimulator/Bolts.framework ../build/\n";
};
9D6DEEFD1BC2E546001A94ED /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
diff --git a/Carthage/Checkouts/facebook-ios-sdk/scripts/build-universal-framework.sh b/Carthage/Checkouts/facebook-ios-sdk/scripts/build-universal-framework.sh
index 645a7ca..7c8fc3b 100755
--- a/Carthage/Checkouts/facebook-ios-sdk/scripts/build-universal-framework.sh
+++ b/Carthage/Checkouts/facebook-ios-sdk/scripts/build-universal-framework.sh
@@ -7,8 +7,8 @@ mkdir -p "${UNIVERSAL_OUTPUT_FOLDER}"
rm -rf "${UNIVERSAL_OUTPUT_FOLDER}/${PROJECT_NAME}.framework"
# Step 1. Build Device and Simulator versions
-xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
-xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphonesimulator BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
+xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}"
+xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphonesimulator BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}"
# Step 2. Copy the framework structure to the universal folder
cp -R "${BUILD_DIR}/${CONFIGURATION}-iphoneos/${PROJECT_NAME}.framework" "${UNIVERSAL_OUTPUT_FOLDER}/"
diff --git a/Carthage/Checkouts/facebook-ios-sdk/scripts/build_framework.sh b/Carthage/Checkouts/facebook-ios-sdk/scripts/build_framework.sh
index 8c85d45..71f26a7 100755
--- a/Carthage/Checkouts/facebook-ios-sdk/scripts/build_framework.sh
+++ b/Carthage/Checkouts/facebook-ios-sdk/scripts/build_framework.sh
@@ -71,7 +71,7 @@ test -d "$FB_SDK_BUILD" \
|| die "Could not create directory $FB_SDK_BUILD"
cd "$FB_SDK_ROOT"
-(xcodebuild -workspace "${FB_SDK_ROOT}"/FacebookSDK.xcworkspace -scheme "${SCHEME}" -configuration "${BUILDCONFIGURATION}" clean build) || die "Failed to build"
+(xcodebuild -workspace "${FB_SDK_ROOT}"/FacebookSDK.xcworkspace -scheme "${SCHEME}" -configuration "${BUILDCONFIGURATION}") || die "Failed to build"
# -----------------------------------------------------------------------------
# Run unit tests There's a pretty high chance I'm doing something wrong here… |
@jemartti I'm using hellofresh fork and it seems to work just fine. |
Okay, I got I notice The app appears to build fine but crashes on startup:
Any hints? |
@maclacerda 0.29 doesn't build on Xcode 10 afaik, so if you didn't build it with Xcode 9 previously you're out of luck now, since it seems Homebrew won't let you use an old version of Xcode. It sounds like @7Dman was running into the same thing I was here. |
@chansen22 Thank you for the additional explanation,. Yes I was building on Xcode 10 and was into the same problem as you mentioned. |
I am still having issue with it now in tvOS. I have the below set up in Cartfile, last 2 specify the tag or branch so it catches the latest fixes:
it doesn't work with Carthage 0.29.0 or 0.31.0. I get the below message:
with --platform iOS
|
So still no update on this issue ? |
up |
Can we get an update on the progress of this issue? |
Anyone? I really wish commenting on an issue "bumped" it in Github. This is a pretty serious issue if people can't even install the SDK. |
The ObjC side issue has been already solved on master but not released yet.
Note: Make sure to install Carthage 0.31.0 or later. |
I made a fork with an updated Cartfile with the working versions, you can use it by now, but as @chuganzy says its better to wait for the official releases.
maybe its useful for you guys as a temporary solution. @mark-r2r |
cheers @pkarc This currently works (note: i'm using
The docs don't tell you that you also need to include |
@mtfourregp I feel like I've been waiting for this update forever. I think it would be great if we can get to know AT LEAST around when it's done. I hate to do this but I might have to use cocoapods to install this SDK although I haven't confirmed if it works perfectly with cocoapods. |
It's Facebook, they don't have enough developers. |
Hey Everyone, I'm sorry this remains an issue. We're a small team working on the SDKs and we're doing our best to resolve every issue that comes up. I'll do my best to resolve this in the near future. |
Is there any other way to get it work without Carthage? I'm going to production next week and the client needs FB login :/ |
@artuan For now you can use Xcode 9.4.1 and Swift 4.1 and go to production. Switch tool chain to Swift 4.1 to make Carthage work. |
It's all fine and well to say that there is but a small team working on the SDKs but really, folks, this has been out there in beta since June. This same thing happened to us last year, when the Xcode 9 upgrades weren't done in a timeley manner. I have a product to get out, this does not reflect well on the platform and with my management. |
Hey Everyone, My solution was to download the SDK and add it to my repo. It's not perfect but the show must go on :) Thanks, |
hey guys, how's possible this issue is still happening after months and months? I got a new laptop and now I'm wasting hours again. It's incredible. It's not just a bug in bolts or typos in released code. It seems more like a bigger issue at facebook management and engineers about not caring. Maybe they want to make it really difficult for other engineers to use their sdk for some reason? It's unbelievable. Unfortunately the quick solution is to disable non maintainable dangerous code from our app until this is fixed. It means leaving only google + twitter as login options. If things continue in this direction my guess is that they will be discontinuing facebook login sometime in the future, so why waste time on this? |
@codytwinton hey there. If that's possible, could you please tell us around when you guys will fix this issue? Is that gonna be in a few weeks, a few months or next year? It might be hard to tell us exact date but I'm sure all of us have been waiting for this update for a while and want to know a rough standard. Thank you in advance. |
@7Dman - I believe I've tracked down the underlying issue. Got an internal diff submitted that should land shortly. In process of testing. Should hopefully have a fix landed for this by tomorrow, but should be fixed by next week at the latest. |
@codytwinton just tested on my end, worked great! |
Hm trying it now and it comes further than before but seems to fail at the finish line.
Im using latest Xcode and carthage 0.31.0 |
@lemonandlime - This appears to be an issue with swiftlint configuration. Please open a new issue for this and we'll address it asap. |
Thank you!! |
Hi
When I'm trying to compile the framework using carthage v0.30.1 and Xcode 10 beta 3 Command Line Tools I see this error:
Happens every time, even on a fresh project.
Seems like the Bolts.framework is indeed not there in the directory it is searching in.
Empty test project I quickly made to demonstrate the issue: https://github.com/uson1x/facebook-sdk-swift-test
Would appreciate any hints on how to fix this Xcode beta behavior!
The text was updated successfully, but these errors were encountered: