felix91gr / swift-linuxSetup

Shell Scripts and instructions on how to set up Swift on Linux.
4 stars 1 forks source link

Compiling SourceKit #2

Closed felix91gr closed 7 years ago

felix91gr commented 7 years ago

Here I'll expose what I have done so far and the problems that I've had until now.

The steps

There are 3 steps to doing this: getting a good (passing) 3.1 snapshot from Github, compile it and then to compile SourceKit.

Preamble

I'm trying this from a blank Ubuntu 16.04 partition most of the time, to avoid weird interactions because of duplicates or failed installations of the toolchain.

I also install the basic dependencies before trying to compile anything.

Getting the snapshot

We need to use Swift 3.1 because of SourceKite.

This part has been solved already, though :+1: . I do this:

git clone https://github.com/apple/swift
swift/utils/update-checkout --clone --tag swift-3.1-DEVELOPMENT-SNAPSHOT-2017-03-19-a

Compile the toolchain

I used the presets from Jin up until now. Since I still had errors (more details on that after this), I decided to start from scratch. I'm compiling the toolchain just by using this:

swift/utils/build-script -c --jobs 2 --libdispatch

Compile SourceKit

A couple of days ago, I managed to compile it using a modified version of Jin's presets. It linked to all of its dependencies, and thus I could use SourceKite. But I kept getting the following error:

***stderr***<unknown>:0: error: unable to load standard library for target 'x86_64-unknown-linux-gnu'

I might be missing a flag for the build_script. I don't know. Actually, I don't know what to do... I think I need some help.

I tried today to compile using this command, and it didn't compile anything:

swift/utils/build-script --jobs 2 --libdispatch --extra-cmake-options="-SWIFT_BUILD_SOURCEKIT:BOOL=TRUE"

@norio-nomura

felix91gr commented 7 years ago

Other thing I might have done wrong is the installation step. So far, I've compiled the toolchain and then sat the system up like this:

  1. Adding swift to the PATH:
    echo PATH=$PATH:$PATHTOSWIFT >> ~/.bashrc
    echo export PATH >> ~/.bashrc
  2. Adding the swift/linux libraries to the ld.so.conf.d index:
    echo $BUILDPATH/usr/lib/swift/linux | sudo tee -a /etc/ld.so.conf.d/swift123.conf

Have I missed to set up some dependency?

norio-nomura commented 7 years ago

If you would cherrypick followings to swift-3.1-branch : https://github.com/apple/swift/commit/3e9f66c6cae63332cb8c8ce82cbe3525df1ee1ce (merged to master, not to swift-3.1-branch) https://github.com/apple/swift/commit/1673b5e8fd3c981a1431d6873bc488581f6dd75b (merged to master, not to swift-3.1-branch) https://github.com/apple/swift/pull/8189/commits/856e4e4594d85e79c23053a536b75973ec042f4f (my PR against to master) you would be able to get sourcekit with using preset as following:

swift/utils/build-script \
  --preset="buildbot_linux,smoketest" \
  -- \
  install_destdir="build/swift-3.1-DEVELOPMENT-SNAPSHOT-${TAG}" \
  installable_package="build/swift-3.1-DEVELOPMENT-SNAPSHOT-${TAG}.tar.gz"
felix91gr commented 7 years ago

Awesome! I'll try it tomorrow (now it's kinda late in Chile, so I'll go to sleep)

After I do, I'll update you on my results.

Thanks again! 😊 On Mon, Mar 20, 2017 at 10:50 PM Norio Nomura notifications@github.com wrote:

If you would cherrypick followings to swift-3.1-branch : apple/swift@3e9f66c https://github.com/apple/swift/commit/3e9f66c6cae63332cb8c8ce82cbe3525df1ee1ce (merged to master, not to swift-3.1-branch) apple/swift@1673b5e https://github.com/apple/swift/commit/1673b5e8fd3c981a1431d6873bc488581f6dd75b (merged to master, not to swift-3.1-branch) apple/swift@856e4e4 https://github.com/apple/swift/pull/8189/commits/856e4e4594d85e79c23053a536b75973ec042f4f (my PR against to master) you would be able to get sourcekit with using preset as following:

