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

[Carthage]: Not able to install through Carthage #1192

Open
ankitagarwal007 opened this issue Oct 29, 2020 · 10 comments
Open

[Carthage]: Not able to install through Carthage #1192

ankitagarwal007 opened this issue Oct 29, 2020 · 10 comments

Comments

@ankitagarwal007
Copy link

As cocoalumberjack has set its minimum deployment target to 9.0 but xmppframework has still set its minimum deployment target to 8.0 fresh installing is failing.

XMPPBookmarksModule.swift:14:12: error: compiling for iOS 8.0, but module 'CocoaLumberjackSwift' has a minimum deployment target of iOS 9.0

@chaurasiyadilip
Copy link

I am also facing same problem. I get the following error

*** Fetching XMPPFramework
*** Fetching CocoaLumberjack
*** Fetching KissXML
*** Fetching CocoaAsyncSocket
*** Fetching libidn-framework
*** Checking out CocoaLumberjack at "3.7.0"
*** Checking out libidn-framework at "1.35"
*** Checking out KissXML at "5.3.2"
*** Checking out CocoaAsyncSocket at "7.6.4"
*** Checking out XMPPFramework at "4.0.0"
*** xcodebuild output can be found in /var/folders/q1/mkvxk_9n7r1812whx8qx124r0000gn/T/carthage-xcodebuild.Lfpfjg.log
*** Downloading CocoaAsyncSocket.framework binary at "Version 7.6.4"
*** Downloading libidn-framework.framework binary at "Version 1.35"
*** Building scheme "CocoaLumberjack" in Demos.xcworkspace
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -workspace /Users/dilipchaurasiya/Documents/Test3/Carthage/Checkouts/CocoaLumberjack/Demos/Demos.xcworkspace -scheme CocoaLumberjack -configuration Release -derivedDataPath /Users/dilipchaurasiya/Library/Caches/org.carthage.CarthageKit/DerivedData/11.5_11E608c/CocoaLumberjack/3.7.0 ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/q1/mkvxk_9n7r1812whx8qx124r0000gn/T/CocoaLumberjack SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/dilipchaurasiya/Documents/Test3/Carthage/Checkouts/CocoaLumberjack)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/q1/mkvxk_9n7r1812whx8qx124r0000gn/T/carthage-xcodebuild.Lfpfjg.log

In log file following error is mentioned

** ARCHIVE FAILED **

The following build commands failed:
CompileC /Users/dilipchaurasiya/Library/Caches/org.carthage.CarthageKit/DerivedData/11.5_11E608c/CocoaLumberjack/3.7.0/Build/Intermediates.noindex/ArchiveIntermediates/CocoaLumberjack/IntermediateBuildFilesPath/Lumberjack.build/Release/CocoaLumberjack.build/Objects-normal/x86_64/DDFileLogger+Buffering.o /Users/dilipchaurasiya/Documents/Test3/Carthage/Checkouts/CocoaLumberjack/Sources/CocoaLumberjack/Extensions/DDFileLogger+Buffering.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/dilipchaurasiya/Library/Caches/org.carthage.CarthageKit/DerivedData/11.5_11E608c/CocoaLumberjack/3.7.0/Build/Intermediates.noindex/ArchiveIntermediates/CocoaLumberjack/IntermediateBuildFilesPath/Lumberjack.build/Release/CocoaLumberjack.build/Objects-normal/x86_64/DDOSLogger.o /Users/dilipchaurasiya/Documents/Test3/Carthage/Checkouts/CocoaLumberjack/Sources/CocoaLumberjack/DDOSLogger.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)

@pixelskull
Copy link

same over here, is there a known way to fix. Have to finish my project very soon (tm)

@AlTavares
Copy link

AlTavares commented Dec 8, 2020

As a workaround you can use this script

# carthage.sh
# Usage example: ./carthage.sh build --platform iOS

set -euo pipefail

xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT

echo 'IPHONEOS_DEPLOYMENT_TARGET = 9.0' >> $xcconfig

export XCODE_XCCONFIG_FILE="$xcconfig"
carthage "$@"

Save it as carthage.sh and run chmod +x carthage.sh

then you can use ./carthage.sh bootstrap/build/update

The script is based on this documentation here https://github.com/Carthage/Carthage/blob/master/Documentation/Xcode12Workaround.md

@ankitagarwal007
Copy link
Author

@AlTavares This script is to fix the issue of carthage for xcode>12. But here the issue is in your framework as mentioned above. You have to release an update with minimum deployment target set to ios 9.0

@AlTavares
Copy link

The script I made was based on the one that fixes the issues on Xcode 12, it's not the same.
Mine will change the deployment target for all the dependencies to the one set, in your case, 9.0

@infostans823
Copy link

infostans823 commented Oct 14, 2021

:0: error: compiling for iOS 8.0, but module 'CocoaLumberjack' has a minimum deployment target of iOS 9.0: /Users/amutechnologies/Library/Developer/Xcode/DerivedData/Runner-alewopaxiyghwdffvdabzyaseepd/Build/Products/Debug-iphonesimulator/CocoaLumberjack/CocoaLumberjack.framework/Modules/CocoaLumberjack.swiftmodule/x86_64-apple-ios-simulator.swiftmodule

Screenshot 2021-10-14 at 4 00 27 PM

Please advice what can i do for build xcode version 12.4

@vitalyster
Copy link
Contributor

You can bump target platform version for each pod in your Podfile, like this:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
    end
  end

@vitalyster
Copy link
Contributor

For Carthage issue you should use workaround mentioned before: #1192 (comment)

@haithngn
Copy link

@infostans823
Let's use this workaround repository, I will create a pull request later.
I also check tested the framework files, they work fine

github "Snapble/XMPPFramework" "master"

Screen Shot 2021-10-16 at 12 29 58 AM

@infostans823
Copy link

infostans823 commented Oct 18, 2021

You can bump target platform version for each pod in your Podfile, like this:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
    end
  end

Use this code but can't work i am using for flutter ios build in my pod file this pod installer code

post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
end

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

7 participants