On Sun, Sep 20, 2026 at 10:46 PM Mark Millard <[email protected]> wrote: > > On 9/20/26 18:54, Mark Millard wrote: > > On 9/20/26 11:13, Mark Millard wrote: > >> [I have CC'd a could of authors with recent libpmc commits. I did not > >> list any recent libc authors.] > >> > >> . . . > >> > > > > I found the type of problem --but it is not a obvious extension of > > the prior material: META_MODE recorded something that indicates the > > actual problem . . . > > > > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/lib/libpmc/pmu-events/jevents.pieo.meta:R > > 12651 /usr/include/fts.h > > > > The build is using the /usr/include/fts.h from the live old system > > while trying to build the new system. > > > > Given the FTSENT change of layout from old to new, that does not > > work. Also, this is not something that clearing out /usr/obj/ . . . > > and rebuilding fixes. > > > > The build of lib/libpmc/pmu-events/jevents.* should get the fts.h > > file from the source tree being built, in my case I was working in > > /usr/main-src/ so: > > > > # find -s /usr/main-src/ -name fts.h -print > > /usr/main-src/include/fts.h > > > > lists a path to the file that should have been used for the build. > > > > I expect that this would be a libpmc development issue, not a fts > > development issue for who solves it. > > > > > > Also: this turns out to not be an arm specific problem. > > > > > > The problematic include handling for building system updates extends far > beyond the specific example in jevents.pieo.meta : All but 8 of the many > include file usages were strictly tied to the old live system instead of > to the new system's source tree (to some degree): > (The ones that mention main-src are those that involve the source tree > that I was doing the build for.) > > # grep -e /include/ -e '\.h$' > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/lib/libpmc/pmu-events/jevents.pieo.meta > R 12651 /usr/include/sys/param.h > R 12651 /usr/include/sys/_null.h > R 12651 /usr/include/sys/_param.h > R 12651 /usr/include/sys/types.h > R 12651 > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/tmp/legacy/usr/include/sys/cdefs.h > R 12651 > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/tmp/legacy/usr/include/sys/_decls.h > R 12651 > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/tmp/legacy/usr/include/sys/_visible.h > R 12651 /usr/include/machine/endian.h > R 12651 /usr/include/sys/_types.h > R 12651 /usr/include/machine/_types.h > R 12651 /usr/include/sys/_endian.h > R 12651 /usr/include/sys/_offsetof.h > R 12651 /usr/include/sys/_pthreadtypes.h > R 12651 /usr/include/sys/_stdint.h > R 12651 /usr/include/sys/bitcount.h > R 12651 /usr/include/sys/select.h > R 12651 /usr/include/sys/_sigset.h > R 12651 /usr/include/sys/_timeval.h > R 12651 /usr/include/sys/timespec.h > R 12651 /usr/include/sys/_timespec.h > R 12651 /usr/include/sys/syslimits.h > R 12651 /usr/include/sys/signal.h > R 12651 /usr/include/sys/_sigaltstack.h > R 12651 /usr/include/sys/_sigval.h > R 12651 /usr/include/machine/_limits.h > R 12651 /usr/include/machine/signal.h > R 12651 /usr/include/machine/param.h > R 12651 /usr/include/sys/_align.h > R 12651 /usr/include/sys/limits.h > R 12651 /usr/include/sys/_maxphys.h > R 12651 /usr/include/sys/resource.h > R 12651 /usr/include/sys/stat.h > R 12651 /usr/include/sys/time.h > R 12651 /usr/include/sys/_clock_id.h > R 12651 /usr/include/time.h > R 12651 /usr/include/xlocale/_time.h > R 12651 /usr/include/ctype.h > R 12651 /usr/include/_ctype.h > R 12651 /usr/include/runetype.h > R 12651 /usr/include/xlocale/_ctype.h > R 12651 /usr/include/dirent.h > R 12651 /usr/include/sys/dirent.h > R 12651 /usr/include/errno.h > R 12651 /usr/include/libgen.h > R 12651 /usr/include/limits.h > R 12651 /usr/include/stdarg.h > R 12651 /usr/include/sys/_stdarg.h > R 12651 > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/tmp/legacy/usr/include/stddef.h > R 12651 /usr/include/stddef.h > R 12651 /usr/include/stdio.h > R 12651 /usr/include/stdlib.h > R 12651 /usr/include/string.h > R 12651 /usr/include/strings.h > R 12651 /usr/include/xlocale/_strings.h > R 12651 /usr/include/xlocale/_string.h > R 12651 /usr/include/unistd.h > R 12651 /usr/include/sys/unistd.h > R 12651 /usr/include/ftw.h > R 12651 /usr/main-src/lib/libpmc/pmu-events/list.h > R 12651 /usr/main-src/lib/libpmc/pmu-events/jsmn.h > R 12651 /usr/main-src/lib/libpmc/pmu-events/json.h > R 12651 /usr/include/stdbool.h > R 12651 /usr/main-src/lib/libpmc/pmu-events/pmu-events.h > R 12651 /usr/include/fts.h > > > Some of those may be lower risk of incompatible changes than others but > the general trend is not good for doing system builds when layout > changes or other incompatibilities are introduced. > > Of course, there are some things that are built for operation on the > older system instead of the newer one. So the classification is case by > case across the various *.meta files. > > > Taking a quick stab at finding other examples (incomplete because of the > failed build): > > # find -s /usr/obj/BUILDs/main-CA76-nodbg-clang/ -name \*.meta -exec > grep -l -e ' /usr/include/' {} \; | grep -v /tmp/obj-tools/ > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/bin/csh/gethost.meta > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/bin/sh/mknodes.meta > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/bin/sh/mksyntax.meta > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/host-osreldate.h.meta > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/lib/libmagic/mkmagic.meta > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/lib/libpmc/pmu-events/jevents.pieo.meta > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/lib/libpmc/pmu-events/jsmn.pieo.meta > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/lib/libpmc/pmu-events/json.pieo.meta > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/lib/ncurses/tinfo/make_hash.meta > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/lib/ncurses/tinfo/make_keys.meta > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/rescue/rescue/usr/main-src/bin/csh/gethost.meta > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/rescue/rescue/usr/main-src/bin/sh/mknodes.meta > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/rescue/rescue/usr/main-src/bin/sh/mksyntax.meta > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/share/syscons/scrnmaps/armscii8-2haik8.mk.meta > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/share/syscons/scrnmaps/iso-8859-1_to_cp437.mk.meta > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/share/syscons/scrnmaps/iso-8859-4_for_vga9.mk.meta > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/share/syscons/scrnmaps/iso-8859-7_to_cp437.mk.meta > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/share/syscons/scrnmaps/koi8-r2cp866.mk.meta > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/share/syscons/scrnmaps/koi8-u2cp866u.mk.meta > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/share/syscons/scrnmaps/us-ascii_to_cp437.mk.meta > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/usr.bin/awk/maketab.meta > /usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/arm64.aarch64/usr.bin/vi/catalog/dump.meta > > > -- > === > Mark Millard > marklmi at yahoo.com
Interesting find. And I can reproduce it, partially. If I build 16.0-CURRENT from a 15.1 host, and look at the generated symbols: > objdump -T /usr/obj/.../amd64.amd64/lib/libpmc/pmu-events/jevents.full | grep > fts_ 0000000000000000 DF *UND* 0000000000000000 (FBSD_1.5) fts_open 0000000000000000 DF *UND* 0000000000000000 (FBSD_1.5) fts_read 0000000000000000 DF *UND* 0000000000000000 (FBSD_1.5) fts_close I see the FBSD_1.5 version of those symbols. It should be FBSD_1.9 instead. Indeed, if I build from a 16.0 host I do see the FBSD_1.9 symbols. So the build is definitely wrong. But that doesn't quite explain why you would get a segfault. Linking to the FBSD_1.5 symbols while using the old header files should work fine. So I wonder if the build is somehow including a mixture of old header files and new ones. That would explain a segfault.