swift/utils/build-script \ --preset="buildbot_linux,smoketest" \ -- \ install_destdir="build/swift-3.1-DEVELOPMENT-SNAPSHOT-${TAG}" \ installable_package="build/swift-3.1-DEVELOPMENT-SNAPSHOT-${TAG}.tar.gz"

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/felix91gr/swift-linuxSetup/issues/2#issuecomment-287952488, or mute the thread https://github.com/notifications/unsubscribe-auth/ALNBJ92Wc3PAeju0z2yh1j577l7UygOlks5rnyzNgaJpZM4MjMJa .

felix91gr commented 7 years ago

:thinking: It failed... I got this output:

[547/745] Linking CXX shared library lib/...urcekitdInProc.framework/sourcekitdInProc
FAILED: lib/sourcekitdInProc.framework/sourcekitdInProc 
cd /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/swift-linux-x86_64/tools/SourceKit/tools/sourcekitd/bin/InProc && /usr/local/bin/cmake -E copy /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/swift/tools/SourceKit/tools/sourcekitd/bin/InProc/module.modulemap /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/swift-linux-x86_64/./lib/sourcekitdInProc.framework/Modules/module.modulemap && cd /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/swift-linux-x86_64/tools/SourceKit/tools/sourcekitd/bin/InProc && /usr/local/bin/cmake -E copy /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/swift/tools/SourceKit/tools/sourcekitd/include/sourcekitd/sourcekitd.h /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/swift-linux-x86_64/./lib/sourcekitdInProc.framework/Headers/sourcekitd.h && cd /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/swift-linux-x86_64 && /usr/bin/clang++  -fPIC -fno-stack-protector -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Werror=date-time -std=c++11 -fcolor-diagnostics -ffunction-sections -fdata-sections -Wdocumentation -Wimplicit-fallthrough -Wunreachable-code -Woverloaded-virtual -O3  -target x86_64-unknown-linux-gnu -lpthread -ldl -lBlocksRuntime  -fapplication-extension -shared -Wl,-soname,sourcekitdInProc -o lib/sourcekitdInProc.framework/sourcekitdInProc tools/SourceKit/tools/sourcekitd/bin/InProc/CMakeFiles/sourcekitdInProc.dir/sourcekitdInProc.cpp.o -L/home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/./lib lib/libSourceKitSwiftLang.a lib/libsourcekitdAPI.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMSupport.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMCoverage.a -lBlocksRuntime lib/libSourceKitSwiftLang.a lib/libSourceKitCore.a lib/libswiftDriver.a lib/libswiftIndex.a lib/libswiftIDE.a lib/libswiftFrontend.a lib/libswiftIRGen.a lib/libswiftSILGen.a lib/libswiftSILOptimizer.a lib/libswiftLLVMPasses.a lib/libswiftClangImporter.a lib/libswiftParse.a lib/libswiftSIL.a lib/libswiftSema.a lib/libswiftSerialization.a lib/libswiftClangImporter.a lib/libswiftParse.a lib/libswiftSIL.a lib/libswiftSema.a lib/libswiftSerialization.a lib/libswiftAST.a lib/libswiftMarkup.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangIndex.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangFormat.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangToolingCore.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangFrontendTool.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangCodeGen.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMCoverage.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangARCMigrate.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangStaticAnalyzerFrontend.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangStaticAnalyzerCheckers.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangASTMatchers.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangStaticAnalyzerCore.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangRewriteFrontend.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangFrontend.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangDriver.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangSerialization.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangParse.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangSema.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangAnalysis.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangEdit.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangRewrite.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangAST.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangLex.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangAPINotes.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libclangBasic.a lib/libswiftOption.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/cmark-linux-x86_64/src/libcmark.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/./lib/libclangIndex.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/./lib/libclangFormat.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/./lib/libclangToolingCore.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/./lib/libclangFrontendTool.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/./lib/libclangFrontend.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/./lib/libclangDriver.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/./lib/libclangCodeGen.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/./lib/libclangSerialization.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/./lib/libclangParse.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/./lib/libclangSema.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/./lib/libclangAnalysis.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/./lib/libclangEdit.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/./lib/libclangRewriteFrontend.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/./lib/libclangLex.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/./lib/libclangAST.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/./lib/libclangAPINotes.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMX86CodeGen.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMX86AsmParser.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMX86Desc.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMX86AsmPrinter.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMX86Utils.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMX86Disassembler.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMX86Info.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMARMCodeGen.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMARMAsmParser.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMARMDisassembler.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMARMDesc.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMARMAsmPrinter.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMARMInfo.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMAArch64CodeGen.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMGlobalISel.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMAArch64AsmParser.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMAArch64Disassembler.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMAArch64Desc.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMAArch64AsmPrinter.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMAArch64Info.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMAArch64Utils.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMPowerPCCodeGen.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMPowerPCAsmParser.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMPowerPCDesc.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMPowerPCAsmPrinter.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMPowerPCDisassembler.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMPowerPCInfo.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMSystemZCodeGen.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMAsmPrinter.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMDebugInfoCodeView.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMDebugInfoMSF.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMSelectionDAG.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMSystemZAsmParser.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMSystemZDisassembler.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMSystemZDesc.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMSystemZAsmPrinter.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMSystemZInfo.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMMCDisassembler.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMDebugInfoDWARF.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMLTO.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMPasses.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMipo.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMIRReader.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMAsmParser.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMLinker.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMCodeGen.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMBitWriter.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMInstrumentation.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMTarget.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMScalarOpts.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMInstCombine.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMVectorize.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMOption.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMObjCARCOpts.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMTransformUtils.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMAnalysis.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMObject.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMBitReader.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMMCParser.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMMC.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMProfileData.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMCore.a lib/libSourceKitSupport.a -lBlocksRuntime lib/libswiftBasic.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/lib/libLLVMSupport.a -lrt -ldl -ltinfo -lpthread -lm /usr/lib/x86_64-linux-gnu/libuuid.so /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/./lib/libclangRewrite.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/llvm-linux-x86_64/./lib/libclangBasic.a /home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/build/buildbot_linux/libdispatch-linux-x86_64/src/.libs/libdispatch.so && :
clang: error: unknown argument: '-fapplication-extension'

