Solved Source Upgrade Fails

I am currently running 10.3 as a guest on VMWare ESXi 6.5. I'm trying to upgrade to 11.4 from source but buildworld fails.

Code:
--- _bootstrap-tools-usr.bin/fortune/strfile ---
--- .depend ---
echo strfile.full: /usr/lib/libc.a /usr/obj/usr/src_11.4/tmp/legacy/usr/lib/libegacy.a >> .depend
--- strfile.o ---
cc -O2 -pipe  -g -MD  -MF.depend.strfile.o -MTstrfile.o -std=gnu99  -Qunused-arguments  -I/usr/obj/usr/src_11.4/tmp/legacy/usr/include -c /usr/src_11.4/usr.bin/fortune/strfile/strfile.c -o strfile.o
--- _bootstrap-tools-kerberos5/tools/make-roken ---
--- obj ---
--- _bootstrap-tools-lib/clang/libllvmminimal ---
/usr/obj/usr/src_11.4/tmp/usr/src_11.4/lib/clang/libllvmminimal/Demangle created for /usr/src_11.4/lib/clang/libllvmminimal
/usr/obj/usr/src_11.4/tmp/usr/src_11.4/lib/clang/libllvmminimal/Support created for /usr/src_11.4/lib/clang/libllvmminimal
/usr/obj/usr/src_11.4/tmp/usr/src_11.4/lib/clang/libllvmminimal/TableGen created for /usr/src_11.4/lib/clang/libllvmminimal
--- Demangle/ItaniumDemangle.o ---
c++  -O2 -pipe -I/usr/src_11.4/lib/clang/include -I/usr/src_11.4/contrib/llvm-project/llvm/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DHAVE_VCS_VERSION_INC -DNDEBUG -DLLVM_DEFAULT_TARGET_TRIPLE=\"x86_64-unknown-freebsd11.4\" -DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd11.4\" -DDEFAULT_SYSROOT=\"/usr/obj/usr/src_11.4/tmp\" -DLLVM_TARGET_ENABLE_AARCH64 -DLLVM_TARGET_ENABLE_ARM -DLLVM_TARGET_ENABLE_MIPS -DLLVM_TARGET_ENABLE_POWERPC -DLLVM_TARGET_ENABLE_SPARC -DLLVM_TARGET_ENABLE_X86 -DLLVM_NATIVE_ASMPARSER=LLVMInitializeX86AsmParser -DLLVM_NATIVE_ASMPRINTER=LLVMInitializeX86AsmPrinter -DLLVM_NATIVE_DISASSEMBLER=LLVMInitializeX86Disassembler -DLLVM_NATIVE_TARGET=LLVMInitializeX86Target -DLLVM_NATIVE_TARGETINFO=LLVMInitializeX86TargetInfo -DLLVM_NATIVE_TARGETMC=LLVMInitializeX86TargetMC -ffunction-sections -fdata-sections -MD -MF.depend.Demangle_ItaniumDemangle.o -MTDemangle/ItaniumDemangle.o -Qunused-arguments -I/usr/obj/usr/src_11.4/tmp/legacy/usr/include  -std=c++14 -fno-exceptions -fno-rtti -stdlib=libc++ -Wno-c++11-extensions  -c /usr/src_11.4/contrib/llvm-project/llvm/lib/Demangle/ItaniumDemangle.cpp -o Demangle/ItaniumDemangle.o
error: invalid value 'c++14' in '-std=c++14'
*** [Demangle/ItaniumDemangle.o] Error code 1

bmake[3]: stopped in /usr/src_11.4/lib/clang/libllvmminimal
1 error

bmake[3]: stopped in /usr/src_11.4/lib/clang/libllvmminimal
*** [_bootstrap-tools-lib/clang/libllvmminimal] Error code 2

bmake[2]: stopped in /usr/src_11.4
--- _bootstrap-tools-kerberos5/tools/make-roken ---
/usr/obj/usr/src_11.4/tmp/usr/src_11.4/kerberos5/tools/make-roken created for /usr/src_11.4/kerberos5/tools/make-roken
A failure has been detected in another branch of the parallel make

bmake[3]: stopped in /usr/src_11.4/kerberos5/tools/make-roken
*** [_bootstrap-tools-kerberos5/tools/make-roken] Error code 2

bmake[2]: stopped in /usr/src_11.4
--- _bootstrap-tools-usr.bin/fortune/strfile ---
A failure has been detected in another branch of the parallel make

bmake[3]: stopped in /usr/src_11.4/usr.bin/fortune/strfile
*** [_bootstrap-tools-usr.bin/fortune/strfile] Error code 2

bmake[2]: stopped in /usr/src_11.4
3 errors

bmake[2]: stopped in /usr/src_11.4
*** [_bootstrap-tools] Error code 2

bmake[1]: stopped in /usr/src_11.4
1 error

bmake[1]: stopped in /usr/src_11.4
*** [buildworld] Error code 2

make: stopped in /usr/src_11.4
1 error

