Subject: bug#63365: 30.0.50; GCC 13.1 breaks building Emacs with native-compilation

From: Eli Zaretskii <[email-masked]>
Date: Fri, 26 May 2023 16:42:13 +0300

> From: Arash Esbati <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Fri, 26 May 2023 15:05:01 +0200
> 
>   '../src/emacs.exe' -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 obsolete/vip.el
> 
>   Backtrace:
>   00007ff6ae7fa12e
>   00007ff6ae6c8be1
>   [...]
>   00007ff6ae75e9aa
>   ...
>   make[3]: *** [Makefile:328: obsolete/vip.elc] Error 3
> 
> So I followed your advice and did:
> 
>   • cd src/
>   • gdb ./emacs.exe
>   • (gdb) cd ../lisp
>   • (gdb) run -batch --no-site-file --no-site-lisp ... (as above)
> 
> which returns (line breaks added manually again):
> 
>   Starting program: z:\path\to\emacs-build-test\src\emacs.exe \
>   -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 obsolete/vip.el
>   [New Thread 37728.0x6048]
>   [New Thread 37728.0x73cc]
>   [New Thread 37728.0x5e20]
>   [New Thread 37728.0x84c8]
>   [Thread 37728.0x84c8 exited with code 0]
>   [Thread 37728.0x6048 exited with code 0]
>   [Thread 37728.0x5e20 exited with code 0]
>   [Thread 37728.0x73cc exited with code 0]
>   [Inferior 1 (process 37728) exited normally]
> 
> Does this make sense?  It seems that under GDB, it works fine and it
> breaks during the normal compilation.

Yes, it's unfortunate.

So now converting the addresses from emacs_backtrace.txt manually is
the only way forward, it seems.