Bug 288303 - editors/emacs: Fails to build with GCC 14: error: passing argument 5 of 'count_char' from incompatible pointer type [-Wincompatible-pointer-types]
Summary: editors/emacs: Fails to build with GCC 14: error: passing argument 5 of 'coun...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: i386 Any
: --- Affects Only Me
Assignee: FreeBSD emacs Team (mail alias)
URL: https://pkg-status.freebsd.org/gohan0...
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-18 13:41 UTC by Lorenzo Salvadore
Modified: 2026-07-30 04:33 UTC (History)
5 users (show)

See Also:
bugzilla: maintainer-feedback? (emacs)


Attachments
Disable NATIVECOMP on i386 (924 bytes, patch)
2025-11-06 12:59 UTC, Lorenzo Salvadore
salvadore: maintainer-approval? (emacs)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Salvadore freebsd_committer freebsd_triage 2025-07-18 13:41:26 UTC
Build fails with GCC 14. This blocks GCC_DEFAULT update to GCC 14.

gcc14 -c -isystem /usr/local/include -Demacs  -I. -I. -I../lib -I../lib   -I/usr/local/include -I/usr/local/include/gtk-3.0 -I/usr/local/include/pango-1.0 -I/usr/local/include -I/usr/local/include/cairo -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/at-spi2-atk/2.0 -I/usr/local/include/at-spi-2.0 -I/usr/local/include/atk-1.0 -I/usr/local/libdata/pkgconfig/../../include/dbus-1.0 -I/usr/local/libdata/pkgconfig/../../lib/dbus-1.0/include -I/usr/local/include/libepoll-shim -I/usr/local/include/fribidi -D_THREAD_SAFE -I/usr/local/include/pixman-1 -I/usr/local/include/harfbuzz -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include/gio-unix-2.0 -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include   -I/usr/local/include/librsvg-2.0 -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/cairo -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include/pango-1.0 -I/usr/local/include/fribidi -D_THREAD_SAFE -I/usr/local/include/pixman-1 -I/usr/local/include/harfbuzz -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include  -I/usr/local/include/libpng16 -I/usr/local/include/libxml2  -I/usr/local/libdata/pkgconfig/../../include/dbus-1.0 -I/usr/local/libdata/pkgconfig/../../lib/dbus-1.0/include -I/usr/local/include -D_THREAD_SAFE -I/usr/local/include -D_THREAD_SAFE -I/usr/local/include -D_THREAD_SAFE  -I/usr/local/include -D_THREAD_SAFE -I/usr/local/include -I/usr/local/include/webp  -I/usr/local/include -I/usr/local/include -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include/harfbuzz -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include   -MMD -MF deps/canna.d -MP   -I/usr/local/include -I/usr/local/include -I/usr/local/include/p11-kit-1  -I/usr/local/include/cairo -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -D_THREAD_SAFE -I/usr/local/include/pixman-1              -O2 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc14 -isystem /usr/local/include -fno-strict-aliasing   canna.c
canna.c: In function 'storeResults':
canna.c:279:20: error: passing argument 5 of 'count_char' from incompatible pointer type [-Wincompatible-pointer-types]
  279 |                    &canna_henkan_length, &canna_henkan_revPos,
canna.c:214:39: note: expected 'EMACS_INT *' {aka 'int *'} but argument is of type 'intmax_t *' {aka 'long long int *'}
  214 |                        int, int, int, EMACS_INT *, EMACS_INT *, EMACS_INT *);
      |                                       ^~~~~~~~~~~
canna.c:279:42: error: passing argument 6 of 'count_char' from incompatible pointer type [-Wincompatible-pointer-types]
  279 |                    &canna_henkan_length, &canna_henkan_revPos,
canna.c:214:52: note: expected 'EMACS_INT *' {aka 'int *'} but argument is of type 'intmax_t *' {aka 'long long int *'}
  214 |                        int, int, int, EMACS_INT *, EMACS_INT *, EMACS_INT *);
      |                                                    ^~~~~~~~~~~
canna.c:280:20: error: passing argument 7 of 'count_char' from incompatible pointer type [-Wincompatible-pointer-types]
  280 |                    &canna_henkan_revLen);
canna.c:214:65: note: expected 'EMACS_INT *' {aka 'int *'} but argument is of type 'intmax_t *' {aka 'long long int *'}
  214 |                        int, int, int, EMACS_INT *, EMACS_INT *, EMACS_INT *);
      |                                                                 ^~~~~~~~~~~