make: stopped in /usr/src_11.4
How can I resolve this?

Thanks,

Drew
 
I am currently running 10.3
Have a look at /usr/src_11.4/UPDATING, scroll almost down to the end of the document:
Rich (BB code):
COMMON ITEMS:

    General Notes
    -------------
    ...
    When upgrading from one major version to another it is generally best
    to upgrade to the latest code in the currently installed branch first,
    then do an upgrade to the new branch. This is the best-tested upgrade
    path, and has the highest probability of being successful.  Please try
    this approach before reporting problems with a major version upgrade.
    ...
That would be first upgrade to 10.4, then try to 11.4.

If this is a -RELEASE you should use freebsd-update(8). Same steps here, first upgrade to latest version on the current branch.
 
...
That would be first upgrade to 10.4, then try to 11.4.
Thank you for your reply. I have upgraded to 10.4 but attempts to go to 11.4 still fail:
Code:
--- _bootstrap-tools-lib/clang/libllvmminimal ---
--- Demangle/ItaniumDemangle.o ---
c++  -O2 -pipe -I/usr/src_11.4/lib/clang/include -I/usr/src_11.4/contrib/llvm-project/llvm/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DHAVE_VCS_VERSION_INC -DNDEBUG -DLLVM_DEFAULT_TARGET_TRIPLE=\"x86_64-unknown-freebsd11.4\" -DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd11.4\" -DDEFAULT_SYSROOT=\"/usr/obj/usr/src_11.4/tmp\" -DLLVM_TARGET_ENABLE_AARCH64 -DLLVM_TARGET_ENABLE_ARM -DLLVM_TARGET_ENABLE_MIPS -DLLVM_TARGET_ENABLE_POWERPC -DLLVM_TARGET_ENABLE_SPARC -DLLVM_TARGET_ENABLE_X86 -DLLVM_NATIVE_ASMPARSER=LLVMInitializeX86AsmParser -DLLVM_NATIVE_ASMPRINTER=LLVMInitializeX86AsmPrinter -DLLVM_NATIVE_DISASSEMBLER=LLVMInitializeX86Disassembler -DLLVM_NATIVE_TARGET=LLVMInitializeX86Target -DLLVM_NATIVE_TARGETINFO=LLVMInitializeX86TargetInfo -DLLVM_NATIVE_TARGETMC=LLVMInitializeX86TargetMC -ffunction-sections -fdata-sections -MD -MF.depend.Demangle_ItaniumDemangle.o -MTDemangle/ItaniumDemangle.o -Qunused-arguments -I/usr/obj/usr/src_11.4/tmp/legacy/usr/include  -std=c++14 -fno-exceptions -fno-rtti -stdlib=libc++ -Wno-c++11-extensions  -c /usr/src_11.4/contrib/llvm-project/llvm/lib/Demangle/ItaniumDemangle.cpp -o Demangle/ItaniumDemangle.o
--- _bootstrap-tools-usr.bin/fortune/strfile ---
--- strfile.full ---
cc -O2 -pipe -g -std=gnu99 -Qunused-arguments -I/usr/obj/usr/src_11.4/tmp/legacy/usr/include  -static -L/usr/obj/usr/src_11.4/tmp/legacy/usr/lib -o strfile.full strfile.o  -legacy
--- _bootstrap-tools-lib/clang/libllvmminimal ---
error: invalid value 'c++14' in '-std=c++14'
*** [Demangle/ItaniumDemangle.o] Error code 1

make[3]: stopped in /usr/src_11.4/lib/clang/libllvmminimal
1 error

make[3]: stopped in /usr/src_11.4/lib/clang/libllvmminimal
*** [_bootstrap-tools-lib/clang/libllvmminimal] Error code 2

make[2]: stopped in /usr/src_11.4
--- _bootstrap-tools-usr.bin/fortune/strfile ---
A failure has been detected in another branch of the parallel make

make[3]: stopped in /usr/src_11.4/usr.bin/fortune/strfile
--- _bootstrap-tools-kerberos5/tools/make-roken ---
A failure has been detected in another branch of the parallel make

make[3]: stopped in /usr/src_11.4/kerberos5/tools/make-roken
*** [_bootstrap-tools-kerberos5/tools/make-roken] Error code 2

make[2]: stopped in /usr/src_11.4
--- _bootstrap-tools-usr.bin/fortune/strfile ---
*** [_bootstrap-tools-usr.bin/fortune/strfile] Error code 2

make[2]: stopped in /usr/src_11.4
3 errors

make[2]: stopped in /usr/src_11.4
*** [_bootstrap-tools] Error code 2

make[1]: stopped in /usr/src_11.4
1 error

make[1]: stopped in /usr/src_11.4
*** [buildworld] Error code 2

make: stopped in /usr/src_11.4
1 error

make: stopped in /usr/src_11.4

What can I try next?

Thanks,

Drew
 
