NoisyFrequency · 2022-07-29 13:24
I know this is tangential to Emacs but it probably will affect other Emacs users so I though it'd be alright to post it here.
I usually build Emacs from source every so often, I tried today after pulling and got a strange issue during the `make` process.
I'll spare you the super long macro unraveling but I got this issue:
Loading macroexp.elc...
Internal native compiler error: "../../lisp/international/titdic-cnv.el", "failing to compile function", #<symbol titdic-
convert at 16545>, "gcc_jit_context_new_call_through_ptr: not enough arguments to fn_ptr: freloc-
>R6e6172726f772d746f2d726567696f6e_narrow_to_region_0 (got 2 args, expected 3)"
and several similar issues related to `gcc_jit_context_new_call_through_ptr` not receiving the proper number of arguments.
This happened with:
- Emacs pulled today (July 29th 2022)
- libgccjit 12.1.0-3 (on Manjaro Linux, installed with `sudo pacman -S libgccjit`)
- gcc 12.1.0-3 (on Manjaro Linux, installed with the package manager as well)
Since I'm not seeing posts everywhere of people failing to build from source, I expect this is an issue with `libgccjit`.
Can anyone replicate this behavior and has any tips to fix it?
Thanks for the help.
mtk000 · 2022-07-29 18:51
i saw it. but a "git clean -dfx; git pull; ./autogen.sh; ./configure --with-native-compilation; make install" made it go away.
cradlemann · 2022-07-29 19:45
I had the same experience in Arch Linux. After this [post](https://www.reddit.com/r/emacs/comments/warqvg/emacs_29_seems_significantly_better_at_handling/) I tried to switch from `emacs-gcc-wayland-devel-bin` to `emacs-nativecomp-git` and it failed with the same error
NoisyFrequency · 2022-07-29 20:35
Alright, for some reason it did the trick though I don't understand how removing untracked files was messing with function definition like that in `libgccjit`. I had to do a couple more steps to be sure everything was cleaned up beforehand.
cd emacs/ # your source folder
sudo make uninstall
sudo make distclean
./autogen.sh
./configure --with-native-compilation --with-pgtk # use pure GTK as well
make -j12 # parallel make
make install # I do sudo make install because of some permissions missing on some folders tho
mtk000 · 2022-07-30 11:16
"git clean -dfx" should strip things down to just a copy of the main repo. "make uninstall" and "make distclean" should not remove anything at that point. or maybe someone published some cruft in the repo?
NoisyFrequency · 2022-07-30 11:20
Honestly no clue. I used `uninstall` and `distclean` to remove older files I had around that I wasn't sure were being an issue or not.