canna.c:289:54: error: passing argument 5 of 'count_char' from incompatible pointer type [-Wincompatible-pointer-types]
  289 |                  ks->gline.revPos, ks->gline.revLen, &canna_ichiran_length,
canna.c:214:39: note: expected 'EMACS_INT *' {aka 'int *'} but argument is of type 'intmax_t *' {aka 'long long int *'}
  214 |                        int, int, int, EMACS_INT *, EMACS_INT *, EMACS_INT *);
      |                                       ^~~~~~~~~~~
canna.c:290:18: error: passing argument 6 of 'count_char' from incompatible pointer type [-Wincompatible-pointer-types]
  290 |                  &canna_ichiran_revPos, &canna_ichiran_revLen);
canna.c:214:52: note: expected 'EMACS_INT *' {aka 'int *'} but argument is of type 'intmax_t *' {aka 'long long int *'}
  214 |                        int, int, int, EMACS_INT *, EMACS_INT *, EMACS_INT *);
      |                                                    ^~~~~~~~~~~
canna.c:290:41: error: passing argument 7 of 'count_char' from incompatible pointer type [-Wincompatible-pointer-types]
  290 |                  &canna_ichiran_revPos, &canna_ichiran_revLen);
canna.c:214:65: note: expected 'EMACS_INT *' {aka 'int *'} but argument is of type 'intmax_t *' {aka 'long long int *'}
  214 |                        int, int, int, EMACS_INT *, EMACS_INT *, EMACS_INT *);
      |                                                                 ^~~~~~~~~~~