I used this script:

            TAG=swift-3.1-DEVELOPMENT-SNAPSHOT-2017-03-19-a

            rm -rf \
                build clang cmark compiler-rt llbuild \
                lldb llvm ninja swift \
                swift-corelibs-foundation swift-corelibs-libdispatch \
                swift-corelibs-xctest swift-integration-tests \
                swiftpm swift-xcode-playground-support
            git clone https://github.com/apple/swift
            swift/utils/update-checkout --clone --tag $TAG

            cd swift
            git cherry-pick --strategy=recursive -X theirs 3e9f66c
            git cherry-pick --strategy=recursive -X theirs 1673b5e 
            git fetch origin pull/8189/head:pr-8189
            git cherry-pick --strategy=recursive -X theirs 856e4e4

            swift/utils/build-script \
              --preset="buildbot_linux,smoketest" \
              -- \
              install_destdir="${pwd}/build/${TAG}" \
              installable_package="${pwd}/build/${TAG}.tar.gz"

Now I gotta leave for University, I'll try to debug it today after I come back ^^

norio-nomura commented 7 years ago

Which version of clang did you use? I am using:

$ clang --version
clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
felix91gr commented 7 years ago

Ohh, I'm using this:

$ clang --version
Ubuntu clang version 3.6.2-3ubuntu2 (tags/RELEASE_362/final) (based on LLVM 3.6.2)
Target: x86_64-pc-linux-gnu
Thread model: posix
felix91gr commented 7 years ago

Update: I had the 3.8 installed. I had to run update-alternatives :)

$ clang --version
clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

I'll run the script again; after it finishes I'll give you an update on how it went :)

felix91gr commented 7 years ago

By the way... can I get away with not compiling LLVM? It's the part that takes the most time and it's not so important for the purposes of making SourceKit work, I would think :thinking:

Unless the Swift toolchain needs it from source for some reason... :thinking: :thinking:

norio-nomura commented 7 years ago

Perhaps it would be better to use incremental build for your purpose. I do not know which preset is suitable for that.

felix91gr commented 7 years ago

Ah, then it's okay. The purpose of this guide is to streamline the setup from a clean linux install up to sourcekit working (and SDE after that).

Therefore, the build will be done without having a previous build already in place. If I can't have LLVM without an incremental build, that's OK 😊

On Thu, Mar 23, 2017 at 8:44 PM Norio Nomura notifications@github.com wrote:

Perhaps it would be better to use incremental build for your purpose. I do not know which preset is suitable for that.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/felix91gr/swift-linuxSetup/issues/2#issuecomment-288893500, or mute the thread https://github.com/notifications/unsubscribe-auth/ALNBJwForhLcbGYVRmKnd-BhRS8rZMH9ks5rowPGgaJpZM4MjMJa .

felix91gr commented 7 years ago

It finished building, but sourcekitdInProc is missing the libdispatch.so linking:

/build/swift-3.1-DEVELOPMENT-SNAPSHOT-2017-03-19-a/usr$ ldd lib/sourcekitdInProc.framework/sourcekitdInProc 
    linux-vdso.so.1 =>  (0x00007fff7ceee000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5945333000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f594512f000)
    libBlocksRuntime.so.0 => /usr/lib/x86_64-linux-gnu/libBlocksRuntime.so.0 (0x00007f5944f2b000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f5944d23000)
    libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f5944afa000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f59447f0000)
    libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f59445eb000)
    libdispatch.so => not found
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f5944268000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f5944052000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5943c89000)
    /lib64/ld-linux-x86-64.so.2 (0x000055bb477d1000)

Did I miss something?

This is my current script:

NorioSMethodOfCompiling.sh

(And this is the CommonLibrary.lib that appears in the second line)

felix91gr commented 7 years ago

Ah wait. I thought those commits allowed for SourceKit to be compiled in one pass. But now that I look at them up close, it's clear that the intention is to do a first pass that compiles libdispatch, and then another one that uses it to compile SourceKit 😆

Awesome. I'll leave it doing the second pass tonight 😊

norio-nomura commented 7 years ago

Hm, I did build them in one pass...🤔

norio-nomura commented 7 years ago

I guess that you did not configure LD_LIBRARY_PATH before doing ldd.

export LD_LIBRARY_PATH=/build/swift-3.1-DEVELOPMENT-SNAPSHOT-2017-03-19-a/usr/lib/swift/linux/:${LD_LIBRARY_PATH }
norio-nomura commented 7 years ago

Swift's Libraries other than sourcekitdInProc are configured to support loading each other libraries in relative path, But sourcekitdInProc is not. So, you need to use LD_LIBRARY_PATH currently. I'm trying to fix that, and will open a PR to swift.

felix91gr commented 7 years ago

I guess that you did not configure LD_LIBRARY_PATH before doing ldd.

Indeed. That was it! Now ldd shows good output:

$ ldd /build/swift-3.1-DEVELOPMENT-SNAPSHOT-2017-03-19-a/usr/lib/sourcekitdInProc.framework/sourcekitdInProc 
    linux-vdso.so.1 =>  (0x00007ffdae497000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fcdf3c43000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fcdf3a3f000)
    libBlocksRuntime.so.0 => /usr/lib/x86_64-linux-gnu/libBlocksRuntime.so.0 (0x00007fcdf383b000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fcdf3633000)
    libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007fcdf340a000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fcdf3100000)
    libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fcdf2efb000)
    libdispatch.so => /build/swift-3.1-DEVELOPMENT-SNAPSHOT-2017-03-19-a/usr/lib/swift/linux/libdispatch.so (0x00007fcdf2e56000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fcdf2ad3000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fcdf28bd000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcdf24f4000)
    /lib64/ld-linux-x86-64.so.2 (0x000055f3759a0000)
    libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fcdf22de000)

I thought that one needed to have the library existing before making the link. But I guess Linux has cool things like LD_LIBRARY_PATH that make things different :)

Swift's Libraries other than sourcekitdInProc are configured to support loading each other libraries in relative path, But sourcekitdInProc is not. So, you need to use LD_LIBRARY_PATH currently.

I see.

I'm trying to fix that, and will open a PR to swift.

That's awesome! I hope you can make it work :)

I don't have much experience, but if you need a hand with that, let me know. I'll be happy to help with anything I can.

felix91gr commented 7 years ago

I have to leave now, because it's pretty late. But now that SourceKit is linked properly, I have high hopes. I will start testing it tomorrow, and let you know the results :)

felix91gr commented 7 years ago

Hmm :thinking: I think I'm having a very dumb problem. SourceKite doesn't seem to be able to see the standard library. I get the following debug output:

-->onInitialize isTracingOn=[true],
    skProtocolProcess=[/home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/sourcekite/.build/debug/sourcekite],skProtocolProcessAsShellCmd=[false]
-->onDidChangeConfiguration
-->onDidChangeConfiguration tracing: 
        swiftDiverBinPath=[/build/swift-3.1-DEVELOPMENT-SNAPSHOT-2017-03-19-a/usr/bin/swift],
        shellPath=[/bin/sh]
***sourcekite initializing with skProtocolProcess at [/home/felix/Documents/SwiftWNorioSHelp/swift-linuxSetup/sourcekite/.build/debug/sourcekite]
-->SourcekiteResponseHandler constructor done
***initializeModuleMeta***
***getShellExecPath: /bin/sh
---onDidChangeContent
***swift package describe stdout*** {
  "modules": [
    {
      "c99name": "testsrv02",
      "is_test": false,
      "module_type": "SwiftModule",
      "name": "testsrv02",
      "path": "/home/felix/Desktop/sde-demos/Sources",
      "sources": [
        "main.swift"
      ],
      "type": "executable"
    }
  ],
  "name": "testsrv02",
  "path": "/home/felix/Desktop/sde-demos"
}

---onDidChangeContent
---onDidChangeContent
---onDidChangeContent
---onDidChangeContent
---onDidChangeContent
---onDidChangeContent
to write request: {
  key.request: source.request.codecomplete,
  key.sourcefile: "/home/felix/Desktop/sde-demos/Sources/main.swift",
  key.offset: 618,
  key.compilerargs: ["/home/felix/Desktop/sde-demos/Sources/main.swift","-I","/home/felix/Desktop/sde-demos/.build/debug","-I","/usr/lib/swift/pm/"],
  key.sourcetext: "let x = 2\nvar y = x*2\nstruct SA {\n    var sa_a_String = \"I'am a\\n \\n\\n String in\\\" )SA.\\n\"\n    var sa_b_Int = 123\n    var sa_c_boolean = true\n    var sa_nil: Int? = nil\n}\nclass CB {\n   var cb_x = \"(\\nin\\n CB\"\n   var cb_sa = SA()\n}\nclass CA {\n    var ca_a_tuple = (200, \"OK\")\n    let ca_b_list = [\"a\",\"b\",\"c\"]\n    let ca_c_map = [\"red\":0xff0000,\"green\":0x00ff00,\"blue\":0x0000ff]\n    var ca_d_sa = SA()\n    var ca_cb = CB()\n    var ca_z = 123000\n} \n\nfunc add(_ x: Int, _ y: Int, _ ca: CA) -> Int {\n return x+y+ca.ca_z\n}\n\nfunc donothing() {\n return;\n}\n\nlet ca = CA()\nprint(\"x+y+ca_z = \\(add(x, y, ca))\")\ndonothing()\n\nadd()" 
}

***stderr***<unknown>
***stderr***:
***stderr***0
***stderr***: 
***stderr***error: 
***stderr***unable to load standard library for target 'x86_64-unknown-linux-gnu'
***stderr***

0
{
  key.results: [
  ]
}

Just in case, I tested what's the linking status of every dynamically loaded binary in the /build/ directory. I didn't find any missing dependencies. In any case, here are the ldd outputs of /build/usr/bin and of /build/usr/lib/swift/linux: bin, lib/swift/linux

Where is the error? I've seen this error appear before, after my other attempts at compiling the toolchain. Now I'm using different commits and presets, and the same error appeared. I believe I'm compiling it correctly but the system can't find the libraries it needs.

By the way, to make the swift compiler available and to make sourcekit see all of its dependencies, I ran these commands:

sudo echo >> ~/.bashrc
sudo echo export LD_LIBRARY_PATH=/build/swift-3.1-DEVELOPMENT-SNAPSHOT-${TAG}/usr/lib/swift/linux/:${LD_LIBRARY_PATH} >> ~/.bashrc

sudo echo >> ~/.bashrc
sudo echo export PATH=/build/swift-3.1-DEVELOPMENT-SNAPSHOT-${TAG}/usr/bin/:${PATH} >> ~/.bashrc
felix91gr commented 7 years ago

Hmm 🤔 I'm thinking that... maybe I can install SourceKitten, and if it works we'll know that the compilation was successful.

That should help to debug this problem. I'll try it tomorrow 🙂

On Sat, Mar 25, 2017 at 9:42 PM Norio Nomura notifications@github.com wrote:

Swift's Libraries other than sourcekitdInProc are configured to support loading each other libraries in relative path, But sourcekitdInProc is not. So, you need to use LD_LIBRARY_PATH currently. I'm trying to fix that, and will open a PR to swift.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/felix91gr/swift-linuxSetup/issues/2#issuecomment-289249839, or mute the thread https://github.com/notifications/unsubscribe-auth/ALNBJ2WBu37WOpZB_2U6wuU7orkZIC9Mks5rpbRlgaJpZM4MjMJa .

felix91gr commented 7 years ago

I couldn't compile SourceKitten. I posted an issue there... maybe it's not compatible with Swift 3.1 :thinking:

How can I test that my compilation of Swift and SourceKit was successful? Other than installing a layer like SourceKite or SourceKitten?

Because I think I've probably compiled it well but configured something wrongly after doing so.

Edit

Here is my build log: buildLog@2017-03-25-12h.txt

norio-nomura commented 7 years ago

I'm trying to SourceKitten to Swift 3.1 and I got <unknown>:0: error: unable to load standard library for target 'x86_64-unknown-linux-gnu' while testing too.

norio-nomura commented 7 years ago

For avoiding <unknown>:0: error: unable to load standard library for target 'x86_64-unknown-linux-gnu', following workarounds seem to be necessary for proper operation on my site:

ln -s /usr/lib/sourcekitdInProc.framework/sourcekitdInProc /usr/lib/libsourcekitdInProc.so
felix91gr commented 7 years ago

For avoiding <unknown>:0: error: unable to load standard library for target 'x86_64-unknown-linux-gnu', following workarounds seem to be necessary for proper operation on my site:

ln -s /usr/lib/sourcekitdInProc.framework/sourcekitdInProc /usr/lib/libsourcekitdInProc.so

Awesome. I'm gonna try it here and update on how it went :)

EDIT

I made the symlink: sudo ln -s /build/swift-3.1-RELEASE/usr/lib/sourcekitdInProc.framework/sourcekitdInProc /usr/lib/libsourcekitdInProc.so

Now I'm trying to compile sourcekite so that is uses libsourcekitdInProc.so, but there is a command I don't recognize in the README:

# This one I understand. I'm not running this command, because we make the symlink as `libsourcekitdInProc.so` 
# sudo ln -s /usr/lib/sourcekitdInProc.framework/sourcekitdInProc /usr/lib/sourcekitdInProc

# This is the one that confuses me. What does -l mean? Also, this command fails now.
swift build -Xlinker -l:sourcekitdInProc

I've tried changing that command, but even doing swift build -Xlinker -l:libsourcekitdInProc.so gives me problems. The program is compiled, but then when I do ldd .build/sourcekite I get this line, twice:

sourcekitdInProc => not found

Extra info

This is the build output:

