Solved Running Emacs 28.1 on Upgraded FreeBSD 13.1

Hello,

FreeBSD is upgraded from 13.0 to 13.1, and doing:

pkg install -y emacs-nox
emacs

Results in:

ld-elf.so.1: /lib/libc.so.7: version FBSD_1.7 required by /usr/local/bin/emacs not found

I've already done pkg upgrade -y to upgrade all packages globally on the system, but this error still remains preventing the execution of Emacs text editor.

These is the output of freebsd-version -kru:

13.1-RELEASE-p2
13.1-RELEASE
13.1-RELEASE-p2

I didn't do the upgrade myself, but I see the system is already upgraded.
Could it result from improper upgrade of the OS?
Perhaps, due to a missing freebsd-update stage or similar.
If so, how this can be fixed?

NB. Emacs worked prefectly on FreeBSD 13.0.

Thanks
 
These is the output of freebsd-version -kru
What does uname -a show? I'm thinking the system hasn't been rebooted yet.

Perhaps, due to a missing freebsd-update stage or similar.
You can run freebsd-update install multiple times until it tells you there's nothing to install anymore.
 
This is what it should look like:
Code:
% freebsd-version -urk
13.1-RELEASE-p2
13.1-RELEASE-p2
13.1-RELEASE-p2
 
  • Like
Reactions: rwp
Also worth checking:
Code:
% ll /lib/libc.*
-r--r--r--  1 root  wheel  1955744 26 May 01:28 /lib/libc.so.7
You should have a /lib/libc.so.7 there. If that's still /lib/libc.so.6 (or even lower) then the version upgrade wasn't done properly.
 
  • Like
Reactions: rwp
This is what it should look like:
I think, as suggested, after rebooting the running kernel (the -r part) will show as patched to -p2 by booting the installed one, and there'll be no need to do freebsd-update -r 13.1 install again after reboot (which just cleans package libraries as the final step of the utility).

Does this means that emacs a userland utility is not compatible with the current kernel?
You should have a /lib/libc.so.7 there.
Yes, libc 7 is already there.
$ ls -1 /lib/libc.so.*
/lib/libc.so.7

This is what running strings on the C library shows:


$ strings /lib/libc.so.7 | grep FBSD_

FBSD_1.0
FBSD_1.1
FBSD_1.2
FBSD_1.3
FBSD_1.4
FBSD_1.5
FBSD_1.6


I guess there should be FBSD_1.7 symbol as well what Emacs 28.1 requires.

Thanks
 
I guess there should be FBSD_1.7 symbol as well what Emacs 28.1 requires.
Yep. That looks like a botched upgrade. I would suggest starting that again. But you will have to add an extra option or else the system is going to complain that you are trying to upgrade to a version it already has.

Assuming the system was 13.0-RELEASE before the upgrade:
freebsd-update -r 13.1-RELEASE --currently-running 13.0-RELEASE upgrade
freebsd-update install # ignore the suggestion to reboot
freebsd-update install # Yes, it has to be run twice.
shutdown -r now
 
  • Thanks
Reactions: rwp
Why ignore the suggestion to reboot?
It's not really necessary. In my 25+ years of upgrading FreeBSD there has been only one upgrade where you absolutely must boot the new kernel before installing 'world'. That was with FreeBSD 5.0 and the transition of UFS to UFS2. Failing to do so would result in a completely corrupted install. As I found out, after not reading /usr/src/UPDATING.
 
Back
Top