On Sat, Nov 06, 2021 at 08:51:53PM +0000, Steve Fairhead wrote: > Hi folks, > > I think I've probably done something stupid, but I'm not sure where. Not > used sysupgrade before; I usually reinstall. So this is new to me. > > I updated a system from 6.9 to 7.0 with sysupgrade; no problems at all. I > then nuked the contents of /usr/src, and decanted the 7.0 src.tar.gz and > sys.tar.gz files as usual with a new install. Then did a cvs update for the > errata; still fine. Rebuilt kernel, installed it, rebooted; no problem. Then > tried rebuilding binaries, and it failed with: > > ld: error: undefined symbol: X509_STORE_get_by_subject > >>> referenced by x509.c > >>> x509.o:(x509_generate_kn) > >>> referenced by x509.c > >>> x509.o:(x509_generate_kn) > cc: error: linker command failed with exit code 1 (use -v to see invocation) > *** Error 1 in sbin/isakmpd (<bsd.prog.mk>:126 'isakmpd') > *** Error 2 in sbin (<bsd.subdir.mk>:48 'all': @for entry in atactl badsect > bioctl clri dhclient dhcpleased disklabel dmesg dump dumpfs fdi...) > *** Error 2 in . (<bsd.subdir.mk>:48 'all': @for entry in lib include bin > libexec sbin usr.bin usr.sbin share games gnu sys; do set -e; if ...) > *** Error 2 in . (Makefile:97 'do-build') > *** Error 2 in /usr/src (Makefile:74 'build') > > Where did I goof?
Hi, First, I will reply with in orthognal way: you after updating your system with sysupgrade(8), you could use syspatch(8) to automatically get all errata for free (in fact, it is part of the first boot). You could see syspatch(8) man page for more informations. Next regarding your build problem. Could you check that your /usr/src checkout is really a 7.0 checkout ? $ cd /usr/src && cvs status Makefile =================================================================== File: Makefile Status: Up-to-date Working revision: 1.136 Repository revision: 1.136 /cvs/src/Makefile,v Commit Identifier: X942RVJkKyHKgpGo Sticky Tag: OPENBSD_7_0 (branch: 1.136.8) Sticky Date: (none) Sticky Options: (none) You should have a Sticky Tag with OPENBSD_7_0. You should also check src/lib/libcrypto/x509/x509_vfy.h header file (in case only a part of the source tree isn't 7.0): $ cd /usr/src && cvs status lib/libcrypto/x509/x509_vfy.h =================================================================== File: x509_vfy.h Status: Up-to-date Working revision: 1.32 Repository revision: 1.32 /cvs/src/lib/libcrypto/x509/x509_vfy.h,v Commit Identifier: eX8XGeJSFn9gUlal Sticky Tag: OPENBSD_7_0 (branch: 1.32.4) Sticky Date: (none) Sticky Options: (none) In 7.0, X509_STORE_get_by_subject is a function (with symbol), but under -current, it moved to be a macro (no more symbol). x509_vfy.h is the one where the function (or the macro) is defined. And your build error looks like your source dir is mixing 7.0 and -current. If it is the case, as you might already installed some part of the source tree, you might want to reinstall to 7.0. Downgrading from -current (or partial -current) to 7.0 isn't supported. If you want to put your source tree back to 7.0, you could use: $ cd /usr/src && cvs update -A -r OPENBSD_7_0 -A : Reset any sticky tags/date/kopts (not sure if 100% necessary or not, but doesn't hurt) -r : Update using tag for 7.0 (the tag will become sticky) Thanks. -- Sebastien Marie