Re: 14.2-RELEASE buildworld failure
- In reply to: Scott Bennett : "14.2-RELEASE buildworld failure"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 25 Jan 2025 19:36:07 UTC
On 1/24/25 01:06, Scott Bennett wrote:
> I have been trying in vain to upgrade from
>
> FreeBSD hellas 12.4-RELEASE-p2 FreeBSD 12.4-RELEASE-p2 #9 releng/12.4-n235816-149768b65d61: Sat Feb 18 00:13:00 CST 2023 bennett@hellas:/usr/obj/usr/src/amd64.amd64/sys/hellas amd64
>
> to 14.2-RELEASE for some time now, but when I run "make buildworld" it fails
> during a linkedit step on complaints that it can't find a library that it wants.
> Here is an example of how it ends.
> .
> .
> .
> --- all_subdir_libexec ---
> --- all_subdir_libexec/atf/atf-check/tests ---
> ===> libexec/atf/atf-check/tests (all)
> --- atf-check_test ---
> echo '#! /usr/libexec/atf-sh' > atf-check_test.tmp
> cat /usr/src/contrib/atf/atf-sh/atf-check_test.sh >>atf-check_test.tmp
> chmod +x atf-check_test.tmp
> mv atf-check_test.tmp atf-check_test
> --- Kyuafile ---
> --- atf-check.full ---
> /usr/local/libexec/ccache/world/c++ -target x86_64-unknown-freebsd14.2 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -O2 -pipe "-mtune=core2" -fno-common -march=core2 -DHAVE_CONFIG_H -I/usr/src/contrib/atf -DATF_SHELL='"/bin/sh"' -fPIE -g -gz=zlib -Wno-format-zero-length -nobuiltininc -idirafter /usr/lib/clang/13.0.0/include -fstack-protector-all -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wpointer-arith -Wno-uninitialized -Wdate-time -Wformat=2 -Wno-format-extra-args -Werror -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-format-nonliteral -Qunused-arguments -fPIE -std=c++11 -Wno-deprecated-declarations -Wno-c++11-extensions -Wl,-zrelro -pie -o atf-check.full atf-check.o -lprivateatf-c++ -lprivateatf-c
> ld: error: undefined symbol: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::find(char, unsigned long) const
>>>> referenced by atf-check.cpp:345 (/usr/src/contrib/atf/atf-sh/atf-check.cpp:345)
>>>> atf-check.o:((anonymous namespace)::atf_check::process_option(int, char const*))
>>>> referenced by atf-check.cpp:263 (/usr/src/contrib/atf/atf-sh/atf-check.cpp:263)
>>>> atf-check.o:((anonymous namespace)::atf_check::process_option(int, char const*))
>>>> referenced by atf-check.cpp:313 (/usr/src/contrib/atf/atf-sh/atf-check.cpp:313)
>>>> atf-check.o:(parse_output_check_arg(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))
>
> ld: error: undefined symbol: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long, unsigned long, std::__1::allocator<char> const&)
>>>> referenced by string:1576 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/string:1576)
>>>> atf-check.o:((anonymous namespace)::atf_check::process_option(int, char const*))
>>>> referenced by string:1576 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/string:1576)
>>>> atf-check.o:((anonymous namespace)::atf_check::process_option(int, char const*))
>>>> referenced by string:1576 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/string:1576)
>>>> atf-check.o:((anonymous namespace)::atf_check::process_option(int, char const*))
>>>> referenced 5 more times
>
> ld: error: undefined symbol: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::compare(unsigned long, unsigned long, char const*) const
>>>> referenced by atf-check.cpp:264 (/usr/src/contrib/atf/atf-sh/atf-check.cpp:264)
>>>> atf-check.o:((anonymous namespace)::atf_check::process_option(int, char const*))
>>>> referenced by atf-check.cpp:314 (/usr/src/contrib/atf/atf-sh/atf-check.cpp:314)
>>>> atf-check.o:(parse_output_check_arg(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))
>
> ld: error: undefined symbol: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append(char const*)
>>>> referenced by string:3978 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/string:3978)
>>>> atf-check.o:((anonymous namespace)::atf_check::process_option(int, char const*))
>>>> referenced by string:1254 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/string:1254)
>>>> atf-check.o:((anonymous namespace)::atf_check::main())
>>>> referenced by string:3978 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/string:3978)
>>>> atf-check.o:(run_output_checks(std::__1::vector<(anonymous namespace)::output_check, std::__1::allocator<(anonymous namespace)::output_check> > const&, atf::fs::path const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))
>>>> referenced 2 more times
>
> ld: error: undefined symbol: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::push_back(char)
>>>> referenced by string:1258 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/string:1258)
>>>> atf-check.o:((anonymous namespace)::atf_check::main())
>>>> referenced by atf-check.cpp:589 (/usr/src/contrib/atf/atf-sh/atf-check.cpp:589)
>>>> atf-check.o:(run_output_checks(std::__1::vector<(anonymous namespace)::output_check, std::__1::allocator<(anonymous namespace)::output_check> > const&, atf::fs::path const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))
>>>> referenced by istream:1269 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/istream:1269)
>>>> atf-check.o:(std::__1::basic_istream<char, std::__1::char_traits<char> >& std::__1::getline[abi:se180100]<char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, char))
> ld: error: undefined symbol: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::insert(unsigned long, char const*)
>>>> referenced by string:3965 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/string:3965)
>>>> atf-check.o:(get_monotonic_useconds())
>>>> referenced by string:3965 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/string:3965)
>>>> atf-check.o:(cat_file(atf::fs::path const&))
>>>> referenced by string:3965 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/string:3965)
>>>> atf-check.o:(run_output_checks(std::__1::vector<(anonymous namespace)::output_check, std::__1::allocator<(anonymous namespace)::output_check> > const&, atf::fs::path const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))
>>>> referenced 5 more times
>
> ld: error: undefined symbol: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::reserve(unsigned long)
>>>> referenced by atf-check.cpp:557 (/usr/src/contrib/atf/atf-sh/atf-check.cpp:557)
>>>> atf-check.o:(run_output_checks(std::__1::vector<(anonymous namespace)::output_check, std::__1::allocator<(anonymous namespace)::output_check> > const&, atf::fs::path const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))
> ld: error: undefined symbol: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::operator=(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
>>>> referenced by sstream:420 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/sstream:420)
>>>> atf-check.o:(std::__1::basic_istringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_istringstream[abi:se180100](std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int))
>
> ld: error: undefined symbol: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::resize(unsigned long, char)
>>>> referenced by string:1196 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/string:1196)
>>>> atf-check.o:(std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init_buf_ptrs[abi:se180100]())
> ld: error: /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libprivateatf-c++.so: undefined reference to std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::push_back(char) [--no-allow-shlib-undefined]
> ld: error: /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libprivateatf-c++.so: undefined reference to std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append(char const*) [--no-allow-shlib-undefined]
> ld: error: /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libprivateatf-c++.so: undefined reference to std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append(char const*, unsigned long) [--no-allow-shlib-undefined]
> ld: error: /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libprivateatf-c++.so: undefined reference to std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::insert(unsigned long, char const*) [--no-allow-shlib-undefined]
> ld: error: /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libprivateatf-c++.so: undefined reference to std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::find(char, unsigned long) const [--no-allow-shlib-undefined]
> ld: error: /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libprivateatf-c++.so: undefined reference to std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::operator=(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) [--no-allow-shlib-undefined]
> ld: error: /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libprivateatf-c++.so: undefined reference to std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::assign(char const*) [--no-allow-shlib-undefined]
> ld: error: /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libprivateatf-c++.so: undefined reference to std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long, unsigned long, std::__1::allocator<char> const&) [--no-allow-shlib-undefined]
> ld: error: /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libprivateatf-c++.so: undefined reference to std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string() [--no-allow-shlib-undefined]
> ld: error: /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libprivateatf-c++.so: undefined reference to std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::erase(unsigned long, unsigned long) [--no-allow-shlib-undefined]
> ld: error: /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libprivateatf-c++.so: undefined reference to std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::resize(unsigned long, char) [--no-allow-shlib-undefined]
> --- all_subdir_cddl ---
> make[5]: /usr/obj/usr/src/amd64.amd64/cddl/lib/libzpool/.depend, 1: ignoring stale .depend for /usr/obj/usr/src/amd64.amd64/cddl/lib/libicp/libicp_pie.a
> make[5]: /usr/obj/usr/src/amd64.amd64/cddl/lib/libzpool/.depend, 1: ignoring stale .depend for /usr/obj/usr/src/amd64.amd64/cddl/lib/libnvpair/libnvpair_pie.a
> --- libzpool.so.2.full ---
> building shared library libzpool.so.2
> --- all_subdir_libexec ---
> c++: error: linker command failed with exit code 1 (use -v to see invocation)
> *** [atf-check.full] Error code 1
>
> make[5]: stopped in /usr/src/libexec/atf/atf-check
> --- all_subdir_cddl ---
> --- all_subdir_lib ---
> ctfconvert -L VERSION -g fini_test.pico
> --- all_subdir_bin ---
> ctfconvert -L VERSION -g chflags.o
> 8.28 real 0.98 user 0.97 sys
> 5770.159u 5426.451s 5:32:51.54 56.0% 708+388k 8457884+476362io 125159pf+25w
> hellas#
>
> My /etc/make.conf contains the following.
>
> ALLOW_UNSUPPORTED_SYSTEM=YES
> # added by SJB 11 Jan. 2007
> CPUTYPE?=core2
> #CPUTYPE?=penryn # gcc9 doesn't recognize this, so use core2 -mssse3 -msse4.1
> # added by SJB 8 Nov. 2011
> CFLAGS+="-mtune=core2"
> #CFLAGS+="-mtune=penryn" # see note for CPUTYPE above
> # added by SJB 14 Apr. 2013
> # updated by SJB 8 Dec. 2014
> SVNFLAGS?="-r RELENG_11"
> # build ports with clang stack protector
> WITH_SSP=yes
> SSP_CFLAGS=-fstack-protector-all
> # added for ports system use to avoid dialogs by SJB 4 May 2007
> BATCH=YES
> # added for new pkg system --SJB 10 December 2014
> WITH_PKGNG=yes
> # build ports using ccache --SJB 19 January 2015
> WITH_CCACHE_BUILD=yes
> ## buildworld and buildkernel using ccache --SJB 26 January 2015
> .if (!empty(.CURDIR:M/usr/src*) || !empty(.CURDIR:M/usr/obj*))
> .if !defined(NOCCACHE) && exists(/usr/local/libexec/ccache/world/cc)
> CC:=${CC:C,^cc,/usr/local/libexec/ccache/world/cc,1}
> CXX:=${CXX:C,^c\+\+,/usr/local/libexec/ccache/world/c++,1}
> CCACHE_COMPILERCHECK=content
> CCACHE_DIR=/buildwork/ccache.freebsd
> .endif
> .else
> CFLAGS+="-mssse3"
> CFLAGS+="-msse4.1"
> .endif
> # added to deal with ccache bug 8460 --SJB 2 November 2013
> # bug has been reported fixed, so try without this workaround
> #CCACHE_CPP2=1
> # added as a better specification of -j by SJB 17 November 2009
> MAKE_JOBS_NUMBER=4
> ## added to compile without profiling --SJB 3 June 2007
> #NO_PROFILE=true
> # put build tree where there is plenty of temporary workspace
> WRKDIRPREFIX=/buildwork/ports
> #WRKDIRPREFIX=/work/portswork
> # Use OpenSSL from ports tree, not from base system
> #WITH_OPENSSL_PORT=YES
> #DEFAULT_VERSIONS+= ssl=libressl
> DEFAULT_VERSIONS+= ssl=openssl
> DEFAULT_VERSIONS+=bdb=5+
> DEFAULT_VERSIONS+= linux=c7_64
> DEFAULT_VERSIONS+= perl5=5.32
> DEFAULT_VERSIONS+= python=3.9 python2=2.7 python3=3.9
> # Allow updating of Mesa3D from 7.4.4 to 7.6.1 and libdrm from 2.4.12 to 2.4.17
> WITHOUT_NOUVEAU=yes
> # Use ATLAS libraries in ports that use BLAS libraries
> OPTIONS_SET=ATLAS
> # Tell gnustep-related ports to use base system's compiler
> GNUSTEP_WITH_BASE_GCC=yes
> GNUSTEP_WITHOUT_LIBOBJC=yes
> # Pango
> #..if $(.CURDIR:M*/x11-toolkits/linux-pango)
> #DISABLE_VULNERABILITIES=yes
> #..endif
> QT4_OPTIONS= CUPS NAS QGTKSTYLE
> # Begin portconf settings
> # Do not touch these lines
> .if !empty(.CURDIR:M/usr/ports*) && exists(/usr/local/libexec/portconf)
> _PORTCONF!=/usr/local/libexec/portconf
> .if ${_PORTCONF} != "|"
> .for i in ${_PORTCONF:S/^|//:S/|/ /g}
> ${i:C/^([^=]*)=.*/\1/}=${i:C/^[^=]*=//:S/%/ /g}
> .endfor
> .endif
> .endif
> # End portconf settings
>
> My /etc/src.conf is as follows. Note that PORTS_MODULES has been
> commented out for years.
>
> # The PORTS_MODULES must be built and installed manually because the
> # mechanism of /etc/src.conf fails when installing into a ZFS clone
> # of the root file system mounted onto /mnt. Leave the following
> # line commented, and remember to build them after installing world
> # and rebooting into the newly installed system.
> #PORTS_MODULES=emulators/virtualbox-ose-kmod graphics/drm-fbsd11.2-kmod sysutils/graid5 sysutils/pefs-kmod
> WITH_CCACHE_BUILD=yes
> WITH_CLANG_EXTRAS=yes
> WITH_CLANG_FULL=yes
> WITH_CTF=yes
> WITH_DEBUG_FILES=yes
> WITH_EXTRA_TCP_STACKS=yes
> WITH_LIBCPLUSPLUS=yes
> WITH_LINT=yes
> WITH_LLD_BOOTSTRAP=yes
> WITH_LLDB=yes
> WITH_LOADER_FIREWIRE=yes
> WITH_LOADER_GELI=yes
> WITH_ZONEINFO_LEAPSECONDS_SUPPORT=yes
> #WITHOUT_CLANG_BOOTSTRAP=yes
> WITHOUT_CROSS_COMPILER=yes
> WITHOUT_REPRODUCIBLE_BUILD=YES
>
> If someone more knowledgeable about the buildworld process can tell me
> what I need to do to get buildworld to run to completion so that I can upgrade,
> I could really use the help. I have some installed ports and packages that
> are now often failing, but I can't upgrade them on this obsolete release.
> Thanks in advance for any help.
Some of the settings are old/outdated and can be removed and I admit
I don't know what all of them even do. Settings that you only want to
have applied to building world/kernel and not also apply to each prot's
build are normally put into /etc/src.conf .
I'd say its good to disable PORTS_MODULES as it causes building to
freeze if building with a jobs count defined and any port opens up a
configure dialog since the dialog must be answered to continue but the
dialog can't reach the terminal for the user to answer it; if you want
to use it then you need to preemptively make sure all dialogs are
answered or remove the jobs count during the stage where they are built.
At that point I just avoid the bug by building them separate; I use
poudriere but its definitely a slower routine to do so.
It is recommended to disable building with multiple jobs when
upgrading instead of rebuilding though its normally not an issue; could
try it anyway and definitely makes compiler output reporting more
orderly+repeatable.
I've also had various issues with cached results interfering with
builds. Are you also using WITH_META_MODE defined in /etc/src-env.conf ?
If you are wanting to skip 13 because of the "scary data loss" bug,
remember that the same bug is present in 12 and all earlier versions too
(though less of the tools were as capable of triggering it); I thought
there was a sysctl that was recommended to further minimize its issues.
The horrible freebsd-upgrade performance people mentioned going from 12
to 13 and 13 to 14 should not impact upgrading from source. I'd avoid
earlier 13 versions and go straight to its latest if possible; think it
was 13.2 and arc_prune that had bad system performance overall but
seemed to have other symptoms/issues of slowdown on my system beyond
that. Most of my 13 performance issues were related to high memory use
and short of that spiraling out of control I'd say it was otherwise
relatively stable for me. If its about data concerns, those are best
fixed by a backup.
I had to do additional cleanup steps to go from 13 to 14
successfully. Not sure what interfered and don't have the build errors
on hand at the moment but I used the following for cleanup:
chflags -R noschg /usr/obj/usr;rm -rf /usr/obj/usr;cd /usr/src&&make
cleandir&&make cleandir
Those were from my old notes I had from years of upgrading a box. I
don't recall notes that make me think going from 12 to 14 needs an
intermediate step but I haven't tried it. Intermediate versions are
recommended when unexplained failures occur.
If cleanup doesn't fix it then you have to choose to try to narrow
down which version you can jump to with your current configuration to
determine what is breaking and/or simplify your configuration to see if
your 12 to 14 leap is in iteself broken.
If you tried a proper cleanup, tried disabling caching, tried
building with 1 job, and not customizing the world/kernel build
options/environment without success then I assume there is an
intermediate step needed. You could try earlier versions of 14 if you
still insist on trying to skip 13 in case its somehow something weird
about certain upgrades to the compiler or something.
You don't need to do an installworld/installkernel to test 'if' a
build failure is still happening so you could completely remove
customizations to the kernel, make.conf, etc. Once building works then
you can start adding pieces back in.
> Scott Bennett, Comm. ASMELG, CFIAG
> **********************************************************************
> * Internet: bennett at sdf.org *xor* bennett at freeshell.org *
> *--------------------------------------------------------------------*
> * "A well regulated and disciplined militia, is at all times a good *
> * objection to the introduction of that bane of all free governments *
> * -- a standing army." *
> * -- Gov. John Hancock, New York Journal, 28 January 1790 *
> **********************************************************************
>
>