Building Alamofire 1.3.1 using Carthage fails - xcode

I have been facing an issue that fails to build Alamofire using Carthage.
My environment is as follows :
OSX 10.10.5
Xcode 6.4
Also 7.0 and 7.1 are already installed.
Carthage 0.9.3
Trying to install Alamofire 1.3.1 (latest Swift 1.2 release)
I tried the command below then error occurs.
$ echo 'github "Alamofire/Alamofire" "1.3.1"' > Cartfile ; carthage update --platform ios
*** Cloning Alamofire
*** Checking out Alamofire at "1.3.1"
*** xcodebuild output can be found in /var/folders/ch/jcgf09f15hl391jn849d5yr80000gn/T/carthage-xcodebuild.ZM1b0b.log
*** Building scheme "Alamofire iOS" in Alamofire.xcworkspace
** BUILD FAILED **
The following build commands failed:
Ld /Users/username/Library/Developer/Xcode/DerivedData/Alamofire-fmnpbxqgrcncdhbtipavvywlxagy/Build/Intermediates/Alamofire.build/Release-iphoneos/Alamofire\ iOS.build/Objects-normal/arm64/Alamofire normal arm64
(1 failure)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
A shell task failed with exit code 65:
** BUILD FAILED **
The following build commands failed:
Ld /Users/username/Library/Developer/Xcode/DerivedData/Alamofire-fmnpbxqgrcncdhbtipavvywlxagy/Build/Intermediates/Alamofire.build/Release-iphoneos/Alamofire\ iOS.build/Objects-normal/arm64/Alamofire normal arm64
(1 failure)
Then I tried to build using Xcode.
Open Alamofire.xcworkspace and hit Cmd+B then fails with error below :
Xcode error image
I have never seen the warning Unable to find swiftCore; please set SWIFT_LIBRARY_PATH (currentry '') to the folder containing swiftCore
I think that this warning relates to the issue, but I don't know how to solve this one...
Are there any solutions?

Related

Library not found for -lAliyunOSSiOS when build in Xcode 13

The React Native 0.66.3 app on macOS Big Sur started to throw below when build in Xcode 13 yesterday without change I am aware of. The package is in app's package.json. Tried to yarn add and pod install a few times and the error remains.
Here is the module in package.json:
"aliyun-oss-react-native": "^1.0.0-alpha.7",
The module is under project's node-modules. Here is the build error in Xcode:
ld: library not found for -lAliyunOSSiOS
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Here is the module files listed under iOS of aliyun-oss-react-native :

React Native IOS build failed, linker command failed with exit code 1

I'm using Xcode 12.4 on Catalina 10.15.7 intel based chip. I created a sample react native project with this 'https://reactnative.dev/docs/environment-setup' and it build and ran perfectly.
Now after further working on the project I installed react native navigation and stack navigator and styled components and vector icon dependencies. Now I run into this issue. Plz help me to resolve this. Thanks.
error on Xcode build
ld: warning: directory not found for option '-L-L/Users/ahyanawaz/Library/Developer/Xcode/DerivedData/Store-bekhqxqflgsqtyheijdxkrbwrksk/Build/Products/Debug-iphonesimulator/CocoaAsyncSocket'
ld: library not found for -lCocoaAsyncSocket
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Maybe try npm install or yarn then cd ios && pod install

Xcode swift 3 cocoapods error

I am getting this error after installing a CocoaPod and I don't understand why:
Apple Mach-O Linker Error Group
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Can somebody give me an answer?
My guess is that you are using the Xcode Project (.xcodeproj) that you where using before.
When you install a pod, you need to use the Xcode Workspace (.xcworkspace) that CocoaPods automatically creates for you:

SDK version for building swift?

I am trying to build swift from the source (https://github.com/apple/swift). However, it throws an error when building PhaseScriptExecution. Here is the error message:
<unknown>:0: error: Swift does not support the SDK 'MacOSX10.11.sdk'
make: *** [/Users/yangwei/Git/build/Xcode-DebugAssert/swift-macosx-x86_64/stdlib/public/core/macosx/x86_64/Swift.o] Error 1
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution CMake\ Rules /Users/yangwei/Git/build/Xcode-DebugAssert/swift-macosx-x86_64/stdlib/public/core/Swift.build/Debug/add_custom_command_target-8e6e230f23a92c1cda79a3cf59140ab8-Swift.o.build/Script-4123DECAA170465EA6F4D9CC.sh
(1 failure)
It seems to be a problem related to SDK version. Can anyone tell me which SDK version I should use? and how can I downgrade to the version?
Thanks!
Update:
I noticed the version issue so I tried to checkout branch of swift-2.2 of swift and all other required projects. However, when I tried to build with command utils/build-script -x, it shows following error message:
make -f /Users/yangwei/Git/build/Xcode-DebugAssert/llvm-macosx-x86_64/CMakeScripts/ReRunCMake.make
make[1]: *** No rule to make target '/Users/yangwei/Git/llvm/lib/DebugInfo/CodeView/CMakeLists.txt', needed by '/Users/yangwei/Git/build/Xcode-DebugAssert/llvm-macosx-x86_64/CMakeFiles/cmake.check_cache'. Stop.
make: *** [/Users/yangwei/Git/build/Xcode-DebugAssert/llvm-macosx-x86_64/CMakeFiles/ZERO_CHECK] Error 2
Command /bin/sh failed with exit code 2
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution CMake\ Rules /Users/yangwei/Git/build/Xcode-DebugAssert/llvm-macosx-x86_64/LLVM.build/Debug/ZERO_CHECK.build/Script-80DAA73EAB654B0EA77D1AEF.sh
(1 failure)
utils/build-script: command terminated with a non-zero exit status 65, aborting
I think you need the new XCode 8 beta to build the latest Swift source.
Once installed, try:
sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer/

CocoaPods not installing Alamofire in Swift Parse Chat App

I am trying to compile and run the following application (Swift Chat App using Alamofire).
https://github.com/huyouare/SwiftParseChat
I am using ruby-2.0.0 , cocoapods 0.37.1, xcode 6.3, Alamofire 1.2.0
I am installing it using the normal <pod install> command. No errors or warnings during the process.
However, when compiling, I get:
No such Module 'Alamofire'
If I install Alamofire manually, however, when compiling I get an Apple Match-O Linker Error :
ld: warning: directory not found for option '-F/Users/cristian/Library/Developer/Xcode/DerivedData/SwiftParseChat-btvjczpwjlekftetblbfrbposakh/Build/Products/Debug-iphoneos/Pods'
ld: framework not found Pods
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What is behind this??
Thanks !
If everything is setup correctly, errors such as
No such Module 'Alamofire'
occur when you build your project from .xcodeproj.
By default you need to build project integrating CocoaPods from .xcworkspace.

Resources