Date: Sun, 08 Oct 2023 18:13:16 +0000 From: jbo@insane.engineer To: FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org> Subject: Re: Base libc++ missing symbol Message-ID: <GtMAcYSvTlbSaTrfrExIPDXkTdPQTpI4SaaqJVYsLbXq4UaIY8HnhNsbMAXenHmlQmnErjolx1_nVjQbfv1-hhdl54l7Nu0r759ud3P1i0Q=@insane.engineer> In-Reply-To: <7C16CD19-6974-40A2-BCF2-16BD9924945D@yahoo.com> References: <97AB873D-57E4-48D3-985D-AAD64FB42E65@yahoo.com> <7C16CD19-6974-40A2-BCF2-16BD9924945D@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> The procedure of seeing if the a.out is produced without complaint > might still be useful. The program compiles & links fine, but then also fails to run: ld-elf.so.1: Undefined symbol "_ZTVNSt3__13pmr25monotonic_buffer_resourceE"= referenced from COPY relocation in /usr/home/jbo/junk/a.out I made no progress on this. I have reinstalled world twice (from different commits) and I re-installed all packages multiple times (also from differen= t ports tree commits). Any other wild ideas on how to fix this? None of my other machines have any issues whatsoever running on the same or similar stable/13 commit and using the same poudriere repository. This is certainly not Qt5 related. I run into the exact same issue with anything that uses Qt6. Furthermore, the test program we built experiences the same issue without any involvement of the Qt libraries. Best regards, ~ jbo ------- Original Message ------- On Tuesday, October 3rd, 2023 at 02:48, Mark Millard <marklmi@yahoo.com> wr= ote: >=20 >=20 > On Oct 2, 2023, at 15:56, Mark Millard marklmi@yahoo.com wrote: >=20 > > Joel Bodenmann <jbo_at_FreeBSD.org> wrote on > > Date: Mon, 02 Oct 2023 20:00:29 UTC : > >=20 > > > It seems like I finally managed to hose a FreeBSD system. > > > The machine in question is my workstation at home. It has been runnin= g > > > stable/13 without any problems. Yesterday I've updated to > > > ef295f69abbffb3447771a30df6906ca56a5d0c0 and since then I'm getting a= n > > > undefined symbol on anything using Qt: > > >=20 > > > ld-elf.so.1: /usr/local/lib/qt5/libQt5Widgets.so.5: Undefined symbol > > > "_ZTVNSt3__13pmr25monotonic_buffer_resourceE" > > >=20 > > > Unless I'm missing something, it would seem like my base libc++ > > > is missing the pmr::monotonic_buffer_resource symbol. > >=20 > > I do not have a 13.2 context, so you may want to run the > > analogous steps in your context for confirming/denying > > the below applies. > >=20 > > # llvm-cxxfilt _ZTVNSt3__13pmr25monotonic_buffer_resourceE > > vtable for std::__1::pmr::monotonic_buffer_resource > >=20 > > Using the example "Run this code" source from: > >=20 > > https://en.cppreference.com/w/cpp/memory/monotonic_buffer_resource > >=20 > > # c++ -std=3Dc++17 -pedantic -O2 monotonic_buffer_resource.cpp > >=20 > > # objdump -x a.out | grep _ZTVNSt3__13pmr25monotonic_buffer_resourceE > > 0000000000204160 g O .bss.rel.ro 0000000000000038 _ZTVNSt3__13pmr25mono= tonic_buffer_resourceE > >=20 > > # nm a.out | grep _ZTVNSt3__13pmr25monotonic_buffer_resourceE > > 0000000000204160 B _ZTVNSt3__13pmr25monotonic_buffer_resourceE > >=20 > > # ./a.out > > t1 (default std alloc): 0.491 sec; t1/t1: 1.000 > > t2 (default pmr alloc): 0.541 sec; t1/t2: 0.906 > > t3 (pmr alloc no buf): 0.188 sec; t1/t3: 2.616 > > t4 (pmr alloc and buf): 0.155 sec; t1/t4: 3.172 > >=20 > > Note that the vtable is in the a.out instead of being from > > a library. It is global but is in the a.out .bss.rel.ro http://bss.rel.= ro/ in > > the example and is defined. > >=20 > > > At first I thought I might have messed up on installworld but rolling > > > back to the previous boot environment and then performing the same > > > procedure again lead to the same outcome. > >=20 > > If the above works similarly in your context, then I expect > > that the issue is on the qt5 or port side of things, not the > > system libraries/headers. > >=20 > > As I understand, clang++ 16 is the first vintage with this > > directly supported, instead of being just in the experimental > > category/area for libc++. May be tracking that transition is > > at issue. > >=20 > > For reference: > >=20 > > # c++ -v > > FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git = llvmorg-16.0.6-0-g7cbf1a259152) > > Target: x86_64-unknown-freebsd15.0 > > Thread model: posix > > InstalledDir: /usr/bin > >=20 > > # uname -apKU > > FreeBSD amd64-ZFS 15.0-CURRENT FreeBSD 15.0-CURRENT #124 main-n265447-e= 5236d25f2c0-dirty: Thu Sep 21 09:06:08 PDT 2023 root@amd64-ZFS:/usr/obj/BUI= LDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/sys/GENERIC-NODBG amd64= amd64 1500001 1500001 > >=20 > > > Any ideas or wild guesses? Anything obvious I'm missing here? > > >=20 > > > uname -a > > > FreeBSD beefy02 13.2-STABLE FreeBSD 13.2-STABLE > > > stable/13-n256443-ef295f69abbf GENERIC amd64 > > >=20 > > > freebsd-version -kru > > > 13.2-STABLE > > > 13.2-STABLE > > > 13.2-STABLE > > >=20 > > > clang --version > > > FreeBSD clang version 16.0.6 > > > (https://github.com/llvm/llvm-project.git > > > llvmorg-16.0.6-0-g7cbf1a259152) Target: x86_64-unknown-freebsd13.2 > > > Thread model: posix > > > InstalledDir: /usr/bin >=20 >=20 > Given Dimitry Andric's notes: >=20 > # objdump -x /lib/libc++.so.1 | grep _ZTVNSt3__13pmr25monotonic_buffer_re= sourceE > 00000000001006d8 g O .data.rel.ro 0000000000000038 _ZTVNSt3__13pmr25monot= onic_buffer_resourceE >=20 > # nm /lib/libc++.so.1 | grep _ZTVNSt3__13pmr25monotonic_buffer_resourceE > 00000000001006d8 D _ZTVNSt3__13pmr25monotonic_buffer_resourceE >=20 > So /lib/libc++.so.1 has a global symbol naming initialized data > for this in my context. >=20 > Reminder for the a.out: >=20 > # objdump -x a.out | grep _ZTVNSt3__13pmr25monotonic_buffer_resourceE > 0000000000204160 g O .bss.rel.ro 0000000000000038 _ZTVNSt3__13pmr25monoto= nic_buffer_resourceE >=20 > # nm a.out | grep _ZTVNSt3__13pmr25monotonic_buffer_resourceE > 0000000000204160 B _ZTVNSt3__13pmr25monotonic_buffer_resourceE >=20 > My original thinking makes no sense for this. Sorry for the noise. >=20 > The procedure of seeing if the a.out is produced without complaint > might still be useful. >=20 > =3D=3D=3D > Mark Millard > marklmi at yahoo.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?GtMAcYSvTlbSaTrfrExIPDXkTdPQTpI4SaaqJVYsLbXq4UaIY8HnhNsbMAXenHmlQmnErjolx1_nVjQbfv1-hhdl54l7Nu0r759ud3P1i0Q=>