Closed Guang1234567 closed 4 years ago
xcode Version 12.2 beta 3 (12B5035g)
which recommend in apple's doc
I am using Version 12.1 (12A7403)
.
On which build step it fails? On llvm, swift, stdlib ...? What is a shown on full error log?
Btw: This is from Readme.md
file for this Swift toolchain:
- Toolchain build may fail if the command line tools are present in
/Library/Developer/CommandLineTools
. Remove them if you are not using them. See: macos - How do I uninstall the command line tools for Xcode? - Ask Different
I see (in error log above) this line:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/math.h:749:12: note: 'finite' declared here extern int finite(double)
The CommandLineTools
often can became outdated. Better to remove them. Xcode.app contains same tools, libs, headers which are provided by CommandLineTools
.
On which build step it fails? On llvm, swift, stdlib ...?
$ node main.js swift:make
thanks your reply.
How about removing or temporary renaming CommandLineTools folder /Library/Developer/CommandLineTools
?
Is it helps?
How about removing or temporary renaming CommandLineTools folder
/Library/Developer/CommandLineTools
?Is it helps?
sudo rm -rf /Library/Developer/CommandLineTools
It works, thanks.
Now i merge the SwiftSPMBuilder.rb
to SwiftSPMBuilder.js
for building llb
and SPM
.
but get a error:
╰─ node main.js swiftSPM:make
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
"swiftSPM" Configure [host] is started.
mkdir -p "/Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Build/darwin-host/swiftSPM"
cd /Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Build/darwin-host/swiftSPM && cmake \
-G Ninja \
-D CMAKE_OSX_DEPLOYMENT_TARGET=10.9 \
-D CMAKE_OSX_SYSROOT=/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk \
-D CMAKE_EXPORT_COMPILE_COMMANDS=TRUE \
-D SWIFT_STDLIB_ENABLE_SIL_OWNERSHIP=FALSE -D SWIFT_ENABLE_GUARANTEED_NORMAL_ARGUMENTS=TRUE -D SWIFT_STDLIB_ENABLE_STDLIBCORE_EXCLUSIVITY_CHECKING=FALSE \
-D SWIFT_FORCE_OPTIMIZED_TYPECHECKER=FALSE \
-D CMAKE_C_FLAGS= -Wno-unknown-warning-option -Werror=unguarded-availability-new -fno-stack-protector \
-D CMAKE_CXX_FLAGS= -Wno-unknown-warning-option -Werror=unguarded-availability-new -fno-stack-protector \
-D CMAKE_BUILD_TYPE=Release \
-D LLVM_ENABLE_ASSERTIONS=TRUE \
-D SWIFT_ANALYZE_CODE_COVERAGE=FALSE \
-D SWIFT_STDLIB_BUILD_TYPE=Release \
-D SWIFT_STDLIB_ASSERTIONS=TRUE \
-D SWIFT_STDLIB_USE_NONATOMIC_RC=FALSE \
-D SWIFT_ENABLE_RUNTIME_FUNCTION_COUNTERS=TRUE \
-D SWIFT_INCLUDE_TOOLS=TRUE \
-D SWIFT_BUILD_REMOTE_MIRROR=TRUE \
-D SWIFT_STDLIB_SIL_DEBUGGING=FALSE \
-D SWIFT_CHECK_INCREMENTAL_COMPILATION=FALSE \
-D SWIFT_REPORT_STATISTICS=FALSE \
-D SWIFT_BUILD_DYNAMIC_STDLIB=TRUE \
-D SWIFT_BUILD_STATIC_STDLIB=FALSE \
-D SWIFT_BUILD_DYNAMIC_SDK_OVERLAY=TRUE \
-D SWIFT_BUILD_STATIC_SDK_OVERLAY=FALSE \
-D SWIFT_BUILD_PERF_TESTSUITE=FALSE \
-D SWIFT_BUILD_EXTERNAL_PERF_TESTSUITE=FALSE \
-D SWIFT_BUILD_EXAMPLES=FALSE \
-D SWIFT_INCLUDE_TESTS=FALSE \
-D SWIFT_EMBED_BITCODE_SECTION=FALSE \
-D SWIFT_TOOLS_ENABLE_LTO= \
-D SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER=FALSE \
-D LIBDISPATCH_CMAKE_BUILD_TYPE=Release \
-D SWIFT_DARWIN_DEPLOYMENT_VERSION_OSX=10.9 \
-D SWIFT_HOST_TRIPLE=x86_64-apple-macosx10.9 \
-D SWIFT_HOST_VARIANT=macosx \
-D SWIFT_HOST_VARIANT_SDK=OSX \
-D SWIFT_HOST_VARIANT_ARCH=x86_64 \
-D SWIFT_DARWIN_XCRUN_TOOLCHAIN=default \
-D SWIFT_AST_VERIFIER=TRUE \
-D SWIFT_SIL_VERIFY_ALL=FALSE \
-D SWIFT_RUNTIME_ENABLE_LEAK_CHECKER=FALSE \
-D CMAKE_INSTALL_PREFIX=/ \
-D Clang_DIR=/Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Build/darwin-host/llvm-project/lib/cmake/clang \
-D LLVM_DIR=/Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Build/darwin-host/llvm-project/lib/cmake/llvm \
-D SWIFT_PATH_TO_CMARK_SOURCE=/Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Sources/cmark \
-D SWIFT_PATH_TO_CMARK_BUILD=/Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Build/darwin-host/cmark \
-D SWIFT_SDKS=OSX \
-D SWIFT_EXEC=/Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Build/darwin-host/swiftSPM/bin/swiftc \
-D SWIFT_BUILD_SOURCEKIT=FALSE \
-D SWIFT_ENABLE_SOURCEKIT_TESTS=FALSE \
-D SWIFT_SOURCEKIT_USE_INPROC_LIBRARY=TRUE \
/Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Sources/swift
CMake Deprecation Warning at CMakeLists.txt:7 (cmake_policy):
The OLD behavior for policy CMP0068 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- CMake (/Users/lihanguang/.asdf/installs/cmake/3.17.5/bin/cmake) Version: 3.17.5
-- CMake Make Program (/usr/local/bin/ninja) Version: 1.10.1
-- C Compiler (/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc) Version: 12.0.0.12000032
-- C++ Compiler (/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++) Version: 12.0.0.12000032
-- CMark Version: cmark 0.29.0 - CommonMark converter
(C) 2014-2016 John MacFarlane
--
-- Linker detection: ld64
-- Building with -fPIC
-- Xcode 12.2, Build version 12B5035g
--
-- OS X SDK:
-- Object File Format: MACHO
-- Swift Standard Library Path: macosx
-- Version: 11.0
-- Build number: 20A5395d
-- Deployment version: 10.9
-- Version min name: macosx
-- Triple name: macosx
-- Simulator: FALSE
-- Architectures: x86_64;arm64;arm64e
-- x86_64 triple: x86_64-apple-macosx
-- Module triple: x86_64-apple-macos
-- arm64 triple: arm64-apple-macosx
-- Module triple: arm64-apple-macos
-- arm64e triple: arm64e-apple-macosx
-- Module triple: arm64e-apple-macos
-- x86_64 Path: /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk
-- arm64 Path: /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk
-- arm64e Path: /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk
--
-- Building host Swift tools for OSX x86_64
-- Build type: Release
-- Assertions: TRUE
-- LTO:
--
-- Building Swift standard library and overlays for SDKs: OSX
-- Build type: Release
-- Assertions: TRUE
--
-- Building Swift runtime with:
-- Leak Detection Checker Entrypoints: FALSE
--
-- Differentiable Programming Support: OFF
--
-- Building overlays: CoreFoundation;CoreGraphics;Dispatch;Foundation;ObjectiveC;XCTest
-- INCLUDING OVERLAY: CoreFoundation
-- INCLUDING OVERLAY: CoreGraphics
-- INCLUDING OVERLAY: Dispatch
-- INCLUDING OVERLAY: Foundation
-- INCLUDING OVERLAY: ObjectiveC
-- INCLUDING OVERLAY: XCTest
-- Swift version: 5.3
-- Swift vendor:
-- Swift compiler version:
-- Embedded clang compiler version:
CMake Warning at docs/CMakeLists.txt:24 (message):
Unable to find sphinx-build program. Not building docs
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Build/darwin-host/swiftSPM
"swiftSPM" Configure [host] is completed.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
"swiftSPM" Build [host] is started.
mkdir -p "/Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Build/darwin-host/swiftSPM"
cd /Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Build/darwin-host/swiftSPM && ninja -j3
ninja: error: '/Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Build/darwin-host/llvm-project/bin/clang-10', needed by 'stdlib/public/core/OSX/arm64/Swift.o', missing and no known rule to make it
Execution of command is failed:
cd /Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Build/darwin-host/swiftSPM && ninja -j3
If error was due Memory, CPU, or Disk peak resource usage (i.e. missed file while file exists),
then try to run previous command again. Build process will perform "configure" step again,
but most of compilation steps will be skipped.
/Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/lib/Tool.js:82
throw error;
^
Error: Command failed: cd /Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Build/darwin-host/swiftSPM && ninja -j3
at checkExecSyncError (child_process.js:621:11)
at Object.execSync (child_process.js:657:15)
at SwiftSPMBuilder.execute (/Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/lib/Tool.js:72:10)
at SwiftSPMBuilder.executeBuild (/Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/lib/Builders/SwiftSPMBuilder.js:106:10)
at SwiftSPMBuilder.build (/Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/lib/Builder.js:86:10)
at SwiftSPMBuilder.make (/Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/lib/Builder.js:97:10)
at SwiftSPMBuilder.runAction (/Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/lib/Builder.js:62:12)
at Automation.runComponentAction (/Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/Automation.js:125:29)
at Automation.run (/Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/Automation.js:65:14)
at Object.<anonymous> (/Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/main.js:26:18) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 64662,
stdout: null,
stderr: null
}
The error:
ninja: error: '/Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Build/darwin-host/llvm-project/bin/clang-10',
needed by 'stdlib/public/core/OSX/arm64/Swift.o', missing and no known rule to make it
Execution of command is failed:
cd /Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Build/darwin-host/swiftSPM && ninja -j3
Here is the SwiftSPMBuilder.js
Could you give me some help, thanks.
ninja: error: '/Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Build/darwin-host/llvm-project/bin/clang-10', needed by 'stdlib/public/core/OSX/arm64/Swift.o', missing and no known rule to make it
Execution of command is failed: cd /Users/lihanguang/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Build/darwin-host/swiftSPM && ninja -j3
already fix it (missing clang-10
). just
var Builder = require("../Builder");
var Component = require("../Components");
var Archs = require("../Archs");
module.exports = class LLVMBuilder extends Builder {
constructor() {
super(Component.llvm, Archs.host);
}
executeBuild() {
this.execute(`cd ${this.paths.builds} && ninja -C ${this.paths.builds} -j${this.numberOfJobs} clang llvm-tblgen clang-tblgen llvm-libraries clang-libraries`);
}
};
// fix missing `clang-10`
// ninja -C ${this.paths.builds} -j${this.numberOfJobs} clang
this.execute(`cd ${this.paths.builds} && ninja -C ${this.paths.builds} -j${this.numberOfJobs} clang llvm-tblgen clang-tblgen llvm-libraries clang-libraries`);
Ah. I excluded clang
just to make toolchain build faster .)
I will gather your SPM fixes and LLVMBuilder
fix and will make a new toolchain release.
To have possibility to use debug
configuration when using swift build
.
Ok. The issue with SPM Debug Builds now fixed in https://github.com/vgorloff/swift-everywhere-toolchain/releases/tag/1.0.57. Closing issue.
Hello @vgorloff
I compile the
swift-5.3-Release
today, but got the error:output:
so i think my xcode 12 version is different from your's.
Could you give me your xcode 12 version's detail info?
Here is my xcode12 snapshot: