vknabel / vscode-swift-development-environment

New home of Swift Development Environment for VS Code
https://marketplace.visualstudio.com/items?itemName=vknabel.vscode-swift-development-environment
Apache License 2.0
175 stars 14 forks source link

build problem for Ubuntu 18.04 #43

Closed marijn-d closed 5 years ago

marijn-d commented 5 years ago

Hello, I'd like to try your project/extension but I cannot seem to build it. Probably overlooking something very obvious.. Does this error ring any bells by any chance? (when building from sourcekite directory)

swift build -Xlinker -l:sourcekitdInProc warning: PackageDescription API v3 is deprecated and will be removed in the future; used by package(s): sourcekite Compile Swift Module 'sourcekite' (2 sources) Linking ./.build/x86_64-unknown-linux/debug/sourcekite /usr/bin/ld.gold: fatal error: //usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../sourcekitdInProc: pread failed: Is a directory clang: error: linker command failed with exit code 1 (use -v to see invocation)

:0: error: link command failed with exit code 1 (use -v to see invocation) error: terminated(1): /usr/local/Swift/usr/bin/swift-build-tool -f /home/marijn/SWIFT/sourcekite/.build/debug.yaml main output: greetings, Marijn
vknabel commented 5 years ago

Welcome @marijn-d!

I haven’t compiled sourcekite on Linux for a while now. Maybe these install steps for making the build pass on CI help you. https://github.com/vknabel/sourcekite/blob/e7a09696e7f2ae151d22cff70dac9f70229cf7ee/.travis.yml#L103

Though I would recommend you to use Apple’s official LSP as it will improve faster and is easier to compile. https://github.com/apple/sourcekit-lsp/tree/swift-DEVELOPMENT-SNAPSHOT-2019-03-25-a#building-on-linux

You can either use this vscode extension or compile your own https://github.com/apple/sourcekit-lsp/tree/swift-DEVELOPMENT-SNAPSHOT-2019-03-25-a/Editors.

If you choose to stay with this extension, you need to add settings as described in https://github.com/vknabel/vscode-swift-development-environment#alternative-language-server.

No matter what, feel free to add further comments here. 😊

marijn-d commented 5 years ago

hi, thanks for your quick reply! I'll get started with your suggestions

vknabel commented 5 years ago

I found and fixed an issue with sourcekite and Swift 5 and updated the documentation in case it may help you. https://github.com/vknabel/vscode-swift-development-environment#installation

marijn-d commented 5 years ago

thanks for letting me know, I’ll be sure to check it out marijn

On 11 Apr 2019, at 16:37 , Valentin Knabel notifications@github.com wrote:

I found and fixed an issue with sourcekite and Swift 5 and updated the documentation in case it may help you. https://github.com/vknabel/vscode-swift-development-environment#installation https://github.com/vknabel/vscode-swift-development-environment#installation — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vknabel/vscode-swift-development-environment/issues/43#issuecomment-482141240, or mute the thread https://github.com/notifications/unsubscribe-auth/Au-8vvxKbNkj9xB606iqMiNdPu5Z--pqks5vf0iOgaJpZM4ccCec.

vknabel commented 5 years ago

Sourcekite now builds on top of SourceKitten and does not link sourcekitdInProc anymore.