Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Aug 2021 12:09:26 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Paul Mather <paul@gromit.dlib.vt.edu>
Cc:        Dimitry Andric <dim@freebsd.org>, Eugene Grosbein <eugen@grosbein.net>,  FreeBSD stable <freebsd-stable@freebsd.org>
Subject:   Re: Source upgrade to stable/11 amd64 broken
Message-ID:  <CANCZdfq3WvCUx95vH5qoc7%2BXW_VrHf=5UW69%2B2DjOigO7c6PgQ@mail.gmail.com>
In-Reply-To: <94300E26-2E17-46E3-A21B-5F54564E65D7@gromit.dlib.vt.edu>
References:  <490579f8-21d8-3495-69b9-27a504969287@grosbein.net> <30E3E4A7-C846-4EFA-B0B1-65F306960CB8@FreeBSD.org> <94300E26-2E17-46E3-A21B-5F54564E65D7@gromit.dlib.vt.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000798bad05c94c85d0
Content-Type: text/plain; charset="UTF-8"

On Wed, Aug 11, 2021, 12:01 PM Paul Mather <paul@gromit.dlib.vt.edu> wrote:

> On Aug 11, 2021, at 1:44 PM, Dimitry Andric <dim@FreeBSD.org> wrote:
>
> > On 11 Aug 2021, at 05:13, Eugene Grosbein <eugen@grosbein.net> wrote:
> >>
> >> I'm in process of upgrading very old remote FreeBSD server running
> 9.3-STABLE/amd64.
> >> First, I used svn to fetch stable/10 sources and performed source
> upgrade to 10.4-STABLE r369650
> >> and it went just fine.
> >>
> >> Now it has stock "FreeBSD clang version 3.4.1
> (tags/RELEASE_34/dot1-final 208032) 20140512".
> >> I did checkout for stable/11 sources via svn but this time buildworld
> fails early:
> >>
> >> --------------------------------------------------------------
> >>>>> stage 1.2: bootstrap tools
> >> --------------------------------------------------------------
> >> cd /usr/local/src; MAKEOBJDIRPREFIX=/usr/obj/usr/local/src/tmp
> INSTALL="sh /usr/local/src/tools/install.sh"
> TOOLS_PREFIX=/usr/obj/usr/local/src/tmp
> PATH=/usr/obj/usr/local/src/tmp/legacy/usr/sbin:/usr/obj/usr/local/src/tmp/legacy/usr/bin:/usr/obj/usr/local/src/tmp/legacy/bin:/sbin:/bin:/usr/sbin:/usr/bin
> WORLDTMP=/usr/obj/usr/local/src/tmp  MAKEFLAGS="-m
> /usr/local/src/tools/build/mk  -m /usr/local/src/share/mk" make  -f
> Makefile.inc1  DESTDIR=  BOOTSTRAPPING=1004503  SSP_CFLAGS=  MK_HTML=no
> NO_LINT=yes MK_MAN=no  -DNO_PIC MK_PROFILE=no -DNO_SHARED  -DNO_CPU_CFLAGS
> MK_WARNS=no MK_CTF=no  MK_CLANG_EXTRAS=no MK_CLANG_FORMAT=no
> MK_CLANG_FULL=no  MK_LLDB=no MK_TESTS=no  MK_INCLUDES=yes bootstrap-tools
> >> ===> lib/clang/libllvmminimal (obj,all,install)
> >> /usr/obj/usr/local/src/tmp/usr/local/src/lib/clang/libllvmminimal
> created for /usr/local/src/lib/clang/libllvmminimal
> >>
> /usr/obj/usr/local/src/tmp/usr/local/src/lib/clang/libllvmminimal/Demangle
> created for /usr/local/src/lib/clang/libllvmminimal
> >>
> /usr/obj/usr/local/src/tmp/usr/local/src/lib/clang/libllvmminimal/Support
> created for /usr/local/src/lib/clang/libllvmminimal
> >>
> /usr/obj/usr/local/src/tmp/usr/local/src/lib/clang/libllvmminimal/TableGen
> created for /usr/local/src/lib/clang/libllvmminimal
> >> c++  -O2 -pipe -I/usr/local/src/lib/clang/include
> -I/usr/local/src/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/local/src/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/local/src/tmp/legacy/usr/include  -std=c++14 -fno-exceptions
> -fno-rtti -stdlib=libc++ -Wno-c++11-extensions  -c
> /usr/local/src/contrib/llvm-project/llvm/lib/Demangle/ItaniumDemangle.cpp
> -o Demangle/ItaniumDemangle.o
> >> error: invalid value 'c++14' in '-std=c++14'
> >> *** Error code 1
> >>
> >> Stop.
> >> make[3]: stopped in /usr/local/src/lib/clang/libllvmminimal
> >> *** Error code 1
> >>
> >> How do I resolve this?
> >
> > It's going to be a little tricky, as clang 3.4.1 is too old to support
> > C++14 properly. I've tried using -std=c++1y since that was the old name
> > for -std=c++14, but it asserts quite early in the build.
> >
> > The best way forward is to attempt to buildworld (and buildkernel) with
> > a clean stable/11 checkout at r360783, which is just before clang 10.0.0
> > got imported. You will also need to add:
> >
> > CXXFLAGS.clang=-Wno-out-of-line-declaration
> >
> > to your src.conf, otherwise it will get an unexpected error during the
> > build.
> >
> > After this has completed, install world and kernel and reboot, and then
> > you should have clang 9.0.0 and the corresponding libc++. This should
> > allow you to do a regular update to the latest stable/11.
> >
> > From there you should upgrade to stable/12, as 11 is going EOL in about
> > a month... :)
>
>
> As the OP is currently at 10-STABLE, would it also not work to upgrade
> from there to 11.0-RELEASE (releng/11.0) and then from there to do the
> recommended upgrade path to whatever is the desired endpoint?  It might
> require more work, but it would be a known supported upgrade path.  Just
> wondering...
>

In theory, going from the tip of stable/10 to releng/11.0  should work as
lots of people did that back when 11.0 was new... from there you can follow
dim's instructions to get to the tip of stable/11 and from there to 12.2 or
stable/12. I have not tried that lately as I've retired even my old 10.x
testing jails some tie ago.

Warner



Cheers,
>
> Paul.
>
>
>

--000000000000798bad05c94c85d0--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfq3WvCUx95vH5qoc7%2BXW_VrHf=5UW69%2B2DjOigO7c6PgQ>