10.3 --> 10.4 --> 11.1 --> 11.4 would probably be the way to go if you're doing it from source looking at release dates.
 
Why don't you make it easier on yourself and use the binary upgrade path?
 
That wont work once you've done a source upgrade afaik?
You are misinformed, have a look at freebsd-update(8):
Rich (BB code):
DESCRIPTION
     The freebsd-update    tool is    used to    fetch, install,    and rollback binary
     updates to    the FreeBSD base system.  Note that updates are    only available
     if    they are being built for the FreeBSD release and architecture being
     used; in particular, the FreeBSD Security Team only builds    updates    for
     releases shipped in binary    form by    the FreeBSD Release Engineering    Team,
     e.g., FreeBSD 11.2-RELEASE    and FreeBSD 12.0-RELEASE, but not FreeBSD
     11.2-STABLE or FreeBSD 13.0-CURRENT.

It doesn't matter if a RELEASE is updated/upgraded from source, as long if it's a supported RELEASE you can use freebsd-update(8).
 
Why don't you make it easier on yourself and use the binary upgrade path?
Same here. In my opinion upgrading a non-customized RELEASE from source is a wast of time.

@ 610Drew, this article describes how to build a FreeBSD update server, to update/upgrade clients with freebsd-update(8).

As you can see there is a kernel and world build and the resulting updates made available for distribution. What you are trying to do, build kernel and world locally, has already be done on the remote FreeBSD update servers. Instead of locally executing make installkernel ( installworld) you execute freebsd-update to retrieve the necessary files to update/upgrade the system.

But if you insist on building from source you could try:
- make sure it's releng/11.4: svn info /usr/src (or svnlite info /usr/src)
- if there is /etc/src.conf (eventually /etc/src-env.conf) disable all settings.
- make cleanworld to clean the previous build attempt in /usr/obj
- check /usr/obj if it's cleaned: ls -al /usr/obj
- try to build

- if build fails, try avoiding using make -j as suggested in UPDATING, COMMON ITEMS, General Notes
- if build fails, try prefix all make commands with env -i to avoid environment poisoning as described in UPDATING,...

If those steps don't help you could try what anonymous9 suggested.
 
Because clang is now frequently updated you may have better luck going to an earlier 11.x release first, and then from there to 11.4.

Was 10.3 EOL when 11.4 was released?

When I was trying to update a HardenedBSD VM from 11.1 to 12.2 I ended up doing a binary update as the compiler linker was too incompatible, I still did a source compile right after though.
 
Thank you for all of the suggestions. I guess the reason I didn't try freebsd-update is simply because I've been running FBSD since version 4, started by learning to upgrade from source, and have always done it that way since. I will read all of the above, look into using freebsd-update, and report back.

Thanks!!!

Drew
 
Using freebsd-update got my system up to 12.1. Then I worked through rebuilding/upgrading all my ports.

Thanks for your help!

Drew
 
Why didn't you go to 12.2? Now you have to run the upgrade again because 12.1 will be EoL three months after the release of 12.2.

Thanks for the heads up. I only upgraded to 12.1 because when I started the upgrade in September, 12.2 wasn't released yet.

Thanks,

Drew
 
This thread was marked “solved” although it doesn’t present a solution for the actual build failure described in the first post.

So, just in case someone else comes across this thread and needs a solution for that problem, here’s some background information and a solution.

Normally, FreeBSD guarantees that you can perform a source-level upgrade (“make world”) from the tip of a stable branch to the tip of the next branch, i.e. from stable/<n> to stable/<n+1>. Unfortunately, that assumption was broken for the update from 10 to 11, caused by some commits in the stable/11 branch. During the course of stable/11 there were some major updates to LLVM/clang, making it difficult to maintain backwards compatibility in the build system in a way to keep the ability for updating across the whole branch in one go.

There may be valid reasons why you can not (or don’t want to) use freebsd-update, and perform source-level updates instead. If you need to do this in the situation mentioned above, you need to take an intermediate step. In particular:
  • Make sure you’re at the tip of stable/10, or at releng/10.4. clang -v should print clang version 3.4.1.
  • Update to releng/11.2 or stable/11 not after 2019-02-16. I recommend to check out SVN r344212, because the next commit (r344213) might be the first one that broke compatibility with the version of clang in stable/10.
  • Afterwards you can update further to the tip of stable/11, or releng/11.4, or straight to stable/12.
By the way: Make sure you do not have a line WITHOUT_CROSS_COMPILER in /etc/src.conf. The name seems to imply it is for cross-compiling for different architectures, but in fact it refers to the bootstrap process required for updates that have a new version of the compiler. If you have that line in your src.conf(5), it will often cause breakage for updates, so please remove it.

And finally, when doing source-level updates, please have a look at the recent entries in the /usr/src/UPDATING file. Sometimes there are important things that need your attention. Also, please stick to the updating procedure that is detailed further down in that file under the heading “To rebuild everything and install it on the current system”. Also refer to the corresponding section in the FreeBSD Handbook.
 
Back
Top