So many of us chug happily along without completely realizing or recognizing how some of the present FreeBSD build mechanisms have become a bit more complex. Those who never have any need of graphics and remain in a text mode commandline interface for the duration of their use of FreeBSD would not know that there is indeed at least one situation, now, which ties a port and the kernel together. When everything is working perfectly, this would likely never come up, but a relatively small problem inflated itself to cause my kernel build to fail.
During this troubleshooting quest, first I tried the obvious things, re-rebuild world just to be sure it was ok, then rebuild a GENERIC kernel instead of my custom kernconf and that after having re-enabled some possibly related things in that kernconf to no avail. After beating my figurative head against the wall for quite a while, I went to twitter to see if @FreeBSDHelp had any ideas.
The details and comments on that discussion thread didn't solve my issue as I could not comprehend how our kernel build was now in any way tied to the build of a port, though the comment that was made may not have explicitly indicated this. So my next thought was, if I could get a different, earlier version of the
The reason, besides that it had been in excess of 10 days since the last time I rebuilt my kernel and world, was to get virtualbox working which needed bits from the kernel build which I didn't have, and those need to be the same version as the running OS. This meant my long journey to rebuild my kernel and world (multiple times each) so that I could use Virtualbox to try the game Veloren which due to whatever is different than expected (FVWM3 and Radeon graphics probably, or similar) does build and install but does NOT run. I am sure that if I could startup Virtualbox, put tinycore Linux in there, and install Veloren for Linux, I would probably succeed where I was prevented otherwise. I could not install another OS in Virtualbox because I could not boot the iso, and this due to the virtualbox kernel object not having been loaded. I couldn't load the needed kernel object since it needed to be built, and now you know why I got stuck down this rabbit hole.
It has been some time since setting that whole "Play Veloren in Virtualbox via tinycore Linux" idea on a back burner or in a box on a shelf somewhere. One of my incomplete projects is to get my port attempt of Reshade rebuilt, which I was attempting and it ran into some conflicts with python items. The various python things it needed were installed as version 310 while I already had version 39 of those same ports. The only way forward was to remove each of the python 3.9 ports to let the reshade build then install what it needed as version 3.10. Among all of the things that were removed as a consequence of this, was vlc and firefox, both I use daily. So I gave poudriere a gross list of everything I had installed on my system, let it build, and then discovered a number of things that failed. The
And so, I thought that's not a problem, I'll go investigate what happened with
root@ichigo:~ # ls -l Symbolic_Links/p-keg-logs_bulk_13amd64_latest-per-pkg lrwxr-xr-x 1 root wheel 66 May 5 2021 Symbolic_Links/p-keg-logs_bulk_13amd64_latest-per-pkg -> /usr/local/poudriere/data/logs/bulk/13amd64-default/latest-per-pkg
and from there I could do
root@ichigo:~ # tail -n 15 Symbolic_Links/p-keg-logs_bulk_13amd64_latest-per-pkg/drm-fbsd13-kmod-5.4.144.g20220223.log ===> Checking for items in STAGEDIR missing from pkg-plist Error: Orphaned: %%KMODSRC%%/linuxkpi/dummy/include/linux/random.h Error: Orphaned: %%KMODSRC%%/linuxkpi/dummy/include/linux/suspend.h ===> Checking for items in pkg-plist which are not in STAGEDIR ===> Error: Plist issues found. *** Error code 1 Stop. make: stopped in /usr/ports/graphics/drm-fbsd13-kmod =>> Error: check-plist failures detected =>> Cleaning up wrkdir ===> Cleaning for drm-fbsd13-kmod-5.4.144.g20220223 build of graphics/drm-fbsd13-kmod | drm-fbsd13-kmod-5.4.144.g20220223 ended at Sat Feb 26 00:30:21 CST 2022 build time: 00:04:43 !!! build failure encountered !!!
Firstly, the build failure is due to my choice to be a bit more stringent on builds, to test for various things, so it is possible that this might not appear to most users, although it truly should be visible to all the port maintainers and various FreeBSD developers. It tells me, as did the small highlighted concise reason in the failed build list output from after I ran poudriere, that it is an issue with the pkg-plist. This I correctly believed was a simple issue, and easy to fix since this process is something I have repeated many times with my own repos for FreeBSD Port Tree Leaf items such as for Minetest-dev which I wrote about in another blog post.
What I needed to do was go to
in order to do a comparison between this new fresh list and the old original list. This is accomplished by
to step through the output, looking for something that is present or absent in the newly generated pkg-plist as compared to the old one. Since a pkg-plist that is in the ports tree may have %%text%% type tags which are often not generated by the make makeplist script, I usually modify the pkg-plist-old to match the one freshly generated. Once the edits are made, I rename the pkg-plist-old to pkg-plist and then rebuild once more to prove no errors related to the file remain.
Now that
I have been writing about all of this within a relatively short period after succeeding to build kernel and world when it had been broken some week(s) ago. My new kernel has not yet been installed and I have to build the virtualbox thing(s) that are dependent upon the source. It is nice now to have this mess cleared up and better understood. I'll be adding this nit to the lists of build issues for kernel or world, and add emphasis on the relationship between this port and the kernel which likely many of us had not known. The kernel failure meant the virtualbox port for a kernel object couldn't be built, but the kmod graphics port is what broke the kernel.