-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[SR-3998] SourceKit build failure on Linux without blocks runtime #46583
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
Comments
Comment by Hugh Bellamy (JIRA) For now you can work around this by using the CMake -DSWIFT_BUILD_SOURCEKIT=FALSE (https://github.com/apple/swift/blob/master/CMakeLists.txt#L373) |
Comment by Vladislav Dembskiy (JIRA) Thank you Hugh.
I have find another workaround but I am not sure if it is correct.
Currently, it looks like libdispatch is building normally. |
The build of SourceKit shells out to libdispatch via a Makefile, rather than CMake. We have multiple copies of the blocks runtime in the project at the moment. It may make sense for SourceKit to depend on dispatch's copy but this would run into problems if (for example) clients of SourceKitd want to use blocks. There's probably a bigger issue to solve here. |
Comment by Vladislav Dembskiy (JIRA) Thank you, Alex! |
"On Linux distributions without the blocks runtime installed" - it builds fine on the Ubuntu images used by the cI bot 🙂 That said, it's a problem that needs to be fixed. In the interim you can build without sourcekit. If you can modify your local copy of the sources, you can change the default SWIFT_BUILD_SOURCEKIT_default here: If you want to pass it in the build script then there's a --extra-cmake-options option which you can use, so something like: utils/build-script ---preset=buildbot_linux --extra-cmake-options=-DSWIFT_BUILD_SOURCEKIT=false |
Comment by Vladislav Dembskiy (JIRA) Thank you Alex! I have just did fresh checkout. But therу is something wrong with build_script. It does not accepted option ---extra-cmake-options
And help says that it should not accept any options if using presets. |
Comment by Vladislav Dembskiy (JIRA) No. On Gentoo build process stops with error I have alrady reported at SR-4074 |
If you run the build-script with a preset, you can use --expand-build-script-invocation to see what it would have run via the build script itself (in other words, expand the presets). You could use that to then add the extra-cmake-options argument. |
Comment by Vladislav Dembskiy (JIRA) Thank you, Alex! Therefore, I did fresh checkout, expand preset and run following build script o Linux From Scratch:
|
Comment by Vladislav Dembskiy (JIRA) Today I did fresh checkout but error is the same.
|
Comment by Vladislav Dembskiy (JIRA) Today I did fresh checkout and have got the same error on LFS. CoreFoundation/Collections.subproj/CFBasicHash.c:14:10: fatal error: 'Block.h' file not found Build script was: |
No need to keep pasting the same message. If you don't have the blocks runtime installed, you'll continue to get this message. |
Comment by Vladislav Dembskiy (JIRA) I did install libblocksruntime from Ubuntu sources and curtly I do not see that issue |
This issue still occurs, and I'm not aware of any word from maintainers that this is not a use case they want to support eventually (iirc, Dispatch already moved from requiring a blocks runtime present in the system to using a bundled blocks runtime). FWIW, Arch Linux is also on the list of distributions without a blocks runtime package. |
Comment by Vladislav Dembskiy (JIRA) Today I have updated Gentoo and did fresh Swift checkout. Nevetheless, I have got the similar error: [553/835] Building CXX object tools/SourceKit/lib/Support/CMakeFiles/SourceKitSupport.dir/Concurrency-libdispatch.cpp.o |
The same error Vladislav (JIRA User)] reported above occurs when building on Ubuntu 14.04 LTS as well unless libblocksruntime-dev is installed. The system package manager installs an ancient version from 2010, @swift-ci create |
Comment by Vladislav Dembskiy (JIRA) Yes, I think it would be good if libblocksruntime will be build on every system there it does not exists. And compiler-rt probably is the best source for it. |
We build blocks runtime and share it across everything now. |
Environment
Linux ved-hp-gentoo 4.9.6-gentoo-r1 #5 SMP Sun Feb 5 21:47:04 MSK 2017 x86_64 Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz GenuineIntel GNU/Linux
Additional Detail from JIRA
md5: b61152b9d429beca7da1f76fc3589670
Issue Description:
I did fresh checkout and run standarad bild script:
The text was updated successfully, but these errors were encountered: