Building LLDB in swift-4.1-branch on Ubuntu 16.04 fails

linux
(Scott Densmore) #1

Hi,

I am trying to build swift-lldb from the swift-4.1-branch branch and it is failing. It fails with the following:
CMake Error at cmake/modules/HandleLLVMOptions.cmake:403 (message):
LLVM requires C++11 support but the '-std=c++11' flag isn't supported.
Call Stack (most recent call first):
CMakeLists.txt:593 (include)

Any help appreciated.

The following is the output of the CMakeError.log

`Determining if the include file malloc/malloc.h exists failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_75a7d"
[1/2] Building C object CMakeFiles/cmTC_75a7d.dir/CheckIncludeFile.c.o
FAILED: /usr/bin/clang -Wno-unknown-warning-option -Werror=unguarded-availability-new -g -o CMakeFiles/cmTC_75a7d.dir/CheckIncludeFile.c.o -c CheckIncludeFile.c
CheckIncludeFile.c:1:10: fatal error: 'malloc/malloc.h' file not found
#include <malloc/malloc.h>
^
1 error generated.
ninja: build stopped: subcommand failed.

Determining if the include file ndir.h exists failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_15954"
[1/2] Building C object CMakeFiles/cmTC_15954.dir/CheckIncludeFile.c.o
FAILED: /usr/bin/clang -Wno-unknown-warning-option -Werror=unguarded-availability-new -g -o CMakeFiles/cmTC_15954.dir/CheckIncludeFile.c.o -c CheckIncludeFile.c
CheckIncludeFile.c:1:10: fatal error: 'ndir.h' file not found
#include <ndir.h>
^
1 error generated.
ninja: build stopped: subcommand failed.

Determining if the include file sys/ndir.h exists failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_fb434"
[1/2] Building C object CMakeFiles/cmTC_fb434.dir/CheckIncludeFile.c.o
FAILED: /usr/bin/clang -Wno-unknown-warning-option -Werror=unguarded-availability-new -g -o CMakeFiles/cmTC_fb434.dir/CheckIncludeFile.c.o -c CheckIncludeFile.c
CheckIncludeFile.c:1:10: fatal error: 'sys/ndir.h' file not found
#include <sys/ndir.h>
^
1 error generated.
ninja: build stopped: subcommand failed.

Determining if the include file valgrind/valgrind.h exists failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_e80e6"
[1/2] Building C object CMakeFiles/cmTC_e80e6.dir/CheckIncludeFile.c.o
FAILED: /usr/bin/clang -Wno-unknown-warning-option -Werror=unguarded-availability-new -g -o CMakeFiles/cmTC_e80e6.dir/CheckIncludeFile.c.o -c CheckIncludeFile.c
CheckIncludeFile.c:1:10: fatal error: 'valgrind/valgrind.h' file not found
#include <valgrind/valgrind.h>
^
1 error generated.
ninja: build stopped: subcommand failed.

Determining if the include file mach/mach.h exists failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_d3b27"
[1/2] Building C object CMakeFiles/cmTC_d3b27.dir/CheckIncludeFile.c.o
FAILED: /usr/bin/clang -Wno-unknown-warning-option -Werror=unguarded-availability-new -g -o CMakeFiles/cmTC_d3b27.dir/CheckIncludeFile.c.o -c CheckIncludeFile.c
CheckIncludeFile.c:1:10: fatal error: 'mach/mach.h' file not found
#include <mach/mach.h>
^
1 error generated.
ninja: build stopped: subcommand failed.

Determining if the include file CrashReporterClient.h exists failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_0707e"
[1/2] Building C object CMakeFiles/cmTC_0707e.dir/CheckIncludeFile.c.o
FAILED: /usr/bin/clang -Wno-unknown-warning-option -Werror=unguarded-availability-new -g -o CMakeFiles/cmTC_0707e.dir/CheckIncludeFile.c.o -c CheckIncludeFile.c
CheckIncludeFile.c:1:10: fatal error: 'CrashReporterClient.h' file not found
#include <CrashReporterClient.h>
^
1 error generated.
ninja: build stopped: subcommand failed.

Determining if the pthread_create exist failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_ea1c8"
[1/2] Building C object CMakeFiles/cmTC_ea1c8.dir/CheckSymbolExists.c.o
[2/2] Linking C executable cmTC_ea1c8
FAILED: : && /usr/bin/clang -Wno-unknown-warning-option -Werror=unguarded-availability-new -g -fuse-ld=gold CMakeFiles/cmTC_ea1c8.dir/CheckSymbolExists.c.o -o cmTC_ea1c8 -lm && :
CheckSymbolExists.c:8: error: undefined reference to 'pthread_create'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

File /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_40bc3"
[1/2] Building C object CMakeFiles/cmTC_40bc3.dir/CheckFunctionExists.c.o
[2/2] Linking C executable cmTC_40bc3
FAILED: : && /usr/bin/clang -Wno-unknown-warning-option -Werror=unguarded-availability-new -g -DCHECK_FUNCTION_EXISTS=pthread_create -fuse-ld=gold CMakeFiles/cmTC_40bc3.dir/CheckFunctionExists.c.o -o cmTC_40bc3 -lpthreads -lm && :
/usr/bin/ld.gold: error: cannot find -lpthreads
/usr/share/cmake-3.5/Modules/CheckFunctionExists.c:14: error: undefined reference to 'pthread_create'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

Determining if the function xar_open exists in the xar failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_5dcc3"
[1/2] Building C object CMakeFiles/cmTC_5dcc3.dir/CheckFunctionExists.c.o
[2/2] Linking C executable cmTC_5dcc3
FAILED: : && /usr/bin/clang -Wno-unknown-warning-option -Werror=unguarded-availability-new -g -DCHECK_FUNCTION_EXISTS=xar_open -fuse-ld=gold CMakeFiles/cmTC_5dcc3.dir/CheckFunctionExists.c.o -o cmTC_5dcc3 -lxar -lm && :
/usr/bin/ld.gold: error: cannot find -lxar
/usr/share/cmake-3.5/Modules/CheckFunctionExists.c:14: error: undefined reference to 'xar_open'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

Determining if the arc4random exist failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_25c81"
[1/2] Building C object CMakeFiles/cmTC_25c81.dir/CheckSymbolExists.c.o
FAILED: /usr/bin/clang -Wno-unknown-warning-option -Werror=unguarded-availability-new -g -o CMakeFiles/cmTC_25c81.dir/CheckSymbolExists.c.o -c CheckSymbolExists.c
CheckSymbolExists.c:8:19: error: use of undeclared identifier 'arc4random'; did you mean 'srandom'?
return ((int*)(&arc4random))[argc];
^~~~~~~~~~
srandom
/usr/include/stdlib.h:324:13: note: 'srandom' declared here
extern void srandom (unsigned int __seed) __THROW;
^
1 error generated.
ninja: build stopped: subcommand failed.

File /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <stdlib.h>

int main(int argc, char** argv)
{
(void)argv;
#ifndef arc4random
return ((int*)(&arc4random))[argc];
#else
(void)argc;
return 0;
#endif
}

Determining if the mallctl exist failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_154f2"
[1/2] Building C object CMakeFiles/cmTC_154f2.dir/CheckSymbolExists.c.o
FAILED: /usr/bin/clang -Wno-unknown-warning-option -Werror=unguarded-availability-new -g -Werror=unguarded-availability-new -o CMakeFiles/cmTC_154f2.dir/CheckSymbolExists.c.o -c CheckSymbolExists.c
CheckSymbolExists.c:2:10: fatal error: 'malloc_np.h' file not found
#include <malloc_np.h>
^
1 error generated.
ninja: build stopped: subcommand failed.

File /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <malloc_np.h>

int main(int argc, char** argv)
{
(void)argv;
#ifndef mallctl
return ((int*)(&mallctl))[argc];
#else
(void)argc;
return 0;
#endif
}

Determining if the malloc_zone_statistics exist failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_2dde3"
[1/2] Building C object CMakeFiles/cmTC_2dde3.dir/CheckSymbolExists.c.o
FAILED: /usr/bin/clang -Wno-unknown-warning-option -Werror=unguarded-availability-new -g -Werror=unguarded-availability-new -o CMakeFiles/cmTC_2dde3.dir/CheckSymbolExists.c.o -c CheckSymbolExists.c
CheckSymbolExists.c:2:10: fatal error: 'malloc/malloc.h' file not found
#include <malloc/malloc.h>
^
1 error generated.
ninja: build stopped: subcommand failed.

File /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <malloc/malloc.h>

int main(int argc, char** argv)
{
(void)argv;
#ifndef malloc_zone_statistics
return ((int*)(&malloc_zone_statistics))[argc];
#else
(void)argc;
return 0;
#endif
}

Determining if the strerror_s exist failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_dc056"
[1/2] Building C object CMakeFiles/cmTC_dc056.dir/CheckSymbolExists.c.o
FAILED: /usr/bin/clang -Wno-unknown-warning-option -Werror=unguarded-availability-new -g -Werror=unguarded-availability-new -o CMakeFiles/cmTC_dc056.dir/CheckSymbolExists.c.o -c CheckSymbolExists.c
CheckSymbolExists.c:8:19: error: use of undeclared identifier 'strerror_s'
return ((int*)(&strerror_s))[argc];
^
1 error generated.
ninja: build stopped: subcommand failed.

File /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <string.h>

int main(int argc, char** argv)
{
(void)argv;
#ifndef strerror_s
return ((int*)(&strerror_s))[argc];
#else
(void)argc;
return 0;
#endif
}

Determining if the dladdr exist failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_90059"
[1/2] Building C object CMakeFiles/cmTC_90059.dir/CheckSymbolExists.c.o
FAILED: /usr/bin/clang -Wno-unknown-warning-option -Werror=unguarded-availability-new -g -Werror=unguarded-availability-new -o CMakeFiles/cmTC_90059.dir/CheckSymbolExists.c.o -c CheckSymbolExists.c
CheckSymbolExists.c:8:19: error: use of undeclared identifier 'dladdr'
return ((int*)(&dladdr))[argc];
^
1 error generated.
ninja: build stopped: subcommand failed.

File /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <dlfcn.h>

int main(int argc, char** argv)
{
(void)argv;
#ifndef dladdr
return ((int*)(&dladdr))[argc];
#else
(void)argc;
return 0;
#endif
}

Performing C++ SOURCE FILE Test SUPPORTS_VARIADIC_MACROS_FLAG failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_c00f0"
[1/2] Building CXX object CMakeFiles/cmTC_c00f0.dir/src.cxx.o
warning: unknown warning option '-Werror=unguarded-availability-new'; did you mean '-Werror=partial-availability'? [-Wunknown-warning-option]
1 warning generated.
[2/2] Linking CXX executable cmTC_c00f0

Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_a4c80"
[1/2] Building CXX object CMakeFiles/cmTC_a4c80.dir/src.cxx.o
warning: unknown warning option '-Werror=unguarded-availability-new'; did you mean '-Werror=partial-availability'? [-Wunknown-warning-option]
1 warning generated.
[2/2] Linking CXX executable cmTC_a4c80

Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test CXX_SUPPORTS_FPIC failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_9f04e"
[1/2] Building CXX object CMakeFiles/cmTC_9f04e.dir/src.cxx.o
FAILED: /usr/bin/clang++ -fno-limit-debug-info -DCXX_SUPPORTS_FPIC -Werror=unguarded-availability-new -Werror -fPIC -o CMakeFiles/cmTC_9f04e.dir/src.cxx.o -c src.cxx
error: unknown warning option '-Werror=unguarded-availability-new'; did you mean '-Werror=partial-availability'? [-Werror,-Wunknown-warning-option]
ninja: build stopped: subcommand failed.

Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_d230e"
[1/2] Building CXX object CMakeFiles/cmTC_d230e.dir/src.cxx.o
warning: unknown warning option '-Werror=unguarded-availability-new'; did you mean '-Werror=partial-availability'? [-Wunknown-warning-option]
1 warning generated.
[2/2] Linking CXX executable cmTC_d230e

Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test CXX_SUPPORTS_WERROR_DATE_TIME failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_d7a99"
[1/2] Building CXX object CMakeFiles/cmTC_d7a99.dir/src.cxx.o
FAILED: /usr/bin/clang++ -fno-limit-debug-info -DCXX_SUPPORTS_WERROR_DATE_TIME -Werror=unguarded-availability-new -Werror -Werror=date-time -o CMakeFiles/cmTC_d7a99.dir/src.cxx.o -c src.cxx
error: unknown warning option '-Werror=unguarded-availability-new'; did you mean '-Werror=partial-availability'? [-Werror,-Wunknown-warning-option]
ninja: build stopped: subcommand failed.

Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_68254"
[1/2] Building CXX object CMakeFiles/cmTC_68254.dir/src.cxx.o
FAILED: /usr/bin/clang++ -fno-limit-debug-info -DCXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW -Werror=unguarded-availability-new -Werror -Werror=unguarded-availability-new -o CMakeFiles/cmTC_68254.dir/src.cxx.o -c src.cxx
error: unknown warning option '-Werror=unguarded-availability-new'; did you mean '-Werror=partial-availability'? [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Werror=unguarded-availability-new'; did you mean '-Werror=partial-availability'? [-Werror,-Wunknown-warning-option]
ninja: build stopped: subcommand failed.

Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test CXX_SUPPORTS_CXX11 failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_e2edb"
[1/2] Building CXX object CMakeFiles/cmTC_e2edb.dir/src.cxx.o
warning: unknown warning option '-Werror=unguarded-availability-new'; did you mean '-Werror=partial-availability'? [-Wunknown-warning-option]
1 warning generated.
[2/2] Linking CXX executable cmTC_e2edb

Source file was:
int main() { return 0; }`