$ swift build -Xlinker -l:libsourcekitdInProc.so -v
/usr/bin/lsb_release -r
/build/swift-3.1-RELEASE/usr/bin/swiftc --driver-mode=swift -I /build/swift-3.1-RELEASE/usr/lib/swift/pm -L /build/swift-3.1-RELEASE/usr/lib/swift/pm -lPackageDescription /home/felix/Desktop/sourcekite/Package.swift -fileno 6
/build/swift-3.1-RELEASE/usr/bin/swift-build-tool -f /home/felix/Desktop/sourcekite/.build/debug.yaml -v
/usr/bin/clang -fobjc-arc -fmodules -fmodule-name=sourcekitd -fPIC -fmodules-cache-path=/home/felix/Desktop/sourcekite/.build/debug/ModuleCache -g '-O0' -MD -MT dependencies -MF /home/felix/Desktop/sourcekite/.build/debug/sourcekitd.build/dummy.c.d -c /home/felix/Desktop/sourcekite/Sources/sourcekitd/dummy.c -o /home/felix/Desktop/sourcekite/.build/debug/sourcekitd.build/dummy.c.o -I /home/felix/Desktop/sourcekite/Sources/sourcekitd/include
/usr/bin/clang -Xlinker -l:libsourcekitdInProc.so -fPIC -L/home/felix/Desktop/sourcekite/.build/debug -Xlinker '-rpath=$ORIGIN' /home/felix/Desktop/sourcekite/.build/debug/sourcekitd.build/dummy.c.o -shared -o /home/felix/Desktop/sourcekite/.build/debug/libsourcekitd.so
/build/swift-3.1-RELEASE/usr/bin/swiftc -module-name sourcekite -incremental -emit-dependencies -emit-module -emit-module-path /home/felix/Desktop/sourcekite/.build/debug/sourcekite.swiftmodule -output-file-map /home/felix/Desktop/sourcekite/.build/debug/sourcekite.build/output-file-map.json -num-threads 8 -c /home/felix/Desktop/sourcekite/Sources/sourcekite/main.swift /home/felix/Desktop/sourcekite/Sources/sourcekite/utils.swift -I /home/felix/Desktop/sourcekite/.build/debug -j8 -D SWIFT_PACKAGE -Onone -g -enable-testing -Xcc -fmodule-map-file=/home/felix/Desktop/sourcekite/Sources/sourcekitd/include/module.modulemap -I /home/felix/Desktop/sourcekite/Sources/sourcekitd/include -module-cache-path /home/felix/Desktop/sourcekite/.build/debug/ModuleCache
'/build/swift-3.1-RELEASE/usr/bin/swiftc' -Xlinker -l:libsourcekitdInProc.so -Xlinker '-rpath=$ORIGIN' -g -L/home/felix/Desktop/sourcekite/.build/debug -o /home/felix/Desktop/sourcekite/.build/debug/sourcekite -lsourcekitd -emit-executable /home/felix/Desktop/sourcekite/.build/debug/sourcekite.build/main.swift.o /home/felix/Desktop/sourcekite/.build/debug/sourcekite.build/utils.swift.o
felix91gr commented 7 years ago

@jinmingjian any ideas? :)

felix91gr commented 7 years ago

@norio-nomura I should ask: is there a direct way to test sourcekit? That way I could help debugging both sourcekite and sourcekitten, after knowing that my sourcekit build is working well.

norio-nomura commented 7 years ago

sourcekitd-test is included in my docker image:

$ export LD_LIBRARY_PATH=/usr/lib/swift/linux/:/usr/lib/sourcekitdInProc.framework/:${LD_LIBRARY_PATH}
$ sourcekitd-test -req=demangle unmangled _TtBf80_  _TtP3foo3bar_
{
  key.request: source.request.demangle,
  key.names: [
    "unmangled",
    "_TtBf80_",
    "_TtP3foo3bar_"
  ]
}
START DEMANGLE
<empty>
Builtin.Float80
foo.bar
END DEMANGLE
felix91gr commented 7 years ago

Awesome! Can I use it to test my installation?

Or better... how can I compile it? :)

