C Problem compiling emacs 27.2 on FreeBSD 14.0

gmake[2]: Leaving directory '/usr/opt/emacs-27.2/src/admin/unidata'
CCLD temacs
/usr/local/bin/ld: alloc.o: in function `Fmemory_info':
/usr/opt/emacs-27.2/src/src/alloc.c:7036: undefined reference to `sysinfo'
collect2: error: ld returned 1 exit status
gmake[1]: *** [Makefile:655: temacs] Error 1
gmake[1]: Leaving directory '/usr/opt/emacs-27.2/src/src'
gmake: *** [Makefile:424: src] Error 2

but I never had this problem with previous FreeBSD releases.

Any idea?

BTW:

env LD_LIBRARY_PATH=/usr/local/lib gmake

does not help.
 
Can you post a more complete sequence of what you did?

git archive emacs-27.2 -o ~/emacs-27.2/src/emacs272.tar


Then unpacked it in ~/emacs-27.2/src and run there sh autogen.sh and


./configure --prefix=~/emacs-27.2 --without-all --with-x-toolkit=no


then the gmake that lead to the error.

All under a user that is not root, but in wheel.

With older versions of FreeBSD were no porblem. Of course, I never tried it in FreeBSD 13.X, and I am lucky that I
did not try before FreeBSD 14 was there.
 
You presumably have pkg "sysinfo" installed, which installs a header file and a library. Your emacs configure script then says "sysinfo is present" because it sees the header file - but it has no clue that it needs to link the library.

That's a bit iffy. The configure script should try to compile a full executable with linking for the test.
 
Not related, but... emacs 29.3 is already available for FreeBSD and has significant changes, so why not build that?
I did not make gmake clean, here is the old result:

# gmake
gmake -f Makefile
gmake[1]: Entering directory '/usr/opt/emacs-29.3/BUILD'
gmake[2]: *** No rule to make target 'echo-sources'. Stop.
gmake actual-all || gmake advice-on-failure make-target=all exit-status=$?
gmake[2]: Entering directory '/usr/opt/emacs-29.3/BUILD'
gmake -f Makefile actual-all
gmake[3]: Entering directory '/usr/opt/emacs-29.3/BUILD'
gmake[4]: *** No rule to make target 'echo-sources'. Stop.
gmake -C lib all
gmake[4]: Entering directory '/usr/opt/emacs-29.3/BUILD/lib'
gmake[4]: *** No rule to make target 'all'. Stop.
gmake[4]: Leaving directory '/usr/opt/emacs-29.3/BUILD/lib'
gmake[3]: *** [Makefile:533: lib] Error 2
gmake[3]: Leaving directory '/usr/opt/emacs-29.3/BUILD'
gmake[2]: *** [makefile:6: actual-all] Error 2
gmake[2]: Leaving directory '/usr/opt/emacs-29.3/BUILD'
gmake[2]: Entering directory '/usr/opt/emacs-29.3/BUILD'
gmake -f Makefile advice-on-failure
gmake[3]: Entering directory '/usr/opt/emacs-29.3/BUILD'
gmake[4]: *** No rule to make target 'echo-sources'. Stop.
***
*** "make all" failed with exit status 2.
***
*** You could try to:
*** - run "make bootstrap", which might fix the problem
*** - run "make V=1", which displays the full commands invoked by make,
*** to further investigate the problem
***
gmake[3]: *** [Makefile:414: advice-on-failure] Error 2
gmake[3]: Leaving directory '/usr/opt/emacs-29.3/BUILD'
gmake[2]: *** [makefile:6: advice-on-failure] Error 2
gmake[2]: Leaving directory '/usr/opt/emacs-29.3/BUILD'
gmake[1]: *** [Makefile:370: all] Error 2
gmake[1]: Leaving directory '/usr/opt/emacs-29.3/BUILD'
gmake: *** [makefile:4: all] Error 2

Configure as before:

/usr/opt/emacs-29.3/src/configure \
--prefix=/usr/opt/emacs-29.3 \
--without-all --with-x-toolkit=no

But what I will win with 29.3?
 
But what I will win with 29.3?

I provided list of new features although it's up to you if they offer anything worthwhile. It's around four years newer.

Personally, I only just recently started emacs on a daily basis and wanted to use the latest version. Interestingly, I discovered why FreeBSD is so much better than Linux as I tried to duplicate my environment on various Linux distros and found that the latest versions weren't yet available on some. On others, I needed to upgrade the OS version to use the latest emacs version. It was a real pain.
 
Personally, I only just recently started emacs on a daily basis and wanted to use the latest version.
I use emacs since version 18. The only thing that is a real innovation for me is the support UTF-8 at some point.
I use Escape Meta Alt Control Shift (emacs) exactly as before.
Every upgrade is a headache with the configuration for eliminating new "features" (bloat).
 
I use emacs since version 18. The only thing that is a real innovation for me is the support UTF-8 at some point.
I use Escape Meta Alt Control Shift (emacs) exactly as before.
Every upgrade is a headache with the configuration for eliminating new "features" (bloat).

Upgrades can be a headache and usually are.

I'm quite a novice, but was surprised that there is a newer way to define keybindings in 29, which won't work with older versions. The old way still works, but I was not aware of the change initially.
 
but was surprised that there is a newer way to define keybindings in 29,
A real improvement?

They could have fixed long ago the emacs-lisp and made it a real lisp,
a real win, but that would have been a lot of hard and delicate work.

In any case, I need an editor that do not spoil my files,
and since, together with vi, emacs is one of the most used editors by developers,
I suppose it is reliable.

Today I use it mostly because I am used, perhaps I would prefer vi.
I would use sam, better than vi, but, as a plan9 program, it is more to be used with the mouse,
and I do not like the background colour. And for FreeBSD, we have only the plan9 port,
I am not sure if it is reliable.

For editing very large files, ed, lex, and C were more usable in my case.
 
Back
Top