c++: error: unable to execute command: Killed c++: error: clang frontend command failed due to signal (use -v to see invocation) FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1) Target: x86_64-unknown-freebsd12.0 Thread model: posix InstalledDir: /usr/bin c++: note: diagnostic msg: PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script. Killed $ c++: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: c++: note: diagnostic msg: /tmp/wpantund-a383d2.cpp c++: note: diagnostic msg: /tmp/wpantund-a383d2.sh c++: note: diagnostic msg: ******************** I can't add the attachment because it's too large, and it also includes basically all the code I'm trying to build.
Reassign to toolchain@ and trim Summary.
This "Killed" phenomenon is what typically happens if you run out of memory. Please check your dmesg for "was killed: out of swap space" or "swap_pager_getswapspace(number): failed" errors. If you see those, try adding more RAM to the machine, adding more swap space, or alternatively, lower the number of parallel build jobs.
Yes that appears to have been what happened (it actually looks like there may have been some stale .o state -- I was building and fixing errors and building etc -- and there was a file left over when it crashed that wasn't actually a real file). I didn't add any RAM or change the build, but a make clean followed by another make worked fine. You can close this if you like -- I only filed it because it told me to :-).
(In reply to Dimitry Andric from comment #2) If the person with the problem see any of the: swap_pager_getswapspace(number): failed message they really are out of swap. The other message can happen when there is plenty of swap but processes that stay runnable are preventing having sufficient free RAM after some number of tries by FreeBSD: runnable processes are not (fully) swapped-out by FreeBSD, only paged. There is a tunable that can increase the number of tries at freeing RAM before "was killed: out of swap space" happens. This is used on low end armv7's and aarch64's and such to allow buildworld and the like to complete with -j4, for example. vm.pageout_oom_seq has a default of 12 (last I checked). Figures like 120 and 1024 have been used on those low end armv7 and aarch64 examples. (pi2 V1.1 and rpi3 are examples: just 1 GiByte of RAM. Of course sufficient swap space is also required for this kind of context.) For lld based links, LDFLAGS.lld+= -Wl,--no-threads can also help avoid memory use by avoiding having ncpu+2 threads in use in each active lld. How-to-build-software documentation should probably cover this subject.