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/
Related
I am using the following cmd to build a wasm using emscripten:
npm run build
It gets so far through before failing during the configure:
configure: make -DCMAKE_TOOLCHAIN_FILE=/usr/share/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=/usr/bin/node;--experimental-wasm-threads
make: invalid option -- 'D'
make: invalid option -- 'D'
Producing a final error:
This program built for x86_64-pc-linux-gnu
Report bugs to <bug-make#gnu.org>
emcmake: error: 'make -DCMAKE_TOOLCHAIN_FILE=/usr/share/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=/usr/bin/node;--experimental-wasm-threads' failed (returned 2)
make: *** [Makefile:84: build/popt/.libs/libpopt.a] Error 1
What is going wrong?
Update using cmake instead of make produces this error:
configure: cmake -DCMAKE_TOOLCHAIN_FILE=/home/user1/Downloads/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=/home/user1/Downloads/emsdk/node/14.18.2_64bit/bin/node;--experimental-wasm-threads
CMake Warning:
No source or binary directory provided. Both will be assumed to be the same as the current working directory, but note that this warning will become a fatal error in future CMake releases.
CMake Error: The source directory "/home/user1/Downloads/test1.js-master/build/popt" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
emcmake: error: 'cmake -DCMAKE_TOOLCHAIN_FILE=/home/user1/Downloads/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=/home/user1/Downloads/emsdk/node/14.18.2_64bit/bin/node;--experimental-wasm-threads' failed (returned 1)
make: *** [Makefile:84: build/popt/.libs/libpopt.a] Error 1
This is my first time using Xcode Command Line Tools (13.2.1). I am following the instructions on how to build ncnn here: https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-macos
Do I need to go into Xcode or can I just run the commands in the Terminal?
What is the function of Xcode Command Line Tools and how should it be applied in this case?
For further context I am converting a YOLOX.onnx model using these instructions: https://yolox.readthedocs.io/en/latest/demo/ncnn_cpp_readme.html
and I am getting the error when building ncnn: clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [tools/onnx/onnx2ncnn] Error 1 make[1]: *** [tools/onnx/CMakeFiles/onnx2ncnn.dir/all] Error 2
The directions to convert onnx to ncnn tell me to:
cd <path of ncnn>
cd build/tools/ncnn```
However I do not have a ncnn folder inside of my tools folder...
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:
I built an Xcode project from CMake and when I attempt to build it I get the following error.
PhaseScriptExecution CMake\ Rules /Users/LaserTech/NewBuild/Myjob2/NameCreate.build/Debug/lsjob2.build/Script-E70CB352E1334BCA9B8BE7C1.sh
cd /Users/LaserTech/NameCreate-OSG-Qt5
/bin/sh -c /Users/LaserTech/NewBuild/Myjob2/NameCreate.build/Debug/Myjob2.build/Script-E70CB352E1334BCA9B8BE7C1.sh
make: *** No rule to make target `/Users/LaserTech/NameCreate-OSG-Qt5/Myjob2/PROTOBUF_PROTOC_EXECUTABLE-NOTFOUND', needed by `/Users/LaserTech/NewBuild/Myjob2/common.pb.cc'. Stop.
Command /bin/sh failed with exit code 2
I am not sure what this means. I would appreciate it if someone could shine some light onto what I should be looking at ?
Update:
I did have thoses packages installed. I needed to simply add the path to the binaries to the environment variable. However now xcode is giving me this
echo "Running C++ protocol buffer compiler on protocol/common.proto"
Running C++ protocol buffer compiler on protocol/common.proto
/Users/..../cmake/osxbuild/Release --cpp_out /Users/..../Myjob2 -I /Users/.../Myjob2/protocol /Users/../Myjob2/protocol/common.proto
make: /Users/.../protobuf/cmake/osxbuild/Release: Permission denied
make: *** [/Users/../NewBuild/Myjob2/common.pb.cc] Error 1
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?