Date: Mon, 24 Nov 2025 08:41:04 -0700 From: Warner Losh <imp@bsdimp.com> To: Peter Blok <pblok@bsd4all.org> Cc: Dimitry Andric <dim@freebsd.org>, Freebsd-stable List <stable@freebsd.org> Subject: Re: installworld broke system with ld-elf.so.1: /usr/bin/cc: Undefined symbol "LLVMInitializeAArch64TargetInfo" Message-ID: <CANCZdfrtZBwLK=XsNFkrnPfNMyLUrSB9Mkb0RAXeWd-F-iAqxA@mail.gmail.com> In-Reply-To: <D35BF946-0452-40A3-B26F-A9CA8BFBEC3C@bsd4all.org> References: <BBC6E4C2-BD2C-43DC-9D7E-79BD2C87AAE0@bsd4all.org> <77129346-B198-4A98-A265-438F37EA9E26@FreeBSD.org> <D35BF946-0452-40A3-B26F-A9CA8BFBEC3C@bsd4all.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Mon, Nov 24, 2025 at 4:55 AM Peter Blok <pblok@bsd4all.org> wrote: > Thanks for the explanation. This was a good lesson for me to setup an > alternate boot environment with beadm. > You'd be even better off using bectl these days, since that's what's in base. And I highly recommend it. A lot of the old tutorials still reference beadm, though. Warner > I checked and the system with the problem is the build machine which has > the same src.conf for building and installing. So it must be related to the > aborted install where /usr/lib was updated and /usr/bin was not. > > Although I use the same source for all systems, I did a better job than I > initially mentioned. All systems have the same src.conf when building nd > installing. > > Peter > > > > > On 24 Nov 2025, at 09:59, Dimitry Andric <dim@FreeBSD.org> wrote: > > > > On 24 Nov 2025, at 09:43, Peter Blok <pblok@bsd4all.org> wrote: > >> > >> I have multiple systems which I update from the same 14-stable source > with latest commit 465c30c4f202b02cd9cb12f12d9ea856c84c5203 of November 23. > >> > >> I updated one system with installkernel installworld over NFS without > problems. Next I did the build system that was having the src and obj, but > it stopped with the installworld. Retrying the installworld resulted with > the ld-elf.so.1: /usr/bin/cc: Undefined symbol > “LLVMInitializeAArch64TargetInfo” message. > >> > >> All systems are Intel or Amd, so I’m puzzled why the above symbol is > needed. The only thing I can think of is that the build system builds all > target compilers. The sucessfully installed system has a different src.conf > without that option. > >> > >> What is wrong here? The update sequence I use is always the same. > > > > I think this is because your systems have been built with different > src.conf configurations. These days /usr/bin/cc links to > /usr/lib/libprivatellvm.so.19, so if you are installing world from a > machine where src.conf options were different (in particular the > WITHOUT_LLVM_TARGET_xxx options), there can be a mismatch between the > symbols expected by the cc binary and the libprivatellvm.so.19 library. > > > > During installworld there is a moment where the libprivatellvm.so.19 > library is installed, and where /usr/bin/cc is not yet updated. Due to our > build system running recursive make, and some of those Makefiles invoking > /usr/bin/cc, you can run into this issue. > > > > -Dimitry > > > > > [-- Attachment #2 --] <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Nov 24, 2025 at 4:55 AM Peter Blok <<a href="mailto:pblok@bsd4all.org">pblok@bsd4all.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks for the explanation. This was a good lesson for me to setup an alternate boot environment with beadm.<br></blockquote><div><br></div><div>You'd be even better off using bectl these days, since that's what's in base. And I highly recommend it. A lot of the old tutorials still reference beadm, though.</div><div><br></div><div>Warner</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> I checked and the system with the problem is the build machine which has the same src.conf for building and installing. So it must be related to the aborted install where /usr/lib was updated and /usr/bin was not.<br> <br> Although I use the same source for all systems, I did a better job than I initially mentioned. All systems have the same src.conf when building nd installing.<br> <br> Peter<br> <br> <br> <br> > On 24 Nov 2025, at 09:59, Dimitry Andric <dim@FreeBSD.org> wrote:<br> > <br> > On 24 Nov 2025, at 09:43, Peter Blok <<a href="mailto:pblok@bsd4all.org" target="_blank">pblok@bsd4all.org</a>> wrote:<br> >> <br> >> I have multiple systems which I update from the same 14-stable source with latest commit 465c30c4f202b02cd9cb12f12d9ea856c84c5203 of November 23.<br> >> <br> >> I updated one system with installkernel installworld over NFS without problems. Next I did the build system that was having the src and obj, but it stopped with the installworld. Retrying the installworld resulted with the ld-elf.so.1: /usr/bin/cc: Undefined symbol “LLVMInitializeAArch64TargetInfo” message.<br> >> <br> >> All systems are Intel or Amd, so I’m puzzled why the above symbol is needed. The only thing I can think of is that the build system builds all target compilers. The sucessfully installed system has a different src.conf without that option.<br> >> <br> >> What is wrong here? The update sequence I use is always the same.<br> > <br> > I think this is because your systems have been built with different src.conf configurations. These days /usr/bin/cc links to /usr/lib/libprivatellvm.so.19, so if you are installing world from a machine where src.conf options were different (in particular the WITHOUT_LLVM_TARGET_xxx options), there can be a mismatch between the symbols expected by the cc binary and the libprivatellvm.so.19 library.<br> > <br> > During installworld there is a moment where the libprivatellvm.so.19 library is installed, and where /usr/bin/cc is not yet updated. Due to our build system running recursive make, and some of those Makefiles invoking /usr/bin/cc, you can run into this issue.<br> > <br> > -Dimitry<br> > <br> <br> <br> </blockquote></div></div>home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrtZBwLK=XsNFkrnPfNMyLUrSB9Mkb0RAXeWd-F-iAqxA>
