Libdispatch build failure

(Eben ) #1

Compiling on a Macbook Pro running GNU/Linux, there is a lot that does compile but the build fails as follows. Does anyone know if this is a known problem?

-- Build files have been written to: /home/swift/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/tools/SourceKit/libdispatch-prefix/src/libdispatch-build
[861/950] Performing build step for 'libdispatch'
FAILED: tools/SourceKit/libdispatch-prefix/src/libdispatch-stamp/libdispatch-build tools/SourceKit/libdispatch-prefix/lib/libdispatch.so tools/SourceKit/libdispatch-prefix/lib/dispatch tools/SourceKit/libdispatch-prefix/lib/libBlocksRuntime.so tools/SourceKit/libdispatch-prefix/lib/BlocksRuntime 
cd /home/swift/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/tools/SourceKit/libdispatch-prefix/src/libdispatch-build && /usr/bin/cmake --build .
[1/30] Building C object CMakeFiles/BlocksRuntime.dir/src/BlocksRuntime/data.c.o
[2/30] Generating /home/swift/src/swift-corelibs-libdispatch/dispatch/module.modulemap, /home/swift/src/swift-corelibs-libdispatch/private/module.modulemap
[3/30] Building C object CMakeFiles/BlocksRuntime.dir/src/BlocksRuntime/runtime.c.o
[4/30] Linking C shared library libBlocksRuntime.so
[5/30] Building C object src/CMakeFiles/dispatch.dir/introspection.c.o
[6/30] Building C object src/CMakeFiles/dispatch.dir/allocator.c.o
[7/30] Building C object src/CMakeFiles/dispatch.dir/benchmark.c.o
[8/30] Building C object src/CMakeFiles/dispatch.dir/mach.c.o
[9/30] Building C object src/CMakeFiles/dispatch.dir/data.c.o
[10/30] Building C object src/CMakeFiles/dispatch.dir/apply.c.o
[11/30] Building C object src/CMakeFiles/dispatch.dir/init.c.o
[12/30] Building C object src/CMakeFiles/dispatch.dir/object.c.o
[13/30] Building C object src/CMakeFiles/dispatch.dir/once.c.o
[14/30] Building C object src/CMakeFiles/dispatch.dir/semaphore.c.o
[15/30] Building C object src/CMakeFiles/dispatch.dir/time.c.o
[16/30] Building C object src/CMakeFiles/dispatch.dir/voucher.c.o
[17/30] Building C object src/CMakeFiles/dispatch.dir/shims.c.o
[18/30] Building C object src/CMakeFiles/dispatch.dir/transform.c.o
[19/30] Building C object src/CMakeFiles/dispatch.dir/event/event_epoll.c.o
FAILED: src/CMakeFiles/dispatch.dir/event/event_epoll.c.o 
/home/swift/src/build/Ninja-ReleaseAssert/llvm-linux-x86_64/bin/clang  -DDISPATCH_USE_DTRACE=0 -DHAVE_CONFIG_H -D_GNU_SOURCE=1 -Ddispatch_EXPORTS -isystem /home/swift/src/swift-corelibs-libdispatch/src/BlocksRuntime -I. -I/home/swift/src/swift-corelibs-libdispatch -I/home/swift/src/swift-corelibs-libdispatch/src -Isrc -I/home/swift/src/swift-corelibs-libdispatch/private -Wno-unknown-warning-option -Werror=unguarded-availability-new -fno-stack-protector -fPIC -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -Wcovered-switch-default -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fPIC -fvisibility=hidden   -Werror -Wall -Wextra -Warray-bounds-pointer-arithmetic -Wassign-enum -Watomic-properties -Wcomma -Wconditional-uninitialized -Wconversion -Wcovered-switch-default -Wdate-time -Wdeprecated -Wdocumentation -Wdouble-promotion -Wduplicate-enum -Wexpansion-to-defined -Wfloat-equal -Widiomatic-parentheses -Winfinite-recursion -Wmissing-prototypes -Wnewline-eof -Wnullable-to-nonnull-conversion -Wobjc-interface-ivars -Wover-aligned -Wpacked -Wpointer-arith -Wselector -Wshadow -Wshorten-64-to-32 -Wsign-conversion -Wstatic-in-inline -Wsuper-class-method-mismatch -Wswitch-enum -Wunguarded-availability -Wunreachable-code -Wunused -Wno-unknown-warning-option -Wno-trigraphs -Wno-four-char-constants -Wno-disabled-macro-expansion -Wno-pedantic -Wno-bad-function-cast -Wno-c++-compat -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-cast-align -Wno-cast-qual -Wno-documentation-unknown-command -Wno-format-nonliteral -Wno-missing-variable-declarations -Wno-old-style-cast -Wno-padded -Wno-reserved-id-macro -Wno-shift-sign-overflow -Wno-undef -Wno-unreachable-code-aggressive -Wno-unused-macros -Wno-used-but-marked-unused -Wno-vla -Wno-error=assign-enum -fno-exceptions -fblocks -momit-leaf-frame-pointer -pthread -std=gnu11 -MMD -MT src/CMakeFiles/dispatch.dir/event/event_epoll.c.o -MF src/CMakeFiles/dispatch.dir/event/event_epoll.c.o.d -o src/CMakeFiles/dispatch.dir/event/event_epoll.c.o   -c /home/swift/src/swift-corelibs-libdispatch/src/event/event_epoll.c
/home/swift/src/swift-corelibs-libdispatch/src/event/event_epoll.c:509:3: error: implicit declaration of function 'LIST_FOREACH_SAFE' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                LIST_FOREACH_SAFE(dul, &dmn->dmn_readers_head, du_link, dul_next) {
                ^
/home/swift/src/swift-corelibs-libdispatch/src/event/event_epoll.c:509:50: error: use of undeclared identifier 'du_link'; did you mean 'unlink'?
                LIST_FOREACH_SAFE(dul, &dmn->dmn_readers_head, du_link, dul_next) {
                                                               ^~~~~~~
                                                               unlink
/usr/include/unistd.h:829:12: note: 'unlink' declared here
extern int unlink (const char *__name) __THROW __nonnull ((1));
           ^
/home/swift/src/swift-corelibs-libdispatch/src/event/event_epoll.c:509:68: error: expected ';' after expression
                LIST_FOREACH_SAFE(dul, &dmn->dmn_readers_head, du_link, dul_next) {
                                                                                 ^
                                                                                 ;
/home/swift/src/swift-corelibs-libdispatch/src/event/event_epoll.c:562:3: error: implicit declaration of function 'LIST_FOREACH_SAFE' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                LIST_FOREACH_SAFE(dul, &dmn->dmn_readers_head, du_link, dul_next) {
                ^
/home/swift/src/swift-corelibs-libdispatch/src/event/event_epoll.c:562:50: error: use of undeclared identifier 'du_link'; did you mean 'unlink'?
                LIST_FOREACH_SAFE(dul, &dmn->dmn_readers_head, du_link, dul_next) {
                                                               ^~~~~~~
                                                               unlink
/usr/include/unistd.h:829:12: note: 'unlink' declared here
extern int unlink (const char *__name) __THROW __nonnull ((1));
           ^
/home/swift/src/swift-corelibs-libdispatch/src/event/event_epoll.c:562:68: error: expected ';' after expression
                LIST_FOREACH_SAFE(dul, &dmn->dmn_readers_head, du_link, dul_next) {
                                                                                 ^
                                                                                 ;
/home/swift/src/swift-corelibs-libdispatch/src/event/event_epoll.c:575:3: error: implicit declaration of function 'LIST_FOREACH_SAFE' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                LIST_FOREACH_SAFE(dul, &dmn->dmn_writers_head, du_link, dul_next) {
                ^
/home/swift/src/swift-corelibs-libdispatch/src/event/event_epoll.c:575:50: error: use of undeclared identifier 'du_link'; did you mean 'unlink'?
                LIST_FOREACH_SAFE(dul, &dmn->dmn_writers_head, du_link, dul_next) {
                                                               ^~~~~~~
                                                               unlink
/usr/include/unistd.h:829:12: note: 'unlink' declared here
extern int unlink (const char *__name) __THROW __nonnull ((1));
           ^
/home/swift/src/swift-corelibs-libdispatch/src/event/event_epoll.c:575:68: error: expected ';' after expression
                LIST_FOREACH_SAFE(dul, &dmn->dmn_writers_head, du_link, dul_next) {
                                                                                 ^
                                                                                 ;
9 errors generated.
[20/30] Building C object src/CMakeFiles/dispatch.dir/io.c.o
[21/30] Building C object src/CMakeFiles/dispatch.dir/event/event_kevent.c.o
[22/30] Building C object src/CMakeFiles/dispatch.dir/source.c.o
[23/30] Building C object src/CMakeFiles/dispatch.dir/event/event.c.o
[24/30] Building C object src/CMakeFiles/dispatch.dir/queue.c.o
ninja: build stopped: subcommand failed.
[864/950] Compiling /home/swift/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/core/linux/x86_64/Swift.o
ninja: build stopped: subcommand failed.
swift/utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting
bash-4.3$ 

The source code was fetched using Slava_Pestov's recommended method:

mkdir src
cd src
git clone https://github.com/apple/swift -b swift-5.0-branch
cd swift
./utils/update-checkout --clone --scheme=swift-5.0-branch
(Saleem Abdulrasool) #2

You are missing libbsd's developer package (this is documented in README.md). The package installation is specific to your Linux distribution.

(Eben ) #3

Thanks. I've installed libbsd and libmd, and everything else that was missing, from what I can tell.
But the result is not much better. It doesn't know what du_link is.

swift/utils/build-script -R
swift/utils/build-script: note: Using toolchain default
which: no ninja in (/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib64/kde4/libexec:/usr/lib64/qt/bin:/usr/share/texmf/bin)
which: no ninja-build in (/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib64/kde4/libexec:/usr/lib64/qt/bin:/usr/share/texmf/bin)
+ mkdir -p /home/swift/src/build/Ninja-ReleaseAssert
+ env HOST_VARIABLE_linux_x86_64__SWIFT_BENCHMARK_TARGETS= HOST_VARIABLE_linux_x86_64__SWIFT_RUN_BENCHMARK_TARGETS= HOST_VARIABLE_linux_x86_64__SWIFT_SDKS=LINUX HOST_VARIABLE_linux_x86_64__SWIFT_STDLIB_TARGETS=swift-test-stdlib-linux-x86_64 HOST_VARIABLE_linux_x86_64__SWIFT_TEST_TARGETS= /home/swift/src/swift/utils/build-script-impl --workspace /home/swift/src --build-dir /home/swift/src/build/Ninja-ReleaseAssert --install-prefix /usr --host-target linux-x86_64 --stdlib-deployment-targets linux-x86_64 --host-cc /usr/bin/clang --host-cxx /usr/bin/clang++ --darwin-xcrun-toolchain default --darwin-deployment-version-osx=10.9 --darwin-deployment-version-ios=7.0 --darwin-deployment-version-tvos=9.0 --darwin-deployment-version-watchos=2.0 --cmake /usr/bin/cmake --cmark-build-type Release --llvm-build-type Release --swift-build-type Release --swift-stdlib-build-type Release --lldb-build-type Release --lldb-build-with-xcode 1 --foundation-build-type Release --libdispatch-build-type Release --libicu-build-type Release --xctest-build-type Release --swiftpm-build-type Release --swiftsyntax-build-type Release --skstresstester-build-type Release --llbuild-build-type Release --swift-enable-assertions true --swift-stdlib-enable-assertions true --swift-analyze-code-coverage false --llbuild-enable-assertions true --lldb-assertions true --cmake-generator Ninja --build-jobs 4 '--common-cmake-options=-G Ninja -DCMAKE_C_COMPILER:PATH=/usr/bin/clang -DCMAKE_CXX_COMPILER:PATH=/usr/bin/clang++ -DCMAKE_LIBTOOL:PATH=/usr/bin/libtool -DLLVM_VERSION_MAJOR:STRING=7 -DLLVM_VERSION_MINOR:STRING=0 -DLLVM_VERSION_PATCH:STRING=0 -DCLANG_VERSION_MAJOR:STRING=7 -DCLANG_VERSION_MINOR:STRING=0 -DCLANG_VERSION_PATCH:STRING=0 -DCMAKE_MAKE_PROGRAM=/home/swift/src/build/Ninja-ReleaseAssert/ninja-build/ninja' --build-args=-j4 --cmark-cmake-options= '--llvm-cmake-options=-DLLVM_ENABLE_ASSERTIONS=TRUE -DLLVM_TARGETS_TO_BUILD=X86;ARM;AArch64;PowerPC;SystemZ;Mips' '--swift-cmake-options=-DSWIFT_STDLIB_ENABLE_SIL_OWNERSHIP=FALSE -DSWIFT_ENABLE_GUARANTEED_NORMAL_ARGUMENTS=TRUE -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE -DSWIFT_FORCE_OPTIMIZED_TYPECHECKER=FALSE -DSWIFT_STDLIB_ENABLE_STDLIBCORE_EXCLUSIVITY_CHECKING=FALSE' --build-stdlib-deployment-targets all --ninja-bin=/home/swift/src/build/Ninja-ReleaseAssert/ninja-build/ninja --skip-build-foundation --skip-build-xctest --skip-build-lldb --skip-build-llbuild --skip-build-libcxx --skip-build-libdispatch --skip-build-libicu --skip-build-swiftpm --skip-build-swiftsyntax --skip-build-skstresstester --skip-build-playgroundsupport --build-swift-dynamic-stdlib --build-swift-dynamic-sdk-overlay --skip-build-ios-device --skip-build-ios-simulator --skip-build-tvos-device --skip-build-tvos-simulator --skip-build-watchos-device --skip-build-watchos-simulator --skip-build-android --skip-test-swift --skip-test-cmark --skip-test-lldb --skip-test-llbuild --skip-test-swiftpm --skip-test-swiftsyntax --skip-test-skstresstester --skip-test-xctest --skip-test-foundation --skip-test-libdispatch --skip-test-libicu --skip-test-playgroundsupport --skip-test-linux --skip-test-freebsd --skip-test-cygwin --skip-test-osx --skip-test-ios-host --skip-test-ios-simulator --skip-test-tvos-host --skip-test-tvos-simulator --skip-test-watchos-host --skip-test-watchos-simulator --skip-test-android-host --skip-test-benchmarks --skip-test-optimized --skip-test-optimize-for-size --android-deploy-device-path /data/local/tmp --host-libtool /usr/bin/libtool --llvm-lit-args=-sv
Building the standard library for: swift-test-stdlib-linux-x86_64
+ /usr/bin/cmake --build /home/swift/src/build/Ninja-ReleaseAssert/cmark-linux-x86_64 -- -j4 all
ninja: no work to do.
symlinking the system headers (/usr/include/c++) into the local clang build directory (/home/swift/src/build/Ninja-ReleaseAssert/llvm-linux-x86_64/include).
+ ln -s -f /usr/include/c++ /home/swift/src/build/Ninja-ReleaseAssert/llvm-linux-x86_64/include
+ /usr/bin/cmake --build /home/swift/src/build/Ninja-ReleaseAssert/llvm-linux-x86_64 -- -j4 all
ninja: no work to do.
+ /usr/bin/cmake --build /home/swift/src/build/Ninja-ReleaseAssert/swift-linux-x86_64 -- -j4 all swift-test-stdlib-linux-x86_64
[10/55] Performing build step for 'libdispatch'
FAILED: tools/SourceKit/libdispatch-prefix/src/libdispatch-stamp/libdispatch-build tools/SourceKit/libdispatch-prefix/lib/libdispatch.so tools/SourceKit/libdispatch-prefix/lib/dispatch tools/SourceKit/libdispatch-prefix/lib/libBlocksRuntime.so tools/SourceKit/libdispatch-prefix/lib/BlocksRuntime 
cd /home/swift/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/tools/SourceKit/libdispatch-prefix/src/libdispatch-build && /usr/bin/cmake --build .
[1/29] Building C object CMakeFiles/BlocksRuntime.dir/src/BlocksRuntime/data.c.o
[2/29] Building C object CMakeFiles/BlocksRuntime.dir/src/BlocksRuntime/runtime.c.o
[3/29] Linking C shared library libBlocksRuntime.so
[4/29] Building C object src/CMakeFiles/dispatch.dir/introspection.c.o
[5/29] Building C object src/CMakeFiles/dispatch.dir/benchmark.c.o
[6/29] Building C object src/CMakeFiles/dispatch.dir/allocator.c.o
[7/29] Building C object src/CMakeFiles/dispatch.dir/data.c.o
[8/29] Building C object src/CMakeFiles/dispatch.dir/apply.c.o
[9/29] Building C object src/CMakeFiles/dispatch.dir/mach.c.o
[10/29] Building C object src/CMakeFiles/dispatch.dir/object.c.o
[11/29] Building C object src/CMakeFiles/dispatch.dir/init.c.o
[12/29] Building C object src/CMakeFiles/dispatch.dir/once.c.o
[13/29] Building C object src/CMakeFiles/dispatch.dir/time.c.o
[14/29] Building C object src/CMakeFiles/dispatch.dir/semaphore.c.o
[15/29] Building C object src/CMakeFiles/dispatch.dir/voucher.c.o
[16/29] Building C object src/CMakeFiles/dispatch.dir/shims.c.o
[17/29] Building C object src/CMakeFiles/dispatch.dir/transform.c.o
[18/29] Building C object src/CMakeFiles/dispatch.dir/event/event_epoll.c.o
FAILED: src/CMakeFiles/dispatch.dir/event/event_epoll.c.o 
/home/swift/src/build/Ninja-ReleaseAssert/llvm-linux-x86_64/bin/clang  -DDISPATCH_USE_DTRACE=0 -DHAVE_CONFIG_H -D_GNU_SOURCE=1 -Ddispatch_EXPORTS -isystem /home/swift/src/swift-corelibs-libdispatch/src/BlocksRuntime -I. -I/home/swift/src/swift-corelibs-libdispatch -I/home/swift/src/swift-corelibs-libdispatch/src -Isrc -I/home/swift/src/swift-corelibs-libdispatch/private -Wno-unknown-warning-option -Werror=unguarded-availability-new -fno-stack-protector -fPIC -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -Wcovered-switch-default -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fPIC -fvisibility=hidden   -Werror -Wall -Wextra -Warray-bounds-pointer-arithmetic -Wassign-enum -Watomic-properties -Wcomma -Wconditional-uninitialized -Wconversion -Wcovered-switch-default -Wdate-time -Wdeprecated -Wdocumentation -Wdouble-promotion -Wduplicate-enum -Wexpansion-to-defined -Wfloat-equal -Widiomatic-parentheses -Winfinite-recursion -Wmissing-prototypes -Wnewline-eof -Wnullable-to-nonnull-conversion -Wobjc-interface-ivars -Wover-aligned -Wpacked -Wpointer-arith -Wselector -Wshadow -Wshorten-64-to-32 -Wsign-conversion -Wstatic-in-inline -Wsuper-class-method-mismatch -Wswitch-enum -Wunguarded-availability -Wunreachable-code -Wunused -Wno-unknown-warning-option -Wno-trigraphs -Wno-four-char-constants -Wno-disabled-macro-expansion -Wno-pedantic -Wno-bad-function-cast -Wno-c++-compat -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-cast-align -Wno-cast-qual -Wno-documentation-unknown-command -Wno-format-nonliteral -Wno-missing-variable-declarations -Wno-old-style-cast -Wno-padded -Wno-reserved-id-macro -Wno-shift-sign-overflow -Wno-undef -Wno-unreachable-code-aggressive -Wno-unused-macros -Wno-used-but-marked-unused -Wno-vla -Wno-error=assign-enum -fno-exceptions -fblocks -momit-leaf-frame-pointer -pthread -std=gnu11 -MMD -MT src/CMakeFiles/dispatch.dir/event/event_epoll.c.o -MF src/CMakeFiles/dispatch.dir/event/event_epoll.c.o.d -o src/CMakeFiles/dispatch.dir/event/event_epoll.c.o   -c /home/swift/src/swift-corelibs-libdispatch/src/event/event_epoll.c
/home/swift/src/swift-corelibs-libdispatch/src/event/event_epoll.c:509:3: error: implicit declaration of function 'LIST_FOREACH_SAFE' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                LIST_FOREACH_SAFE(dul, &dmn->dmn_readers_head, du_link, dul_next) {
                ^
/home/swift/src/swift-corelibs-libdispatch/src/event/event_epoll.c:509:50: error: use of undeclared identifier 'du_link'; did you mean 'unlink'?
                LIST_FOREACH_SAFE(dul, &dmn->dmn_readers_head, du_link, dul_next) {
                                                               ^~~~~~~
                                                               unlink
/usr/include/unistd.h:829:12: note: 'unlink' declared here
extern int unlink (const char *__name) __THROW __nonnull ((1));
           ^
/home/swift/src/swift-corelibs-libdispatch/src/event/event_epoll.c:509:68: error: expected ';' after expression
                LIST_FOREACH_SAFE(dul, &dmn->dmn_readers_head, du_link, dul_next) {
                                                                                 ^
                                                                                 ;
/home/swift/src/swift-corelibs-libdispatch/src/event/event_epoll.c:562:3: error: implicit declaration of function 'LIST_FOREACH_SAFE' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                LIST_FOREACH_SAFE(dul, &dmn->dmn_readers_head, du_link, dul_next) {
                ^
/home/swift/src/swift-corelibs-libdispatch/src/event/event_epoll.c:562:50: error: use of undeclared identifier 'du_link'; did you mean 'unlink'?
                LIST_FOREACH_SAFE(dul, &dmn->dmn_readers_head, du_link, dul_next) {
                                                               ^~~~~~~
                                                               unlink
/usr/include/unistd.h:829:12: note: 'unlink' declared here
extern int unlink (const char *__name) __THROW __nonnull ((1));
           ^
/home/swift/src/swift-corelibs-libdispatch/src/event/event_epoll.c:562:68: error: expected ';' after expression
                LIST_FOREACH_SAFE(dul, &dmn->dmn_readers_head, du_link, dul_next) {
                                                                                 ^
                                                                                 ;
/home/swift/src/swift-corelibs-libdispatch/src/event/event_epoll.c:575:3: error: implicit declaration of function 'LIST_FOREACH_SAFE' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                LIST_FOREACH_SAFE(dul, &dmn->dmn_writers_head, du_link, dul_next) {
                ^
/home/swift/src/swift-corelibs-libdispatch/src/event/event_epoll.c:575:50: error: use of undeclared identifier 'du_link'; did you mean 'unlink'?
                LIST_FOREACH_SAFE(dul, &dmn->dmn_writers_head, du_link, dul_next) {
                                                               ^~~~~~~
                                                               unlink
/usr/include/unistd.h:829:12: note: 'unlink' declared here
extern int unlink (const char *__name) __THROW __nonnull ((1));
           ^
/home/swift/src/swift-corelibs-libdispatch/src/event/event_epoll.c:575:68: error: expected ';' after expression
                LIST_FOREACH_SAFE(dul, &dmn->dmn_writers_head, du_link, dul_next) {
                                                                                 ^
                                                                                 ;
9 errors generated.
[19/29] Building C object src/CMakeFiles/dispatch.dir/io.c.o
[20/29] Building C object src/CMakeFiles/dispatch.dir/event/event_kevent.c.o
[21/29] Building C object src/CMakeFiles/dispatch.dir/event/event.c.o
[22/29] Building C object src/CMakeFiles/dispatch.dir/source.c.o
[23/29] Building C object src/CMakeFiles/dispatch.dir/queue.c.o
ninja: build stopped: subcommand failed.
[13/55] Building CXX object tools/SourceKit/lib/SwiftLang/CMakeFiles/SourceKitSwiftLang.dir/SwiftCompletion.cpp.o
ninja: build stopped: subcommand failed.
swift/utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting
bash-4.3$

Honestly guys I'm starting to worry that Swift is the Butterfly Switch of languages i.e. poorly concieved and executed. When is this compiler going to build on GNU/Linux, preferably on a Linux distro that people actually use (not Ubuntu)?

(Neil Jones) #4

Just wondering which GNU/Linux you are using. Could you elaborate a bit i.e. where can I download / install etc.
Thanks.

(Saleem Abdulrasool) #5

I doubt that people will be inclined to help you given the snide remarks at the project. This is not a small project at all, and there are a significant number of people working on this and building the project continually. There are differences in between your setup and others, which means that there will be issues that you will need to deal with.

As to the actual issue, LIST_FOREACH_SAFE is defined in libbsd, so I suspect that libbsd is not installed in the appropriate location or for some reason CMake is not seeing it. You did not provide enough context to be able to determine that. That should be mentioned in the CMake configure output though.

1 Like
(Eben ) #6

This post was flagged by the community and is temporarily hidden.