my swift toolchain build keeps failing while
Linking Swift shared library libswiftDispatch.so
.
the build output doesn’t indicate why the build is failing, although some of the “Looking for” failures seem suspicious.
Cleaning the libdispatch build directory
+ rm -rf /swift/swift-project/build/buildbot_linux/libdispatch-linux-x86_64
+ mkdir -p /swift/swift-project/build/buildbot_linux/libdispatch-linux-x86_64
+ mkdir -p /swift/swift-project/build/buildbot_linux/libdispatch-linux-x86_64/.cmake/api/v1/query
+ touch /swift/swift-project/build/buildbot_linux/libdispatch-linux-x86_64/.cmake/api/v1/query/codemodel-v2 /swift/swift-project/build/buildbot_linux/libdispatch-linux-x86_64/.cmake/api/v1/query/cache-v2
+ pushd /swift/swift-project/build/buildbot_linux/libdispatch-linux-x86_64
/swift/swift-project/build/buildbot_linux/libdispatch-linux-x86_64 /swift/swift-project/swift
+ env /swift/swift-project/build/cmake-linux-x86_64/bin/cmake -DENABLE_SWIFT=YES -G Ninja -DCMAKE_C_COMPILER:PATH=/opt/swift/5.9.2/usr/bin/clang -DCMAKE_CXX_COMPILER:PATH=/opt/swift/5.9.2/usr/bin/clang++ -DCMAKE_Swift_COMPILER:PATH=/opt/swift/5.9.2/usr/bin/swiftc -DCMAKE_LIBTOOL:PATH=/usr/bin/libtool -DCMAKE_AR:PATH=/usr/bin/ar -DCMAKE_RANLIB:PATH=/usr/bin/ranlib -DLLVM_VERSION_MAJOR:STRING=17 -DLLVM_VERSION_MINOR:STRING=0 -DLLVM_VERSION_PATCH:STRING=0 -DCLANG_VERSION_MAJOR:STRING=17 -DCLANG_VERSION_MINOR:STRING=0 -DCLANG_VERSION_PATCH:STRING=0 -DCMAKE_MAKE_PROGRAM=/swift/swift-project/build/buildbot_linux/ninja-build/ninja -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_C_COMPILER:PATH=/swift/swift-project/build/buildbot_linux/llvm-linux-x86_64/bin/clang -DCMAKE_CXX_COMPILER:PATH=/swift/swift-project/build/buildbot_linux/llvm-linux-x86_64/bin/clang++ -DCMAKE_SWIFT_COMPILER:PATH=/swift/swift-project/build/buildbot_linux/swift-linux-x86_64/bin/swiftc -DCMAKE_Swift_COMPILER:PATH=/swift/swift-project/build/buildbot_linux/swift-linux-x86_64/bin/swiftc '-DCMAKE_Swift_FLAGS:STRING= -module-cache-path "/swift/swift-project/build/buildbot_linux/libdispatch-linux-x86_64/module-cache" ' -DCMAKE_INSTALL_PREFIX:PATH=/usr/ -DCMAKE_INSTALL_LIBDIR:PATH=lib -DSwift_DIR=/swift/swift-project/build/buildbot_linux/swift-linux-x86_64/lib/cmake/swift -DENABLE_TESTING=YES -DBUILD_SHARED_LIBS=YES -USWIFT_DARWIN_SUPPORTED_ARCHS -DSWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE:PATH=/swift/swift-project/swift-syntax -DSWIFT_BUILD_SWIFT_SYNTAX:BOOL=TRUE -DSWIFTSYNTAX_ENABLE_ASSERTIONS:BOOL=TRUE /swift/swift-project/swift-corelibs-libdispatch
-- The C compiler identification is Clang 17.0.0
-- The CXX compiler identification is Clang 17.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /swift/swift-project/build/buildbot_linux/llvm-linux-x86_64/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /swift/swift-project/build/buildbot_linux/llvm-linux-x86_64/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- The Swift compiler identification is Apple 5.11
-- Check for working Swift compiler: /swift/swift-project/build/buildbot_linux/swift-linux-x86_64/bin/swiftc
-- Check for working Swift compiler: /swift/swift-project/build/buildbot_linux/swift-linux-x86_64/bin/swiftc - works
-- Looking for __GNU_LIBRARY__
-- Looking for __GNU_LIBRARY__ - found
-- Performing Test __BUILTIN_TRAP
-- Performing Test __BUILTIN_TRAP - Success
-- Found LibRT: /usr/lib64/librt.a
-- Looking for _pthread_workqueue_init
-- Looking for _pthread_workqueue_init - not found
-- Looking for getprogname
-- Looking for getprogname - not found
-- Looking for mach_absolute_time
-- Looking for mach_absolute_time - not found
-- Looking for mach_approximate_time
-- Looking for mach_approximate_time - not found
-- Looking for mach_port_construct
-- Looking for mach_port_construct - not found
-- Looking for malloc_create_zone
-- Looking for malloc_create_zone - not found
-- Looking for posix_fadvise
-- Looking for posix_fadvise - found
-- Looking for posix_spawnp
-- Looking for posix_spawnp - found
-- Looking for pthread_key_init_np
-- Looking for pthread_key_init_np - not found
-- Looking for pthread_attr_setcpupercent_np
-- Looking for pthread_attr_setcpupercent_np - not found
-- Looking for pthread_yield_np
-- Looking for pthread_yield_np - not found
-- Looking for pthread_main_np
-- Looking for pthread_main_np - not found
-- Looking for pthread_workqueue_setdispatch_np
-- Looking for pthread_workqueue_setdispatch_np - not found
-- Looking for strlcpy
-- Looking for strlcpy - not found
-- Looking for sysconf
-- Looking for sysconf - found
-- Looking for arc4random
-- Looking for arc4random - not found
-- Looking for include file TargetConditionals.h
-- Looking for include file TargetConditionals.h - not found
-- Looking for include file dlfcn.h
-- Looking for include file dlfcn.h - found
-- Looking for include file fcntl.h
-- Looking for include file fcntl.h - found
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Looking for include file libkern/OSAtomic.h
-- Looking for include file libkern/OSAtomic.h - not found
-- Looking for include file libkern/OSCrossEndian.h
-- Looking for include file libkern/OSCrossEndian.h - not found
-- Looking for include file libproc_internal.h
-- Looking for include file libproc_internal.h - not found
-- Looking for include file mach/mach.h
-- Looking for include file mach/mach.h - not found
-- Looking for include file malloc/malloc.h
-- Looking for include file malloc/malloc.h - not found
-- Looking for include file memory.h
-- Looking for include file memory.h - found
-- Looking for include file pthread/qos.h
-- Looking for include file pthread/qos.h - not found
-- Looking for include file pthread/workqueue_private.h
-- Looking for include file pthread/workqueue_private.h - not found
-- Looking for include file pthread_machdep.h
-- Looking for include file pthread_machdep.h - not found
-- Looking for include file pthread_np.h
-- Looking for include file pthread_np.h - not found
-- Looking for include file pthread_workqueue.h
-- Looking for include file pthread_workqueue.h - not found
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Looking for include file stdlib.h
-- Looking for include file stdlib.h - found
-- Looking for include file string.h
-- Looking for include file string.h - found
-- Looking for include file strings.h
-- Looking for include file strings.h - found
-- Looking for include file sys/guarded.h
-- Looking for include file sys/guarded.h - not found
-- Looking for include file sys/stat.h
-- Looking for include file sys/stat.h - found
-- Looking for include file sys/types.h
-- Looking for include file sys/types.h - found
-- Looking for include file objc/objc-internal.h
-- Looking for include file objc/objc-internal.h - not found
-- Looking for sem_init in pthread
-- Looking for sem_init in pthread - found
-- Looking for CLOCK_UPTIME
-- Looking for CLOCK_UPTIME - not found
-- Looking for CLOCK_UPTIME_FAST
-- Looking for CLOCK_UPTIME_FAST - not found
-- Looking for CLOCK_MONOTONIC
-- Looking for CLOCK_MONOTONIC - found
-- Looking for CLOCK_REALTIME
-- Looking for CLOCK_REALTIME - found
-- Looking for CLOCK_MONOTONIC_COARSE
-- Looking for CLOCK_MONOTONIC_COARSE - found
-- Looking for FD_COPY
-- Looking for FD_COPY - not found
-- Looking for NOTE_LOWAT
-- Looking for NOTE_LOWAT - not found
-- Looking for NOTE_NONE
-- Looking for NOTE_NONE - not found
-- Looking for NOTE_REAP
-- Looking for NOTE_REAP - not found
-- Looking for NOTE_REVOKE
-- Looking for NOTE_REVOKE - not found
-- Looking for NOTE_SIGNAL
-- Looking for NOTE_SIGNAL - not found
-- Looking for POSIX_SPAWN_START_SUSPENDED
-- Looking for POSIX_SPAWN_START_SUSPENDED - not found
-- Looking for SIGEMT
-- Looking for SIGEMT - not found
-- Looking for VQ_DESIRED_DISK
-- Looking for VQ_DESIRED_DISK - not found
-- Looking for VQ_NEARLOWDISK
-- Looking for VQ_NEARLOWDISK - not found
-- Looking for VQ_QUOTA
-- Looking for VQ_QUOTA - not found
-- Looking for VQ_UPDATE
-- Looking for VQ_UPDATE - not found
-- Looking for VQ_VERYLOWDISK
-- Looking for VQ_VERYLOWDISK - not found
-- Looking for VQ_FREE_SPACE_CHANGE
-- Looking for VQ_FREE_SPACE_CHANGE - not found
-- Looking for program_invocation_name
-- Looking for program_invocation_name - found
-- Looking for __printflike
-- Looking for __printflike - found
-- Performing Test C_SUPPORTS_OMIT_LEAF_FRAME_POINTER
-- Performing Test C_SUPPORTS_OMIT_LEAF_FRAME_POINTER - Success
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CLANG_VERSION_MAJOR
CLANG_VERSION_MINOR
CLANG_VERSION_PATCH
CMAKE_LIBTOOL
CMAKE_SWIFT_COMPILER
ENABLE_TESTING
LLVM_VERSION_MAJOR
LLVM_VERSION_MINOR
LLVM_VERSION_PATCH
SWIFTSYNTAX_ENABLE_ASSERTIONS
SWIFT_BUILD_SWIFT_SYNTAX
SWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE
Swift_DIR
-- Build files have been written to: /swift/swift-project/build/buildbot_linux/libdispatch-linux-x86_64
+ popd
/swift/swift-project/swift
+ /swift/swift-project/build/cmake-linux-x86_64/bin/cmake --build /swift/swift-project/build/buildbot_linux/libdispatch-linux-x86_64 -- -j12 all
[81/81][100%][5.014s] Linking Swift shared library libswiftDispatch.so
FAILED: libswiftDispatch.so src/swift/CMakeFiles/swiftDispatch.dir/Block.swift.o src/swift/CMakeFiles/swiftDispatch.dir/Data.swift.o src/swift/CMakeFiles/swiftDispatch.dir/Dispatch.swift.o src/swift/CMakeFiles/swiftDispatch.dir/IO.swift.o src/swift/CMakeFiles/swiftDispatch.dir/Private.swift.o src/swift/CMakeFiles/swiftDispatch.dir/Queue.swift.o src/swift/CMakeFiles/swiftDispatch.dir/Source.swift.o src/swift/CMakeFiles/swiftDispatch.dir/Time.swift.o src/swift/CMakeFiles/swiftDispatch.dir/Wrapper.swift.o src/swift/swift/Dispatch.swiftmodule
: && /swift/swift-project/build/buildbot_linux/swift-linux-x86_64/bin/swiftc -output-file-map src/swift/CMakeFiles/swiftDispatch.dir/Release/output-file-map.json -incremental -j 12 -emit-library -o libswiftDispatch.so -module-name Dispatch -module-link-name swiftDispatch -emit-module -emit-module-path src/swift/swift/Dispatch.swiftmodule -emit-dependencies -DswiftDispatch_EXPORTS -module-cache-path "/swift/swift-project/build/buildbot_linux/libdispatch-linux-x86_64/module-cache" -O -Xcc -fblocks -Xcc -fmodule-map-file=/swift/swift-project/swift-corelibs-libdispatch/dispatch/module.modulemap -Xcc -I/swift/swift-project/swift-corelibs-libdispatch -Xcc -I/swift/swift-project/swift-corelibs-libdispatch/src/swift/shims -vfsoverlay /swift/swift-project/build/buildbot_linux/libdispatch-linux-x86_64/dispatch-vfs-overlay.yaml -I /swift/swift-project/swift-corelibs-libdispatch/src/BlocksRuntime -I /swift/swift-project/build/buildbot_linux/libdispatch-linux-x86_64 -I /swift/swift-project/swift-corelibs-libdispatch -I /swift/swift-project/swift-corelibs-libdispatch/src -I /swift/swift-project/build/buildbot_linux/libdispatch-linux-x86_64/src /swift/swift-project/swift-corelibs-libdispatch/src/swift/Block.swift /swift/swift-project/swift-corelibs-libdispatch/src/swift/Data.swift /swift/swift-project/swift-corelibs-libdispatch/src/swift/Dispatch.swift /swift/swift-project/swift-corelibs-libdispatch/src/swift/IO.swift /swift/swift-project/swift-corelibs-libdispatch/src/swift/Private.swift /swift/swift-project/swift-corelibs-libdispatch/src/swift/Queue.swift /swift/swift-project/swift-corelibs-libdispatch/src/swift/Source.swift /swift/swift-project/swift-corelibs-libdispatch/src/swift/Time.swift /swift/swift-project/swift-corelibs-libdispatch/src/swift/Wrapper.swift -no-toolchain-stdlib-rpath -Xlinker -soname -Xlinker libswiftDispatch.so -L /swift/swift-project/build/buildbot_linux/libdispatch-linux-x86_64/src/swift -L /swift/swift-project/build/buildbot_linux/libdispatch-linux-x86_64 -L /swift/swift-project/build/buildbot_linux/libdispatch-linux-x86_64 -L /usr/lib/gcc/x86_64-amazon-linux/11 -Xlinker -rpath -Xlinker /swift/swift-project/build/buildbot_linux/libdispatch-linux-x86_64: src/swift/libDispatchStubs.a libdispatch.so libBlocksRuntime.so -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc && :
/swift/swift-project/swift-corelibs-libdispatch/src/swift/Dispatch.swift:99:4: warning: default will never be executed
default: return nil
^
error: fatalError
ninja: build stopped: subcommand failed.
ERROR: command terminated with a non-zero exit status 1, aborting
ERROR: command terminated with a non-zero exit status 1, aborting
any idea what’s going on here?