gmake[2]: *** [Makefile:463: canna.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: Leaving directory '/wrkdirs/usr/ports/editors/emacs/work-canna/emacs-30.1/src'
gmake[1]: *** [Makefile:554: src] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/editors/emacs/work-canna/emacs-30.1'
gmake[1]: Entering directory '/wrkdirs/usr/ports/editors/emacs/work-canna/emacs-30.1'
***
*** "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[1]: *** [Makefile:418: advice-on-failure] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/editors/emacs/work-canna/emacs-30.1'
gmake: *** [Makefile:374: all] Error 2

Full log: https://pkg-status.freebsd.org/gohan05/data/135i386-default-foo/2025-07-17_20h45m44s/logs/errors/emacs-canna-30.1_5,3.log

Useful link: https://gcc.gnu.org/gcc-14/porting_to.html
Comment 1 Lorenzo Salvadore freebsd_committer freebsd_triage 2025-07-18 13:49:15 UTC
Bug affects i386 only.
Comment 2 Gerald Pfeifer freebsd_committer freebsd_triage 2025-08-24 09:20:36 UTC
The port has been updated to Emacs 30.2 last week where release notes
talk about various platforms/compatibility issues.

It may be worth checking whether this issue is gone now.
Comment 3 Yasuhiro Kimura freebsd_committer freebsd_triage 2025-08-28 02:29:58 UTC
I tried building editors/emacs with following conditions.

Host: 14.3-RELEASE amd64
poudriere: 3.4.3
Jail: 14.3-RELEASE i386
Ports tree: ports baf31b124266 (main branch)
make.conf: "DEFAULT_VERSIONS+=gcc=14"

And it finished successfully as below.

https://people.freebsd.org/~yasu/poudriere/data/logs/bulk/143i386-default-emacs/2025-08-28_09h02m28s/logs/emacs-30.2,3.log

So it seems the problem is fixed with Emacs 30.2.
Comment 4 Yasuhiro Kimura freebsd_committer freebsd_triage 2025-08-29 02:30:31 UTC
I also tried building editors/emacs with following conditions.

Host: 15.0-PRERELEASE main-n279797-03221b189a48 amd64
poudriere: 3.4.3
Jail: Same as host
Ports tree: ports baf31b124266 (main branch)
make.conf: "DEFAULT_VERSIONS+=gcc=14"

And it failed with different error from comment #0 as below

Backtrace:
0x57f747 <emacs_backtrace+0x57> at /wrkdirs/usr/ports/editors/emacs/work-full/emacs-30.2/src/emacs
0x425c6d <terminate_due_to_signal+0x7e> at /wrkdirs/usr/ports/editors/emacs/work-full/emacs-30.2/src/emacs
0x42616d <deliver_thread_signal.constprop.0.cold> at /wrkdirs/usr/ports/editors/emacs/work-full/emacs-30.2/src/emacs
0x426174 <Fget_internal_run_time.cold> at /wrkdirs/usr/ports/editors/emacs/work-full/emacs-30.2/src/emacs
0x57d9ff <handle_sigsegv+0x3f> at /wrkdirs/usr/ports/editors/emacs/work-full/emacs-30.2/src/emacs
0x83cac880a <_pthread_sigmask+0x50a> at /lib/libthr.so.3
0x83cac7e0b <pthread_signals_unblock_np+0x5bb> at /lib/libthr.so.3
gmake[4]: *** [Makefile:445: isearchb.eln] Segmentation fault (core dumped)
gmake[4]: *** Waiting for unfinished jobs....
gmake[4]: Leaving directory '/wrkdirs/usr/ports/editors/emacs/work-full/emacs-30.2/lisp'
gmake[3]: *** [Makefile:457: compile-eln-aot] Error 2
gmake[3]: Leaving directory '/wrkdirs/usr/ports/editors/emacs/work-full/emacs-30.2/lisp'
gmake[2]: *** [Makefile:972: ../native-lisp] Error 2
gmake[2]: Leaving directory '/wrkdirs/usr/ports/editors/emacs/work-full/emacs-30.2/src'
gmake[1]: *** [Makefile:554: src] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/editors/emacs/work-full/emacs-30.2'
gmake[1]: Entering directory '/wrkdirs/usr/ports/editors/emacs/work-full/emacs-30.2'
***
*** "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[1]: *** [Makefile:418: advice-on-failure] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/editors/emacs/work-full/emacs-30.2'
gmake: *** [Makefile:374: all] Error 2
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Full build log:
https://people.freebsd.org/~yasu/poudriere/data/logs/bulk/curamd64-default-emacs/2025-08-29_11h13m05s/logs/emacs-30.2,3.log
Comment 5 Yasuhiro Kimura freebsd_committer freebsd_triage 2025-08-29 08:40:32 UTC
(In reply to Yasuhiro Kimura from comment #4)

Build with GCC 15 also fails with SEGV.

Just FYI.
Comment 6 Yasuhiro Kimura freebsd_committer freebsd_triage 2025-08-30 10:27:01 UTC
(In reply to Yasuhiro Kimura from comment #4)

I tried build with 14.3-RELEASE amd64 and 15.0-PRERELEASE i386 jails and it finished successfully with both of them. So the build error seems to happen only with 15.0-PRERELEASE amd64.
Comment 7 Lorenzo Salvadore freebsd_committer freebsd_triage 2025-09-30 13:32:28 UTC
This is the last PR to fix before GCC_DEFAULT can be updated to 14. Is there anything I can do to help here? Considering that the only platform affected seems to be i386 (which is a tier 2 platform) can USE_GCC=13 be used as a temporary solution?
Comment 8 Lorenzo Salvadore freebsd_committer freebsd_triage 2025-11-06 12:59:01 UTC
Created attachment 265205 [details]
Disable NATIVECOMP on i386

I have looked into this.

I have tested emacs with gcc14 on FreeBSD 13.5 i386 and FreeBSD 14.3 amd64:
- on FreeBSD 13.5 i386 build is successful as long as NATIVECOMP is disabled. Indeed, GCC ports do not come with jit on i386, which is necessary for NATIVCOMP. I attach a patch to exclude the option;
- the build is successful on FreeBSD 14.3 amd64.

I still have to test a FreeBSD 15 version, I need to update my machine first. I would have ignored a CURRENT version normally and proceeded with the GCC_DEFAULT update directly (especially since we are very late), but since the first 15 RELEASE is close, I think checking it works correctly is wiser.
Comment 9 Joseph Mingrone freebsd_committer freebsd_triage 2025-11-06 15:38:54 UTC
I tested in a 15amd64 jail (a bit old, from July) and the build failed with a similar error to what yasu encountered.

0x57d9ff <handle_sigsegv+0x3f> at /wrkdirs/usr/ports/editors/emacs/work-full/emacs-30.2/src/emacs
0x83cac880a <_pthread_sigmask+0x50a> at /lib/libthr.so.3
0x83cac7e0b <pthread_signals_unblock_np+0x5bb> at /lib/libthr.so.3
gmake[4]: *** [Makefile:445: isearchb.eln] Segmentation fault (core dumped)

Full log: https://pkg.ftfl.ca/data/15amd64-default/2025-11-06_10h20m04s/logs/errors/emacs-30.2,3.log
Comment 10 Lorenzo Salvadore freebsd_committer freebsd_triage 2025-12-06 14:03:08 UTC
(In reply to Joseph Mingrone from comment #9)

I am still unable to look into this thoroughly. I am going to set USE_GCC=13 for now so that we can finally set GCC_DEFAULT=14 and start an exp-run for GCC_DEFAULT=15 (GCC 15 has been released for a while now).

Could you please test if the same bug affects emacs-devel too?

If you prefer, you can set USE_GCC=13 dependent on the FreeBSD version (we saw that emacs builds fine on FreeBSD 14 with GCC 14), but if I commit the change I am going to keep it simple setting USE_GCC=13 for all versions, as I have not tested all versions thoroughly.

As for the patch I have attached about disabling NATIVECOMP on i386, I am not going to commit it yet. The port still builds fine with lang/gcc13 and the patch won't be needed until it switches to lang/gcc14.
A similar update will be needed for emacs-devel.
Comment 11 Joseph Mingrone freebsd_committer freebsd_triage 2025-12-06 16:53:05 UTC
I'll spend some time looking into this today.  More to come.
Comment 12 Lorenzo Salvadore freebsd_committer freebsd_triage 2025-12-14 11:44:15 UTC
(In reply to Joseph Mingrone from comment #11)

Friendly ping

Could someone please test if emacs-devel builds fine on current with GCC 14?

If nobody can test it (I am still unable to do it myself, sorry), then I am going to set USE_GCC=13 for both emacs and emacs-devel in the next few days, so that we can safely finally upgrade GCC_DEFAULT to 14.
Comment 13 Joseph Mingrone freebsd_committer freebsd_triage 2025-12-14 18:19:54 UTC
Sorry for the delay.  I tested editors/emacs-devel on CURRENT/main with GCC 14.  It also failed to build with a segmentation fault.

'../src/emacs' -batch --no-site-file --no-site-lisp --eval "(setq load-prefer-newer t byte-compile-warnings 'all)" --eval "(setq org--inhibit-version-check t)"  \
-l comp -f batch-byte+native-compile informat.el
Backtrace:
0x536b07 <emacs_backtrace+0x57> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x420dbf <terminate_due_to_signal+0x7e> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x4212ca <deliver_thread_signal.constprop.0.cold> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x4212d1 <Fget_internal_run_time.cold> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x534dff <handle_sigsegv+0x3f> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x83450b82a <_pthread_sigmask+0x50a> at /lib/libthr.so.3
0x83450ae2b <pthread_signals_unblock_np+0x5bb> at /lib/libthr.so.3
0x8215882d3 <__vdso_sigcode+0x3> at [vdso]
0x839fb10a0 <gcc_jit_block_end_with_switch+0x15d40> at /usr/local/lib/gcc14/libgccjit.so.0
0x839f9ff99 <gcc_jit_block_end_with_switch+0x4c39> at /usr/local/lib/gcc14/libgccjit.so.0
0x839f90969 <gcc_jit_context_release+0xa9> at /usr/local/lib/gcc14/libgccjit.so.0
0x5f6f15 <Fcomp__release_ctxt+0x15> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x5aab4f <Ffuncall+0x10f> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x5f6bf7 <bcall0+0x27> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x5a71c2 <unbind_to+0x142> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x8919efb7d <F636f6d702d2d66696e616c31_comp__final1_0+0xad> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/native-lisp/31.0.50-fd037996/comp-7672a6ed-c56d3c67.eln
0x5aab4f <Ffuncall+0x10f> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x8919efda9 <F636f6d702d2d66696e616c_comp__final_0+0xa9> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/native-lisp/31.0.50-fd037996/comp-7672a6ed-c56d3c67.eln
0x5aab4f <Ffuncall+0x10f> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x8919f2404 <F636f6d702d2d6e61746976652d636f6d70696c65_comp__native_compile_0+0x754> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/native-lisp/31.0.50-fd037996/comp-7672a6ed-c56d3c67.eln
0x5aab4f <Ffuncall+0x10f> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x8919f32a3 <F62617463682d6e61746976652d636f6d70696c65_batch_native_compile_0+0x1a3> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/native-lisp/31.0.50-fd037996/comp-7672a6ed-c56d3c67.eln
0x5aab4f <Ffuncall+0x10f> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x8919f3651 <F62617463682d627974652b6e61746976652d636f6d70696c65_batch_bytenative_compile_0+0x151> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/native-lisp/31.0.50-fd037996/comp-7672a6ed-c56d3c67.eln
0x5aab4f <Ffuncall+0x10f> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x8857028d5 <F636f6d6d616e642d6c696e652d31_command_line_1_0+0xd65> at ../src/../native-lisp/31.0.50-fd037996/preloaded/startup-bbc6ea72-2b6dbf5f.eln
0x5aab4f <Ffuncall+0x10f> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x8856f912c <F636f6d6d616e642d6c696e65_command_line_0+0x138c> at ../src/../native-lisp/31.0.50-fd037996/preloaded/startup-bbc6ea72-2b6dbf5f.eln
0x5aab4f <Ffuncall+0x10f> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x8856f5019 <F6e6f726d616c2d746f702d6c6576656c_normal_top_level_0+0xf69> at ../src/../native-lisp/31.0.50-fd037996/preloaded/startup-bbc6ea72-2b6dbf5f.eln
0x5a98dd <eval_sub+0x90d> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x5aa060 <Feval+0x40> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x514663 <top_level_2+0x53> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x5a5de6 <internal_condition_case+0x66> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x515072 <top_level_1+0x22> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x5a5d3f <internal_catch+0x3f> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x51457b <command_loop+0x7b> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x51c5a4 <recursive_edit_1+0x94> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x51c926 <Frecursive_edit+0xd6> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
0x429d73 <main+0x1f13> at /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-ef903e0f5ac/src/emacs
'../src/emacs' -batch --no-site-file --no-site-lisp --eval "(setq load-prefer-newer t byte-compile-warnings 'all)" --eval "(setq org--inhibit-version-check t)"  \
-l comp -f batch-byte+native-compile isearchb.el
gmake[3]: *** [Makefile:331: ibuf-ext.elc] Segmentation fault (core dumped)
Comment 14 commit-hook freebsd_committer freebsd_triage 2025-12-21 18:01:34 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6b9daae5590abd2644dd2a96f53c376816226de5

commit 6b9daae5590abd2644dd2a96f53c376816226de5
Author:     Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2025-12-21 17:50:50 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2025-12-21 17:50:50 +0000

    editors/emacs: Pin to GCC 13

    Build fails on some FreeBSD versions with GCC 14, which is about to
    become GCC_DEFAULT. Pin to GCC 13 until the issue is fixed.

    PR:             288303
    Reported by:    yasu
    Tested by:      yasu, jrm

 editors/emacs/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 15 commit-hook freebsd_committer freebsd_triage 2025-12-21 18:01:35 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2e240088965295b3c9a1279051d41777f6bdebcf

commit 2e240088965295b3c9a1279051d41777f6bdebcf
Author:     Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2025-12-21 17:55:04 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2025-12-21 17:55:04 +0000

    editors/emacs-devel: Pin to GCC 13

    Build fails on some FreeBSD versions with GCC 14, which is about to
    become GCC_DEFAULT. Pin to GCC 13 until the issue is fixed.

    PR:             288303
    Tested by:      jrm

 editors/emacs-devel/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 16 Lorenzo Salvadore freebsd_committer freebsd_triage 2025-12-21 18:05:14 UTC
This does not block GCC_DEFAULT (PR 281091) update anymore.
Comment 17 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2026-03-22 16:28:28 UTC
I am closing this bug because salvadore@ committed a workaround pinning editors/emacs and editors/emacs-devel to GCC 13 (USE_GCC=13), unblocking the GCC_DEFAULT=14 transition. The original i386 canna.c issue was fixed in Emacs 30.2. The remaining libgccjit segfault on FreeBSD 15 with GCC 14 is an upstream issue that does not block the port.
Comment 18 Joseph Mingrone freebsd_committer freebsd_triage 2026-07-30 04:33:06 UTC
The problem started when gcc14 switched to using posix_spawn to launch the assembler.  After src 2767a1f3686e (MFCed to stable/15 in 10ed74b1b94e), Emacs builds with gcc14.  We'll have to keep gcc=13 in the port until 15.1 goes EoL.