unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Pierre Neidhardt <mail@ambrevar.xyz>
To: zimoun <zimon.toutoune@gmail.com>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: emacs-guix invalid byte opcode: op=183 ptr=25
Date: Thu, 28 Feb 2019 14:28:25 +0100	[thread overview]
Message-ID: <878sy0qbye.fsf@ambrevar.xyz> (raw)
In-Reply-To: <CAJ3okZ2CC5c__BC6Tbz858wrrWvXXZgHf_DZfK6O=e2AdbWMuw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1288 bytes --]

Zimoun, you are correct, Guix Emacs packages will only work with the Emacs that
is used in the build system, which corresponds to the `emacs` package.

With Guix, Emacs packages don't have Emacs as an input, so it's perfectly possible to
install Emacs packages along the wrong version of Emacs.  I think this is a problem.

The problem is not specific to Emacs though,  anything that is byte-compiled has
the same shortcoming.  Some build systems have a variable for the compiler, so
it's easy to change it and recompile all packages for a new compiler.  The
emacs-build-system does not do that though, see emacs-build-system.scm:

--8<---------------cut here---------------start------------->8---
(define* (build #:key outputs inputs #:allow-other-keys)
  "Compile .el files."
  (let* ((emacs (string-append (assoc-ref inputs "emacs") "/bin/emacs"))
         (out (assoc-ref outputs "out"))
         (elpa-name-ver (store-directory->elpa-name-version out))
         (el-dir (string-append out %install-suffix "/" elpa-name-ver)))
    (setenv "SHELL" "sh")
    (parameterize ((%emacs emacs))
      (emacs-byte-compile-directory el-dir))))
--8<---------------cut here---------------end--------------->8---

Thoughts?

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  reply	other threads:[~2019-02-28 13:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28 10:28 emacs-guix invalid byte opcode: op=183 ptr=25 Yoshinori Arai
2019-02-28 10:37 ` Pierre Neidhardt
2019-02-28 12:26   ` zimoun
2019-02-28 13:28     ` Pierre Neidhardt [this message]
2019-02-28 14:47     ` emacs byte-compiled packages incompatibilities (was Re: emacs-guix invalid byte opcode: op=183 ptr=25) Giovanni Biscuolo
2019-02-28 15:11       ` Pierre Neidhardt
2019-02-28 19:03     ` emacs-guix invalid byte opcode: op=183 ptr=25 Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878sy0qbye.fsf@ambrevar.xyz \
    --to=mail@ambrevar.xyz \
    --cc=help-guix@gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).