Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux Support #179

Closed
czechboy0 opened this issue Feb 26, 2016 · 12 comments
Closed

Linux Support #179

czechboy0 opened this issue Feb 26, 2016 · 12 comments

Comments

@czechboy0
Copy link

What's the current status of Linux support? :)

@norio-nomura
Copy link
Collaborator

Latest swift-DEVELOPMENT-SNAPSHOT-2016-02-25-a for Linux does not contain sourcekitd.

@jpsim
Copy link
Owner

jpsim commented Feb 28, 2016

SourceKit is Darwin-only at the moment. The main limitation is the lack of GCD, but now that swift-corelibs-libdispatch is available on Linux in the Swift distribution, it should be possible to use that to build SourceKit for Linux. There's also the libXPC dependency which needs to be abstracted and use something else in Linux for building the dictionaries.

So... those are the next steps that need to be done.

@czechboy0
Copy link
Author

I see, thanks for the heads up! I'm currently looking for an easy way to parse the swiftc AST - is that part of SourceKitten or is that hidden in SourceKit? Asking for a friend: swiftlang/swift-package-manager#156

@jpsim
Copy link
Owner

jpsim commented Feb 29, 2016

You're probably looking for lib/IDE: https://github.com/apple/swift/tree/master/lib/IDE

@czechboy0
Copy link
Author

Ah nice, thanks!
On Mon, Feb 29, 2016 at 1:55 AM JP Simard [email protected] wrote:

You're probably looking for lib/IDE:
https://github.com/apple/swift/tree/master/lib/IDE


Reply to this email directly or view it on GitHub
#179 (comment).

@ghost
Copy link

ghost commented Aug 8, 2016

Just as an update: SourceKit now builds on Linux swiftlang/swift#3594 (comment)

@jpsim
Copy link
Owner

jpsim commented Aug 9, 2016

lol, thanks for the update

@ram0811
Copy link

ram0811 commented Oct 13, 2016

Possible to build Sourcekitten on Linux?

@jpsim
Copy link
Owner

jpsim commented Oct 13, 2016

@ram0811 work on that is in progress. See #223 and #268

@jpsim
Copy link
Owner

jpsim commented Oct 20, 2016

Merged in #268.

@jeffreyhanna
Copy link

jeffreyhanna commented Apr 28, 2017

Hey @jpsim, first off thanks for all of your work on SourceKitten and Realm, two great frameworks I depend on!

I'm trying to get SourceKitten to run on Ubuntu 14.04 with Swift 3.0.2 and was hoping you could give me some help. I'm very new to all of this, I'm just an iOS developer 😬

I followed the instructions to build swift on https://github.com/apple/swift (I used the swift-3.0.2-RELEASE tag).

It failed during linking, I'm assuming because of memory requirements. But I got it to run successfully on a 16 CPU 64GB VPS.

I followed your instructions to build twice using the following commands:

$ utils/build-script --libdispatch
$ utils/build-script --libdispatch --extra-cmake-options="-DSWIFT_BUILD_SOURCEKIT:BOOL=TRUE"

At this point I was a little lost, I found the executable and I can successfully compile swift files with swiftc, but the swift repl doesn't work and swift-build is missing. Is this expected?

Since I didn't have swift-build, I installed the latest swift release and used it to build SourceKitten, then removed that version of swift.

I found libsourcekitdInProc.so in the build folder and symlinked it to /usr/lib/libsourcekitdInProc.so but running SourceKitten gives me an error that linking to livsourcekitdInProc.so failed :/

How can I figure out what's going wrong? Is there a way for me to check that libsourcekitdInProc.so was built properly? Thanks for the help!

@jpsim
Copy link
Owner

jpsim commented Apr 29, 2017

Could you please file a new issue? I'm guaranteed to forget about this comment because I don't actively revisit closed issues. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants