emacs issue

uname -a = FreeBSD 12.1-STABLE FreeBSD 12.1-STABLE r356611 GENERIC amd64

Everything was working fine and then a couple days ago I did the "pkg update/pkg upgrade" after doing that, my emacs stopped working. Whenever I try to run it I get the following:

ld-elf.so.1: /usr/local/bin/emacs: Undefined symbol "fflush_unlocked@FBSD_1.6"

I like to think I've done due diligence in researching this via google but have found nothing helpful.

Please help, I really need my emacs back.....

TIA
 
uname -a = FreeBSD 12.1-STABLE FreeBSD 12.1-STABLE r356611 GENERIC amd64

Everything was working fine and then a couple days ago I did the "pkg update/pkg upgrade" after doing that, my emacs stopped working. Whenever I try to run it I get the following:

ld-elf.so.1: /usr/local/bin/emacs: Undefined symbol "fflush_unlocked@FBSD_1.6"

I like to think I've done due diligence in researching this via google but have found nothing helpful.

Please help, I really need my emacs back.....

TIA

Sorry, I should add, I tried "pkg update/pkg upgrade" again and the following appeared:

Message from emacs-nox-27.1,3:

--
The major version of editors/emacs was bumped from 26 to 27. To upgrade
dependent packages, run these commands with superuser privileges:

# sh
# for i in $(pkg query -g %n '*-emacs26*'); do \
nn=$(echo "$i" | sed -e 's/emacs26/emacs27/'); \
pkg set -yn "$i":"$nn"; \
done;
# pkg upgrade


so I tried doing that and nothing changed.
 
Ok so what's the difference between stable and release? Why would release be better to run than stable?

I'll see if pkg offers emacs-devel and try installing that.

Just FYI, I did deinstall emacs-nox and reinstalled it but that didn't work either.
 
Ah, STABLE. Could it be the problem? You should run a RELEASE, not STABLE.
Where did you get that from?

Ok so what's the difference between stable and release?
-RELEASE only gets security updates.
-STABLE gets security updates and and new features.

Switching to ports' latest branch may fix your problem. There's one ports tree. It's same for all FreeBSD versions. You can switch between different port branches. The default is quarterly branch. You can switch to latest branch to get latest ports and/or to fix potential problems with ports:

Create FreeBSD.conf file in this path
/usr/local/etc/pkg/repos/FreeBSD.conf

>>> To get ports from quarterly branch (default):

/usr/local/etc/pkg/repos/FreeBSD.conf
Code:
FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", enabled: yes }

pkg update

>>> To get ports from latest branch (latest update):

/usr/local/etc/pkg/repos/FreeBSD.conf
Code:
FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",    mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", enabled: yes }

pkg update
 
Ok so what's the difference between stable and release? Why would release be better to run than stable?
STFW/DYOR in chronological order:

SRC: Release and Stable, stable/* and releng/*

Ports: FreeBSD ports system is not Linux packaging system

SRC: -STABLE, -RELENG and -RELEASE

Ports: Latest and Quarterly
 
Where did you get that from?


-RELEASE only gets security updates.
-STABLE gets security updates and and new features.

Switching to ports' latest branch may fix your problem. There's one ports tree. It's same for all FreeBSD versions. You can switch between different port branches. The default is quarterly branch. You can switch to latest branch to get latest ports and/or to fix potential problems with ports:

Create FreeBSD.conf file in this path
/usr/local/etc/pkg/repos/FreeBSD.conf

>>> To get ports from quarterly branch (default):

/usr/local/etc/pkg/repos/FreeBSD.conf
Code:
FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", enabled: yes }

pkg update

>>> To get ports from latest branch (latest update):

/usr/local/etc/pkg/repos/FreeBSD.conf
Code:
FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",    mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", enabled: yes }

pkg update

First off, thanks for the help. I tried both and neither worked, I still get the same error message when I try to use emacs.

Also, thanks for the info on stable/release....I think I'll stick with stable. I've been running it for years without issue. (prior to this of course)

Any other ideas I can try?
 
First off, thanks for the help. I tried both and neither worked, I still get the same error message when I try to use emacs.
Generally these problems is going to solved with next update. It could be due to the bug, wrong/missing/old library, etc. Hard to debug and trace-back. In this situation I tend to wait till next update. If you have time and prefer to investigate this problem, take a look at ld-elf.so.1(1) and ldd(1).
I think I'll stick with stable. I've been running it for years without issue.
That's great. If you're not on a production server, staying on -STABLE is best approach.
 
Maybe you got bit by this:

What does pkg info | grep emacs report?

I install the "nox" version because I'm running a bare bones (no gui) box I use for some basic monitoring and something I can remote into for accessing my switches (this BSD box has an interface on a client subnet which I can access from VPN and another on my management subnet which allows me ssh access to my switches)

pkg info | grep emacs
emacs-nox-27.1,3 GNU editing macros (No X flavor)
 
Generally these problems is going to solved with next update. It could be due to the bug, wrong/missing/old library, etc. Hard to debug and trace-back. In this situation I tend to wait till next update. If you have time and prefer to investigate this problem, take a look at ld-elf.so.1(1) and ldd(1).

That's great. If you're not on a production server, staying on -STABLE is best approach.

One of my coworkers is the reason I'm running FreeBSD instead of Linux. He's been running Free/OpenBSD for decades and has forgotten more about BSD than I'll ever know (all the rest of our admins are linux guys). I would have asked him but he's on vacation. He is back next week so I'm going to bug him as soon as he has a minute.

So here's something weird I noticed today. I use MobaXterm from my windows PC at home to connect to my FreeBSD box. If I'm correct, putty is the ssh client built into MobaXterm. In any case, if I connect with my user acccount (always) and try to run emacs, it locks up and I have to kill the session. If I su up to root from my user account and run emacs, I get the same error message, but it doesn't lock up. Weird.

Once I get a chance to get my coworkers help, if he can fix it, I'll post back in this thread what he did to make it work.
 
This seems related to


Which may suggest that emacs was build with a more recent version of 12-STABLE than what you have to run it.

Currently on 12-RELEASE there is no fflush_unlocked in stdio.h

So I guess that the fixes would be to update to a revision after the related MFC
 
So my friend is back from vacation and I sent him a link to this thread and told him about my issue. He upgraded my kernel and emacs now works properly.

Here's what he upgraded me to:

FreeBSD 12.2-PRERELEASE FreeBSD 12.2-PRERELEASE r365008 GENERIC amd64
 
Back
Top