felix91gr commented 7 years ago

I think I've got it. This is what you used to build your docker image, right...?

If so, these are the differences with the presets you've taught me to use :)

# Sourcekitd_repl and stuff:
extra-cmake-options="-DSWIFT_TOOL_SOURCEKITD_REPL_BUILD=TRUE"

# Weird test values:
validation-test=0 #=0, what does that mean?
long-test=0 #=0 again (also, the one I've been using doesn't do the long-test)

# Skipping tests:
skip-test-cmark
skip-test-lldb # Same as mine
skip-test-swift 
skip-test-llbuild
skip-test-swiftpm
skip-test-xctest
skip-test-foundation
skip-test-libdispatch

# And this extra item to swift-install-components=...

;tools

These are of course the important lines:

extra-cmake-options="-DSWIFT_TOOL_SOURCEKITD_REPL_BUILD=TRUE"

# Add this to swift-install-components=...
;tools

I'm gonna try another build run with these presets, let's see how it does :)

EDIT

I started the building process. Tomorrow I'll check if it worked, and test sourcekit.

To expand the build configuration, I edited the build-presets.ini file by hand, which is of course not scriptable. I'm thinking for the release, of either using sed which is kind of archaic but works. Or maybe making a custom preset, adding it to a file in the script directory, and using mixin with the buildbot_linux, smoketest preset to reutilize its lines.

norio-nomura commented 7 years ago

Yeah, I'm using that preset. I think my preset is different from buildbot_linux, smoketest:

extra-cmake-options="-DSWIFT_TOOL_SOURCEKITD_REPL_BUILD=TRUE"

On my build, this is not working at all: https://github.com/norio-nomura/docker-sourcekit-builder/issues/2

And I came to the conclusion that sourcekitInProc in my docker image seems to be broken. 😞 https://github.com/jpsim/SourceKitten/issues/354

felix91gr commented 7 years ago

And I came to the conclusion that sourcekitInProc in my docker image seems to be broken. :disappointed:

Noo :cry:

Damn... :thinking: Hmm... then, I assume the binaries I'm compiling now, will show the same error.

Question: This means that sourcekit in Swift 3.1 isn't working properly on Linux?

If that's the case, I want to help. I'm fairly new to this, though. Please tell me how can I be of use :pray:

If it's not the case (yay, something works! :D) then it's only the sourcekitd-test part that is failing? :thinking: If so, I'm not quite sure how to proceed. I'll have to ask @jinmingjian.

norio-nomura commented 7 years ago

Now I know that many tests fail on Swift 3.1 for Linux. https://github.com/norio-nomura/swift/commit/d94c6177608615363af7e3be9ad2844c17c162ee

felix91gr commented 7 years ago

Ohh, I see. Dang, there's a lot of work to do. At least it's not your images that are failing: the problem is inside the release.

Well, I guess that's why my setup kept failing with sourcekite :thinking: The weird thing is that Jin made it work. Well, he'll probably know how to fix some of those failing tests.

I'll see if I can help with some of those bugs.

By the way, my build process finished, and there are good news. I get exactly the output you showed:

$ sourcekitd-test -req=demangle unmangled _TtBf80_  _TtP3foo3bar_
{
  key.request: source.request.demangle,
  key.names: [
    "unmangled",
    "_TtBf80_",
    "_TtP3foo3bar_"
  ]
}
START DEMANGLE
<empty>
Builtin.Float80
foo.bar
END DEMANGLE

So, at least it seems like the script worked (finally!). Thank you :)

felix91gr commented 7 years ago

The other good thing about 3.1 right now is that at least we'll be able to distribute binaries and docker images for 3.1 without worry. Since 3.1 isn't changing anymore, its ABI isn't changing either. Therefore, people will not need to compile it in order to use the IDE tools.

felix91gr commented 7 years ago

Well. Anyway... I think it's time to close this issue. You've helped me through the compiling of SourceKit and I've learned a great deal of things. I'm forever grateful :pray:

Btw, I've seen your recent PR. I don't know how you do it, but it's amazing :smile:

See ya! Thanks, Nomura-san :D