(Adrian Prantl) #2

What (host) compiler are you building it with?

(Scott Densmore) #3

clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)

I installed this sudo apt install clang. (If I understand your question).

(Adrian Prantl) #4

This is the relevant error:

Performing C++ SOURCE FILE Test CXX_SUPPORTS_CXX11 failed with the following output:
Change Dir: /home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_e2edb"
[1/2] Building CXX object CMakeFiles/cmTC_e2edb.dir/src.cxx.o
warning: unknown warning option '-Werror=unguarded-availability-new'; did you mean '-Werror=partial-availability'? [-Wunknown-warning-option]
1 warning generated.
[2/2] Linking CXX executable cmTC_e2edb

It's not clear to my why CMake checks for -Wungaraded-availablilty. I think it might be easiest for you to just compile with a newer version of clang (or gcc).

(Scott Densmore) #5

Updated to clang 6

This is the error

clang: error: linker command failed due to signal (use -v to see invocation)
[2446/2692] Linking CXX executable bin/clang-check
ninja: build stopped: subcommand failed.
./swift/utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

Does the script lldb/scripts/build-swift-cmake.py --test update the dependencies to the correct branches? Do I need to update them myself?

Thanks for the help.

(Adrian Prantl) #6

You didn't paste the actual error: What was the linker error clang is complaining about?

(Scott Densmore) #7

My bad sorry:

FAILED: : && /usr/bin/clang++   -fno-limit-debug-info -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fcolor-diagnostics -fno-common -Woverloaded-virtual -Wno-nested-anon-types -g  -fuse-ld=gold -Wl,-allow-shlib-undefined   -Wl,--export-dynamic  -Wl,-rpath-link,/home/scottdensmore/Dev/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/./lib tools/clang/tools/driver/CMakeFiles/clang.dir/driver.cpp.o tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o tools/clang/tools/driver/CMakeFiles/clang.dir/cc1as_main.cpp.o tools/clang/tools/driver/CMakeFiles/clang.dir/apinotes_main.cpp.o  -o bin/clang-5.0  lib/libLLVMX86CodeGen.a lib/libLLVMX86AsmPrinter.a lib/libLLVMX86AsmParser.a lib/libLLVMX86Desc.a lib/libLLVMX86Info.a lib/libLLVMX86Disassembler.a lib/libLLVMX86Info.a lib/libLLVMX86Utils.a lib/libLLVMARMCodeGen.a lib/libLLVMARMAsmPrinter.a lib/libLLVMARMAsmParser.a lib/libLLVMARMDesc.a lib/libLLVMARMInfo.a lib/libLLVMARMDisassembler.a lib/libLLVMARMInfo.a lib/libLLVMAArch64CodeGen.a lib/libLLVMAArch64AsmPrinter.a lib/libLLVMAArch64AsmParser.a lib/libLLVMAArch64Desc.a lib/libLLVMAArch64Info.a lib/libLLVMAArch64Disassembler.a lib/libLLVMAArch64Info.a lib/libLLVMAArch64Utils.a lib/libLLVMPowerPCCodeGen.a lib/libLLVMPowerPCAsmPrinter.a lib/libLLVMPowerPCAsmParser.a lib/libLLVMPowerPCDesc.a lib/libLLVMPowerPCInfo.a lib/libLLVMPowerPCDisassembler.a lib/libLLVMPowerPCInfo.a lib/libLLVMSystemZCodeGen.a lib/libLLVMSystemZAsmPrinter.a lib/libLLVMSystemZAsmParser.a lib/libLLVMSystemZDesc.a lib/libLLVMSystemZInfo.a lib/libLLVMSystemZDisassembler.a lib/libLLVMSystemZInfo.a lib/libLLVMMipsCodeGen.a lib/libLLVMMipsAsmPrinter.a lib/libLLVMMipsAsmParser.a lib/libLLVMMipsDesc.a lib/libLLVMMipsInfo.a lib/libLLVMMipsDisassembler.a lib/libLLVMMipsInfo.a lib/libLLVMAnalysis.a lib/libLLVMCodeGen.a lib/libLLVMCore.a lib/libLLVMipo.a lib/libLLVMInstCombine.a lib/libLLVMInstrumentation.a lib/libLLVMMC.a lib/libLLVMMCParser.a lib/libLLVMObjCARCOpts.a lib/libLLVMOption.a lib/libLLVMScalarOpts.a lib/libLLVMSupport.a lib/libLLVMTransformUtils.a lib/libLLVMVectorize.a -lpthread lib/libclangBasic.a lib/libclangAPINotes.a lib/libclangCodeGen.a lib/libclangDriver.a lib/libclangFrontend.a lib/libclangFrontendTool.a lib/libLLVMX86AsmPrinter.a lib/libLLVMX86Utils.a lib/libLLVMARMDesc.a lib/libLLVMARMAsmPrinter.a lib/libLLVMARMInfo.a lib/libLLVMGlobalISel.a lib/libLLVMAArch64Desc.a lib/libLLVMAArch64AsmPrinter.a lib/libLLVMAArch64Info.a lib/libLLVMAArch64Utils.a lib/libLLVMPowerPCAsmPrinter.a lib/libLLVMSystemZDesc.a lib/libLLVMSystemZAsmPrinter.a lib/libLLVMSystemZInfo.a lib/libLLVMAsmPrinter.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMDebugInfoMSF.a lib/libLLVMSelectionDAG.a lib/libLLVMMipsAsmPrinter.a lib/libLLVMMCDisassembler.a lib/libclangCodeGen.a lib/libLLVMCoroutines.a lib/libLLVMCoverage.a lib/libLLVMLTO.a lib/libLLVMObjCARCOpts.a lib/libLLVMPasses.a lib/libLLVMCodeGen.a lib/libLLVMTarget.a lib/libLLVMipo.a lib/libLLVMBitWriter.a lib/libLLVMIRReader.a lib/libLLVMAsmParser.a lib/libLLVMLinker.a lib/libLLVMInstrumentation.a lib/libLLVMScalarOpts.a lib/libLLVMInstCombine.a lib/libLLVMVectorize.a lib/libLLVMTransformUtils.a lib/libLLVMAnalysis.a lib/libLLVMObject.a lib/libclangIndex.a lib/libclangFormat.a lib/libclangToolingCore.a lib/libclangRewriteFrontend.a lib/libclangARCMigrate.a lib/libclangStaticAnalyzerFrontend.a lib/libclangFrontend.a lib/libclangDriver.a lib/libLLVMOption.a lib/libLLVMProfileData.a lib/libclangParse.a lib/libLLVMMCParser.a lib/libclangSerialization.a lib/libclangSema.a lib/libclangAPINotes.a lib/libLLVMBitReader.a lib/libclangEdit.a lib/libclangStaticAnalyzerCheckers.a lib/libclangStaticAnalyzerCore.a lib/libclangAnalysis.a lib/libclangRewrite.a lib/libclangASTMatchers.a lib/libclangAST.a lib/libclangLex.a lib/libclangBasic.a lib/libLLVMCore.a lib/libLLVMBinaryFormat.a lib/libLLVMMC.a lib/libLLVMSupport.a -lrt -ldl -ltinfo -lpthread -lz -lm lib/libLLVMDemangle.a -Wl,-rpath,"\$ORIGIN/../lib" && :
clang: error: unable to execute command: Killed
clang: error: linker command failed due to signal (use -v to see invocation)
[2446/2692] Linking CXX executable bin/clang-check
ninja: build stopped: subcommand failed.
./swift/utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting
(Adrian Prantl) #8

That looks more like your linker is running out of memory? On Linux the linker needs to link all the debug information, so it takes a considerable amount of memory. Have you tried with split dwarf or without debug information?

(Scott Densmore) #9

Ok… good to know. It is a VM with only 8gigs of ram. I haven’t tried anything else. I can try giving more ram to the VM and see if it helps.

Scott

(Scott Densmore) #10

Good news. Got everything building. I had forgotten to turn my swap file on when I grew the disk.

Should all the tests pass? When I run the command, not all of them pass.

===================
Test Result Summary
===================
Test Methods:       3184
Reruns:               30
Success:            1832
Expected Failure:    181
Failure:              27
Error:                 3
Exceptional Exit:      0
Unexpected Success:   71
Skip:               1070
Timeout:               0
Expected Timeout:      0

Is this expected? At least I can start testing :smiley:.

(Adrian Prantl) #11

Generally, yes, all tests are supposed to pass. Depending on which branch you are building you can check against the results from the official bots on https://ci.swift.org/view/LLDB/. You may have found legitimate bugs, or there is a misconfiguration in your environment or both.

(Scott Densmore) #12

Looking at the swift-4.1 branch build... doesn't look like there was a good build for a while. I'll just assume things are working. Thanks.