jails UNAME_r (14.1-RELEASE-p5) and OSVERSION (1301000) do not agree on major version number

Hi, I need to build an app in FreeBSD 13.1 (for running in a TrueNAS Core jail). My host is 14.1, I created a 13.1 jail and when I try to make the nodejs22 port I get:

Code:
make install clean
make: "/usr/ports/Mk/bsd.port.mk" line 1191: UNAME_r (14.1-RELEASE-p5) and OSVERSION (1301000) do not agree on major version number.
 
I run a couple of jails with mismatched worlds, but building ports isn't likely to work in such an environment.

My best suggestion would be to create a pure 13.1 VM in bhyve or QEMU (or just a spare drive or thumb drive), and build a package there. Then transfer the package to your jail and try installing it.
 
It looks at the note tag of either /sbin/init or /bin/sh. I can't remember which. you can see this by running elfdump -n /sbin/init or elfdump -n /bin/sh.
 
Sorry Jim L. I clicked on Report instead of Reply...Trying to revert that.
Are you certain you need to build from ports, as opposed to just installing a package? Although the packages for 13.x are build for 13.4, you might be able to get it to run on FreeBSD 13.1. One bit I forgot to mention is that the older your 13.1 world gets, the harder it will be to locate and download any files required by a given port, if you are forced to have to build it yourself. Over time you'll encounter more and more breakage in the build process itself, as you're beginning to see.
 
it was not a joke, it actually works
Code:
# Convert OSVERSION to major release number
_OSVERSION_MAJOR=       ${OSVERSION:C/([0-9]?[0-9])([0-9][0-9])[0-9]{3}/\1/}
# Sanity checks for chroot/jail building.
# Skip if OSVERSION specified on cmdline for testing. Only works for bmake.
.    if !defined(.MAKEOVERRIDES) || !${.MAKEOVERRIDES:MOSVERSION}
.      if ${_OSVERSION_MAJOR} != ${_OSRELEASE:R}
.        if !defined(I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE)
.error UNAME_r (${_OSRELEASE}) and OSVERSION (${OSVERSION}) do not agree on major version number.
.        endif
.      elif ${_OSVERSION_MAJOR} != ${OSREL:R}
.error OSREL (${OSREL}) and OSVERSION (${OSVERSION}) do not agree on major version number.
.      endif
.    endif
 
I run a couple of jails with mismatched worlds, but building ports isn't likely to work in such an environment.
Why would that be the case, though? AIUI ports in a jail would build entirely against the jailed 13.1 world, and the fact that the kernel is a later release shouldn't matter, so long as the newer kernel contains the relevant COMPAT options for the older release. If the world were newer we can see problems, but the other way around seems like it shouldn't be a problem.
 
Why would that be the case, though?
I should clarify that it can be done, especially when the difference in releases is slight, but building against an aging ports tree becomes more and more difficult over time.

The problem that I've hit most often is that the source code for the port(s) and/or dependencies "evaporates" over time. So if you need to build the frammitz port, the make fetch phase of port building fails because either the source repository hostname has changed (or disappeared entirely), or the source repo no longer has source code that old. Even if one does have a local copy of the source code for frammitz-1.0.0.tgz, it may well be that old frammitz depends on the friggle library version 0.9.8 and the source code repos for friggle have all disappeared, changed name, and/or don't have anything older than 1.2.0, which is not ABI compatible with friggle 0.9.8. And on and on....
 
Back
Top