Bug 215985

Summary: Cannot build world of 11.0.1 on 10.1-RELEASE
Product: Base System Reporter: G0Dzilla <g0dzilla>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed Not Accepted    
Severity: Affects Only Me CC: imp, netilesik
Priority: ---    
Version: 10.0-RELEASE   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
Run script none

Description G0Dzilla 2017-01-12 05:00:28 UTC
Created attachment 178771 [details]
Run script

Cannot build world of 11.0.1 on 10.1-RELEASE.

1.	<eof> parser at end of file
2.	Code generation
3.	Running pass 'Function Pass Manager' on module '/usr/src/lib/clang/libclangcodegen/../../../contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.cpp'.
4.	Running pass 'X86 DAG->DAG Instruction Selection' on function '@_ZN5clang7CodeGen15CodeGenFunction12EmitCallArgsINS_17FunctionProtoTypeEEEvRNS0_11CallArgListEPKT_N4llvm14iterator_rangeINS_4Stmt17ConstExprIteratorEEEPKNS_12FunctionDeclEj'
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-894375.cpp
c++: note: diagnostic msg: /tmp/CGBlocks-894375.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
Comment 1 Warner Losh freebsd_committer freebsd_triage 2017-01-12 14:26:32 UTC
From UPDATING:
***************************** SPECIAL WARNING: ******************************

        Due to a bug in some versions of clang that's very hard to workaround in
        the upgrade process, to upgrade to -current you must first upgrade
        either stable/9 after r286035 or stable/10 after r286033 (including
        10.3-RELEASE) or current after r286007 (including stable/11 and
        11.0-RELEASE). These revisions post-date the 10.2 and 9.3 releases, so
        you'll need to take the unusual step of upgrading to the tip of the
        stable branch before moving to 11 or -current via a source upgrade.
        stable/11 and 11.0-RELEASE have working newer compiler. This differs
        from the historical situation where one could upgrade from anywhere on
        the last couple of stable branches, so be careful.

        If you're running a hybrid system on 9.x or 10.x with an updated clang
        compiler or are using an supported external toolchain, the build system
        will allow the upgrade. Otherwise it will print a reminder.

It was too late to include this in 11.0 when it was discovered.
Comment 2 Warner Losh freebsd_committer freebsd_triage 2017-01-12 14:27:10 UTC
So you need 10.3 or newer. Sorry.
Comment 3 Warner Losh freebsd_committer freebsd_triage 2017-01-12 14:27:46 UTC
Can't fix this any more than it has been in -current and -stable.
Comment 4 Dimitry Andric freebsd_committer freebsd_triage 2017-03-12 00:53:52 UTC
*** Bug 217695 has been marked as a duplicate of this bug. ***