[swift-corelibs-dev] Compiling corelibs-libdispatch

Andrey Fidrya af at zabiyaka.com
Sun Aug 7 05:43:07 CDT 2016


Hi,

I'm trying to compile swift-3.0-branch of swift-corelibs-libdispatch on Ubuntu 14,
but swiftc crashes. Which Swift version should i use?

I'm using 2016-07-25 binary snapshot.

$ swift --version
Swift version 3.0-dev (LLVM 440a472499, Clang e10506ae1c, Swift 395e967875)
Target: x86_64-unknown-linux-gnu

$ clang --version
clang version 3.8.0-2ubuntu3~trusty4 (tags/RELEASE_380/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
I've tried swift-3.0-preview branches but they crash in the same place.
exeperimental/foundation branch builds succesfully.

Steps I've done:

sudo apt-get install autoconf libtool libkqueue-dev libkqueue0 libcurl4-openssl-dev libbsd-dev libblocksruntime-dev
export SWIFT_HOME=~/.swiftenv/versions/DEVELOPMENT-SNAPSHOT-2016-07-25-a
git clone --recursive -b swift-3.0-branch https://github.com/apple/swift-corelibs-libdispatch.git
cd swift-corelibs-libdispatch
sh ./autogen.sh
./configure --with-swift-toolchain=$SWIFT_HOME/usr --prefix=$SWIFT_HOME/usr
make


Build log tail:

/home/user/.swiftenv/versions/DEVELOPMENT-SNAPSHOT-2016-07-25-a/usr/bin/swiftc -frontend -c /home/user/dev/swift-corelibs-libdispatch/src/swift/Block.swift /home/user/dev/swift-corelibs-libdispatch/src/swift/Data.swift /home/user/dev/swift-corelibs-libdispatch/src/swift/Dispatch.swift /home/user/dev/swift-corelibs-libdispatch/src/swift/IO.swift /home/user/dev/swift-corelibs-libdispatch/src/swift/Private.swift /home/user/dev/swift-corelibs-libdispatch/src/swift/Queue.swift /home/user/dev/swift-corelibs-libdispatch/src/swift/Source.swift /home/user/dev/swift-corelibs-libdispatch/src/swift/Time.swift /home/user/dev/swift-corelibs-libdispatch/src/swift/Wrapper.swift -primary-file /home/user/dev/swift-corelibs-libdispatch/src/swift/Block.swift \
	-Xcc -fmodule-map-file=/home/user/dev/swift-corelibs-libdispatch/dispatch/module.modulemap -I/home/user/dev/swift-corelibs-libdispatch -Xcc -fblocks -O -module-name Dispatch -module-link-name dispatch \
	-o /home/user/dev/swift-corelibs-libdispatch/src/swift/Block.o -emit-module-path /home/user/dev/swift-corelibs-libdispatch/src/swift/Block.o.~partial.swiftmodule \
	-emit-module-doc-path /home/user/dev/swift-corelibs-libdispatch/src/swift/Block.o.~partial.swiftdoc -emit-dependencies-path /home/user/dev/swift-corelibs-libdispatch/src/swift/Block.o.d \
	-emit-reference-dependencies-path /home/user/dev/swift-corelibs-libdispatch/src/swift/Block.o.swiftdeps \
	-module-cache-path ..
swiftc: /home/buildnode/jenkins/workspace/oss-swift-package-linux-ubuntu-14_04/llvm/tools/clang/lib/Serialization/ASTWriter.cpp:2376: unsigned int clang::ASTWriter::getSubmoduleID(clang::Module *): Assertion `(ID || !Mod) && "asked for module ID for non-local, non-imported module"' failed.
0  swiftc          0x0000000003321058 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1  swiftc          0x000000000331f826 llvm::sys::RunSignalHandlers() + 54
2  swiftc          0x0000000003321b8a
3  libpthread.so.0 0x00002b3be0734330
4  libc.so.6       0x00002b3be1c02c37 gsignal + 55
5  libc.so.6       0x00002b3be1c06028 abort + 328
6  libc.so.6       0x00002b3be1bfbbf6
7  libc.so.6       0x00002b3be1bfbca2
8  swiftc          0x000000000168b436 clang::ASTWriter::WritePreprocessor(clang::Preprocessor const&, bool) + 5974
9  swiftc          0x00000000016a6558 clang::ASTWriter::WriteASTCore(clang::Sema&, llvm::StringRef, std::string const&, clang::Module*) + 12488
10 swiftc          0x00000000016a344d clang::ASTWriter::WriteAST(clang::Sema&, std::string const&, clang::Module*, llvm::StringRef, bool) + 589
11 swiftc          0x00000000016dfa2b clang::PCHGenerator::HandleTranslationUnit(clang::ASTContext&) + 91
12 swiftc          0x00000000014e983c clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) + 44
13 swiftc          0x00000000016ec726 clang::ParseAST(clang::Sema&, bool, bool) + 614
14 swiftc          0x00000000014c5595 clang::FrontendAction::Execute() + 69
15 swiftc          0x000000000148e571 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1153
16 swiftc          0x00000000032befba llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 266
17 swiftc          0x00000000032bf144
18 swiftc          0x0000000003322aea
19 libpthread.so.0 0x00002b3be072c184
20 libc.so.6       0x00002b3be1cc637d clone + 109
Stack dump:
0.	<eof> parser at end of file
make[2]: *** [/home/user/dev/swift-corelibs-libdispatch/src/swift/Block.o] Aborted (core dumped)
make[2]: Leaving directory `/home/user/dev/swift-corelibs-libdispatch/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/user/dev/swift-corelibs-libdispatch/src'
make: *** [all-recursive] Error 1
user at smud:~/dev/swift-corelibs-libdispatch$ 

Regards,
Andrey



Andrey Fidrya
af at zabiyaka.com





More information about the swift-corelibs-dev mailing list