Solved Building FreeBSD 11.0-stable on FreeBSD 10.1-stable fails

The machine runs FreeBSD 10.1-stable:
Code:
tingo@kg-v7$ uname -a
FreeBSD kg-v7.kg4.no 10.1-STABLE FreeBSD 10.1-STABLE #0 r278322: Fri Feb  6 21:36:01 CET 2015    
root@kg-v7.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64
I have cleaned out /usr/src (and /usr/obj) and downloaded latest stable/11 via subversion.
Code:
tingo@kg-v7$ egrep "^BRANCH|^REVISION" /usr/src/sys/conf/newvers.sh
REVISION="11.0"
BRANCH="STABLE"
But building it (per the procedure in the handbook) fails at the buildworld stage:
Both make -j5 buildworld and make buildworld fails, like this:
Code:
c++: error: unable to execute command: Segmentation fault (core dumped)
c++: error: clang frontend command failed due to signal (use -v to see invocation)
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: x86_64-unknown-freebsd10.1
Thread model: posix
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.
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/CGBlocks-abcdc1.cpp
c++: note: diagnostic msg: /tmp/CGBlocks-abcdc1.sh
c++: note: diagnostic msg:

********************
*** Error code 254

Stop.
bmake[4]: stopped in /usr/src/lib/clang/libclangcodegen
*** Error code 1

Stop.
bmake[3]: stopped in /usr/src/lib/clang
*** Error code 1

Stop.
bmake[2]: stopped in /usr/src
*** Error code 1

Stop.
bmake[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src
So I tried this (from /usr/src/UPDATING):
Code:
root@kg-v7# make WITHOUT_CLANG=y WITH_GCC=y -j5 buildworld
[..]
********************
*** [CGClass.o] Error code 254

bmake[4]: stopped in /usr/src/lib/clang/libclangcodegen
2 errors

bmake[4]: stopped in /usr/src/lib/clang/libclangcodegen
*** [all_subdir_lib/clang/libclangcodegen] Error code 2

bmake[3]: stopped in /usr/src/lib/clang
--- all_subdir_lib/clang/libclangedit ---
A failure has been detected in another branch of the parallel make

bmake[4]: stopped in /usr/src/lib/clang/libclangedit
*** [all_subdir_lib/clang/libclangedit] Error code 2

bmake[3]: stopped in /usr/src/lib/clang
--- all_subdir_lib/clang/libclangast ---
A failure has been detected in another branch of the parallel make

bmake[4]: stopped in /usr/src/lib/clang/libclangast
*** [all_subdir_lib/clang/libclangast] Error code 2

bmake[3]: stopped in /usr/src/lib/clang
--- all_subdir_lib/clang/libclangfrontend ---
A failure has been detected in another branch of the parallel make

bmake[4]: stopped in /usr/src/lib/clang/libclangfrontend
*** [all_subdir_lib/clang/libclangfrontend] Error code 2

bmake[3]: stopped in /usr/src/lib/clang
4 errors

bmake[3]: stopped in /usr/src/lib/clang
*** [cross-tools] Error code 2

bmake[2]: stopped in /usr/src
1 error

bmake[2]: stopped in /usr/src
*** [_cross-tools] Error code 2

bmake[1]: stopped in /usr/src
1 error

bmake[1]: stopped in /usr/src
*** [buildworld] Error code 2

make: stopped in /usr/src
1 error

make: stopped in /usr/src
How do I fix this?
 
Ask on the freebsd-stable mailing list, the stable branch gets occasionally broken in regards of the update path from previous versions when parts of the code develop unforeseen regressions with updates.
 
I did a source upgrade from 10-stable revision 306935 to 11-stable on Friday. So perhaps you should start by updating to the latest 10-stable (or that recent revision if you prefer).
 
Good suggestions. For now I have posted to the freebsd-stable mailing list, asking if it is possible to avoid the intermediary step (an updated stable/10).
 
TL;DR - no, you can't avoid the intermediary step.
Summary from the mailing list thread; you need stable/10 of at least r286033, because:
"It fixes a possible crash in clang 3.4, which can occur if newer versions of llvm are compiled. Unfortunately this fix only went in after 10.3-RELEASE.".

And yes - this is a bug, which should be documented
 
Back
Top