emacs-next: emacs-29.1 fails to native-compile libraries, giving a runtime error that ctri.o and other files can't be found

  • Done
  • quality assurance status badge
Details
3 participants
  • Adam Porter
  • Josselin Poiret
  • Simon Tournier
Owner
unassigned
Submitted by
Adam Porter
Severity
normal
A
A
Adam Porter wrote on 1 Aug 2023 20:00
(address . bug-guix@gnu.org)
2efcc46a-7c08-01d8-8a65-01f7fcdc0729@alphapapa.net
Hi,

Since Emacs 29.1 was just released, I tried to install it with:

guix install emacs-next --with-commit=emacs-next=emacs-29.1

This builds and installs without error, and it runs, but when Emacs
tries to native-compile Elisp libraries at startup, I get these errors
in the "*Warnings*" buffer:

#+begin_example
? Error (use-package): magit/:catch: Native compiler error: (lambda
(&rest arg158) (let ((f #'make-process)) (apply f arg158))), "Compiling
/home/me/src/emacs/configs/ap.el/eln-cache/29.1-d107c3ce/subr--trampoline-6d616b652d70726f63657373_make_process_0.eln...
guile: warning: failed to install locale
ld: cannot find crti.o: No such file or directory
ld: cannot find crtbeginS.o: No such file or directory
ld: cannot find -lgcc: No such file or directory
ld: cannot find -lgcc: No such file or directory
libgccjit.so: error: error invoking gcc driver
Internal native compiler error: \"failed to compile\",
\"/home/me/src/emacs/configs/ap.el/eln-cache/29.1-d107c3ce/subr--trampoline-6d616b652d70726f63657373_make_process_0.eln\",
\"error invoking gcc driver\"

Error: native-ice (\"failed to compile\"
\"/home/me/src/emacs/configs/ap.el/eln-cache/29.1-d107c3ce/subr--trampoline-6d616b652d70726f63657373_make_process_0.eln\"
\"error invoking gcc driver\")
mapbacktrace(#f(compiled-function (evald func args flags) #<bytecode
-0x19aef44846510ebe>))
debug-early-backtrace()
debug-early(error (native-ice \"failed to compile\"
\"/home/me/src/emacs/configs/ap.el/eln-cache/29.1-d107c3ce/subr--trampoline-6d616b652d70726f63657373_make_process_0.eln\"
\"error invoking gcc driver\"))
comp--compile-ctxt-to-file(\"/home/me/src/emacs/configs/ap.el/eln-cache/29.1-d107c3ce/subr--trampoline-6d616b652d70726f63657373_make_process_0.eln\")
comp-compile-ctxt-to-file(\"/home/me/src/emacs/configs/ap.el/eln-cache/29.1-d107c3ce/subr--trampoline-6d616b652d70726f63657373_make_process_0.eln\")
comp-final1()
load-with-code-conversion(\"/tmp/emacs-int-comp-subr--trampoline-6d616b652d70726f63657373_make_process_0-eF2T4W.el\"
\"/tmp/emacs-int-comp-subr--trampoline-6d616b652d70726f63657373_make_process_0-eF2T4W.el\"
nil t)
command-line-1((\"-l\"
\"/tmp/emacs-int-comp-subr--trampoline-6d616b652d70726f63657373_make_process_0-eF2T4W.el\"))
command-line()
normal-top-level()
"
#+end_example

I also have the "emacs" package installed at 28.2, which works
flawlessly with native compilation. I wonder if something changed in
emacs.git since the 29.0.92 tag that requires a change to the Guix
package definition in order to work.

Thanks for your work on Guix.
A
A
Adam Porter wrote on 2 Aug 2023 00:37
Re: bug#64999: Acknowledgement (emacs-next: emacs-29.1 fails to native-compile libraries, giving a runtime error that ctri.o and other files can't be found)
(address . 64999@debbugs.gnu.org)
2c7fd0d0-0682-5984-8e09-67088ef6c94f@alphapapa.net
FYI, I hacked together a new package definition, updating the emacs-next
one to build 29.1 from the release tarball, and after installing it,
everything seems to work, including native compilation.

I don't know enough about Guix to understand why using "guix install"
with the package transformation option caused the runtime problem with
gcc, but everything does seem to work with the updated definition.

So I guess this report can be closed.

OTOH, if anyone knows why the transformation option failed in that way,
it might be helpful to solve it if possible, so users could use the
option to install future releases without having to modify the package
definition. (AFAIK, I was able to do that for various Emacs 28 versions
without this problem, so I wonder if something's changed.)

J
J
Josselin Poiret wrote on 6 Aug 2023 10:10
87pm40egm5.fsf@jpoiret.xyz
Hi Adam,

Adam Porter <adam@alphapapa.net> writes:

Toggle quote (6 lines)
> OTOH, if anyone knows why the transformation option failed in that way,
> it might be helpful to solve it if possible, so users could use the
> option to install future releases without having to modify the package
> definition. (AFAIK, I was able to do that for various Emacs 28 versions
> without this problem, so I wonder if something's changed.)

It's probably because emacs is missing the
emacs-native-comp-driver-options.patch patch of emacs-next. Package
transformations can't and won't replace the manual work of packaging new
versions, so I think it is unreasonable to expect emacs 28's package
definition to work with emacs 29.

Best,
--
Josselin Poiret
-----BEGIN PGP SIGNATURE-----

iQHEBAEBCgAuFiEEOSSM2EHGPMM23K8vUF5AuRYXGooFAmTPVWIQHGRldkBqcG9p
cmV0Lnh5egAKCRBQXkC5FhcairwBDACQj1yNwNhn4jWarkmyGMHsfVNSjvxvj6MO
6E4TvZie8icRG6O9iRMtECkH8lxrd2DzVi/fb72ITbUjLTqm3LYEYtymFsroAgIJ
6VXNeGmmtKwoyMlKfV+dptTKgLOdoiA4ek6BzWmEIU0XxMe2CwlIaziRaPLRaiDT
B31JQSumiSbRhk0HCfnBHLrGqpYicrqxx3Kw4ANjJY+CCuvDRavr7ncpfSksLq9F
0FsaO7OeWQklvqZjia5ADTtVSoDpUXdjDWa7BZ3MGKYW5P3HeyhE2GLE+RzjKsr8
vrDHwhgR361/g5sDeh4vTWPdzvKhq1gT3ipu4LtEKdlyctz06NcS57HmqAQn5CyK
NusbHPGz5OUbZIu4iBPfc+uYCdV1ELLpxeRGpnv8vZeA9+nL9Y6xjqw9+gPFl7VT
uAO2e2lUgnAegz1abEOntCQ3cSYctvskU9iQY1q4pWx6aLqDmgEBYPik+77nB40a
vhuyiShI7GHY0IsnA1Usy0HrZkfera0=
=gQuH
-----END PGP SIGNATURE-----

S
S
Simon Tournier wrote on 23 Aug 2023 18:26
868ra1209u.fsf@gmail.com
Hi,

On Tue, 01 Aug 2023 at 17:37, Adam Porter <adam@alphapapa.net> wrote:

Toggle quote (4 lines)
> I don't know enough about Guix to understand why using "guix install"
> with the package transformation option caused the runtime problem with
> gcc, but everything does seem to work with the updated definition.

See Josselin’s explanations. :-)

Toggle quote (2 lines)
> So I guess this report can be closed.

I am closing. And you could also do it just by appending -done in the
bug email address; here 64999-done@debbugs.gny.org.


Cheers,
simon
Closed
?