all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Byte-compiled elisp libraries on different platforms
@ 2008-11-20 10:47 Jonathan Groll
  2008-11-20 11:02 ` Juanma Barranquero
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Jonathan Groll @ 2008-11-20 10:47 UTC (permalink / raw)
  To: GnuEmacs Help

I keep my emacs configuration in a git repository. There are also some
elisp libaries (cedet/nxml/ etc etc) that are in that repository. Most
of these libaries have been byte compiled in GNU Emacs 22.

I'd like to be able to use this repository on multiple machines,
specifically:
Ubuntu Linux (x86) running GNU Emacs 23
OS X (intel) running Aquamacs - GNU Emacs 22
Opensolaris (sparc64) running GNU Emacs 22

Does platform matter for byte-compiled .elc's? What about GNU Emacs 22
vs 23?

Regards,
Jonathan




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Byte-compiled elisp libraries on different platforms
       [not found] <mailman.823.1227178080.26697.help-gnu-emacs@gnu.org>
@ 2008-11-20 10:55 ` Nordlöw
  2008-11-21  4:27 ` Tim X
  1 sibling, 0 replies; 11+ messages in thread
From: Nordlöw @ 2008-11-20 10:55 UTC (permalink / raw)
  To: help-gnu-emacs

On 20 Nov, 11:47, Jonathan Groll <li...@groll.co.za> wrote:
> I keep my emacs configuration in a git repository. There are also some
> elisp libaries (cedet/nxml/ etc etc) that are in that repository. Most
> of these libaries have been byte compiled in GNU Emacs 22.
>
> I'd like to be able to use this repository on multiple machines,
> specifically:
> Ubuntu Linux (x86) running GNU Emacs 23
> OS X (intel) running Aquamacs - GNU Emacs 22
> Opensolaris (sparc64) running GNU Emacs 22
>
> Does platform matter for byte-compiled .elc's? What about GNU Emacs 22
> vs 23?
>
> Regards,
> Jonathan

Platform doesn't matter. Major version (21, 22, 23, etc) does.

/Nordlöw


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Byte-compiled elisp libraries on different platforms
  2008-11-20 10:47 Byte-compiled elisp libraries on different platforms Jonathan Groll
@ 2008-11-20 11:02 ` Juanma Barranquero
  2008-11-20 17:19   ` Drew Adams
  2008-11-20 11:02 ` Peter Dyballa
  2008-11-22  5:25 ` Xavier Maillard
  2 siblings, 1 reply; 11+ messages in thread
From: Juanma Barranquero @ 2008-11-20 11:02 UTC (permalink / raw)
  To: Jonathan Groll; +Cc: GnuEmacs Help

On Thu, Nov 20, 2008 at 11:47, Jonathan Groll <lists@groll.co.za> wrote:

> Does platform matter for byte-compiled .elc's?

No, unless they did weird things during compilation (for example,
selecting which code to compile depending on the availability of
external programs, etc.).

> What about GNU Emacs 22 vs 23?

If you compile the .el files with 22.X, they should work fine in 23.0.X.

  Juanma




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Byte-compiled elisp libraries on different platforms
  2008-11-20 10:47 Byte-compiled elisp libraries on different platforms Jonathan Groll
  2008-11-20 11:02 ` Juanma Barranquero
@ 2008-11-20 11:02 ` Peter Dyballa
  2008-11-22  5:25 ` Xavier Maillard
  2 siblings, 0 replies; 11+ messages in thread
From: Peter Dyballa @ 2008-11-20 11:02 UTC (permalink / raw)
  To: Jonathan Groll; +Cc: GnuEmacs Help


Am 20.11.2008 um 11:47 schrieb Jonathan Groll:

> Does platform matter for byte-compiled .elc's?

No. It's like other byte-compiled code, for example from Java.

> What about GNU Emacs 22 vs 23?


GNU Emacs 23 uses a new format that makes it unusable for other  
Emacsen. So byte-compile with GNU Emacs 22.

--
Greetings

   Pete

People say that if you play Microsoft CD's backwards, you hear  
satanic things, but that's nothing, because if you play them  
forwards, they install MS Windows.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: Byte-compiled elisp libraries on different platforms
  2008-11-20 11:02 ` Juanma Barranquero
@ 2008-11-20 17:19   ` Drew Adams
  2008-11-20 18:08     ` Juanma Barranquero
  0 siblings, 1 reply; 11+ messages in thread
From: Drew Adams @ 2008-11-20 17:19 UTC (permalink / raw)
  To: 'Juanma Barranquero', 'Jonathan Groll'
  Cc: 'GnuEmacs Help'

> > Does platform matter for byte-compiled .elc's?
> 
> No, unless they did weird things during compilation (for example,
> selecting which code to compile depending on the availability of
> external programs, etc.).
>
> > What about GNU Emacs 22 vs 23?
> 
> If you compile the .el files with 22.X, they should work fine 
> in 23.0.X.

I don't agree about the last part. I have come across things that do not work in
Emacs 23 if byte-compiled with Emacs 22 (and vice versa).

In general, I believe, Emacs has always been platform-independent wrt
byte-compiled code, and it has never guaranteed release-independence.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Byte-compiled elisp libraries on different platforms
  2008-11-20 17:19   ` Drew Adams
@ 2008-11-20 18:08     ` Juanma Barranquero
  2008-11-20 18:29       ` Drew Adams
  0 siblings, 1 reply; 11+ messages in thread
From: Juanma Barranquero @ 2008-11-20 18:08 UTC (permalink / raw)
  To: Drew Adams; +Cc: Jonathan Groll, GnuEmacs Help

On Thu, Nov 20, 2008 at 18:19, Drew Adams <drew.adams@oracle.com> wrote:

> I don't agree about the last part. I have come across things that do not work in
> Emacs 23 if byte-compiled with Emacs 22 (and vice versa).

I was talking only about 22 -> 23, not the other way around.

And of course you can have code that does fail, in subtle or not so
subtle ways. If it does not satisfy the expectations of 23.X
(functions with different parameter profiles, macros whose semantics
has changed, whatever), for example. The only real way to have 100%
compatibility is compiling the .el files with the Emacs release you're
going to use them.

That said, most of the time .elc files generated with 22.X work fine
with 23.X Emacs.

> In general, I believe, Emacs has always been platform-independent wrt
> byte-compiled code,

Yes. But as stated above, whether a .elc file from one Emacs works in
another Emacs is not (just) about byte-code. Of course byte-code must
be compatible, or you're liable to crash Emacs.

             Juanma




^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: Byte-compiled elisp libraries on different platforms
  2008-11-20 18:08     ` Juanma Barranquero
@ 2008-11-20 18:29       ` Drew Adams
  2008-11-20 18:42         ` Juanma Barranquero
  0 siblings, 1 reply; 11+ messages in thread
From: Drew Adams @ 2008-11-20 18:29 UTC (permalink / raw)
  To: 'Juanma Barranquero'
  Cc: 'Jonathan Groll', 'GnuEmacs Help'

> > I don't agree about the last part. I have come across 
> > things that do not work in Emacs 23 if byte-compiled
> > with Emacs 22 (and vice versa).
> 
> I was talking only about 22 -> 23, not the other way around.

Me too (that's what I said). And I mentioned both directions - I've seen
problems in both directions.

> And of course you can have code that does fail, in subtle or not so
> subtle ways. If it does not satisfy the expectations of 23.X
> (functions with different parameter profiles, macros whose semantics
> has changed, whatever), for example. The only real way to have 100%
> compatibility is compiling the .el files with the Emacs release you're
> going to use them.

Agreed.

> That said, most of the time .elc files generated with 22.X work fine
> with 23.X Emacs.

Most, yes, probably. The byte-compiler changes probably affect only a minority
of code in incompatible ways. But it's enough. ;-)

> > In general, I believe, Emacs has always been 
> > platform-independent wrt byte-compiled code,
> 
> Yes. But as stated above, whether a .elc file from one Emacs works in
> another Emacs is not (just) about byte-code.

Agreed. But if the uncompiled code works on two different platforms, then so
should the byte-compiled code (compiled with the same release #).

> Of course byte-code must be compatible, or you're liable to crash Emacs.

Yup.






^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Byte-compiled elisp libraries on different platforms
  2008-11-20 18:29       ` Drew Adams
@ 2008-11-20 18:42         ` Juanma Barranquero
  2008-11-20 18:56           ` Drew Adams
  0 siblings, 1 reply; 11+ messages in thread
From: Juanma Barranquero @ 2008-11-20 18:42 UTC (permalink / raw)
  To: Drew Adams; +Cc: Jonathan Groll, GnuEmacs Help

On Thu, Nov 20, 2008 at 19:29, Drew Adams <drew.adams@oracle.com> wrote:

> Most, yes, probably. The byte-compiler changes probably affect only a minority
> of code in incompatible ways. But it's enough. ;-)

Hmm. I could be wrong, but I don't remember any changes in the 23.X
byte compiler / interpreter stuff making old (22.X, not 19.X ;-)
byte-code incompatible.
Any such fails is more likely to be from the lisp code than the byte-code.

(Of course 23.X files use a different coding system, so they are not
back-compatible.)

> Agreed. But if the uncompiled code works on two different platforms, then so
> should the byte-compiled code (compiled with the same release #).

"Should" does not imply "must", of course. You can use compile-time
tricks to do almost anything, including generating code which bears no
relation to the original lisp...

             Juanma




^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: Byte-compiled elisp libraries on different platforms
  2008-11-20 18:42         ` Juanma Barranquero
@ 2008-11-20 18:56           ` Drew Adams
  0 siblings, 0 replies; 11+ messages in thread
From: Drew Adams @ 2008-11-20 18:56 UTC (permalink / raw)
  To: 'Juanma Barranquero'
  Cc: 'Jonathan Groll', 'GnuEmacs Help'

> Hmm. I could be wrong, but I don't remember any changes in the 23.X
> byte compiler / interpreter stuff making old (22.X, not 19.X ;-)
> byte-code incompatible. Any such fails is more likely to be from
> the lisp code than the byte-code.

I don't say anything about where the incompatibility comes from. If forced to
guess, though, I too would suppose that it's from (or mostly from) changes
outside the byte-compiler.

What I do know is that I have code that works if byte-compiled in Emacs 22 or
23, but does not work if the 22-byte-compiled code is used in 23. And I believe
that I have code that does not work if the 23-byte-compiled code is used in 22.

My guess is that changes in the treatment of characters are mostly responsible
for the incompatibilities I see, and those are probably mostly (entirely?)
outside of the byte-compiler code.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Byte-compiled elisp libraries on different platforms
       [not found] <mailman.823.1227178080.26697.help-gnu-emacs@gnu.org>
  2008-11-20 10:55 ` Nordlöw
@ 2008-11-21  4:27 ` Tim X
  1 sibling, 0 replies; 11+ messages in thread
From: Tim X @ 2008-11-21  4:27 UTC (permalink / raw)
  To: help-gnu-emacs

Jonathan Groll <lists@groll.co.za> writes:

> I keep my emacs configuration in a git repository. There are also some
> elisp libaries (cedet/nxml/ etc etc) that are in that repository. Most
> of these libaries have been byte compiled in GNU Emacs 22.
>
> I'd like to be able to use this repository on multiple machines,
> specifically:
> Ubuntu Linux (x86) running GNU Emacs 23
> OS X (intel) running Aquamacs - GNU Emacs 22
> Opensolaris (sparc64) running GNU Emacs 22
>
> Does platform matter for byte-compiled .elc's? What about GNU Emacs 22
> vs 23?
>

I don't believe platform matters with respect to byte compiled
files. However, 22 v 23 does. While emacs 23 can read elc files
generated by emacs22, it has to do conversions that can have
considerable impact on load time. this is mentioned in the NEWS file
with emacs 23 and advises that new elc files should be created using
emacs 23.

Tim


-- 
tcross (at) rapttech dot com dot au


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Byte-compiled elisp libraries on different platforms
  2008-11-20 10:47 Byte-compiled elisp libraries on different platforms Jonathan Groll
  2008-11-20 11:02 ` Juanma Barranquero
  2008-11-20 11:02 ` Peter Dyballa
@ 2008-11-22  5:25 ` Xavier Maillard
  2 siblings, 0 replies; 11+ messages in thread
From: Xavier Maillard @ 2008-11-22  5:25 UTC (permalink / raw)
  To: Jonathan Groll; +Cc: help-gnu-emacs

Hi,

C-h n has this about byte-compilation (for 23.0.x):

During byte-compilation, Emacs 23 uses `utf-8-emacs' to write files.
As a result, byte-compiled files containing non-ASCII characters can't
be read by earlier versions of Emacs.  Files compiled by Emacs 20, 21,
or 22 are loaded correctly as emacs-mule (whether or not they contain
multibyte characters).  This takes somewhat more time, so it may be
worth recompiling existing .elc files which don't need to be shared
with older Emacsen.


	Xavier
-- 
http://www.gnu.org
http://www.april.org
http://www.lolica.org




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-11-22  5:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-20 10:47 Byte-compiled elisp libraries on different platforms Jonathan Groll
2008-11-20 11:02 ` Juanma Barranquero
2008-11-20 17:19   ` Drew Adams
2008-11-20 18:08     ` Juanma Barranquero
2008-11-20 18:29       ` Drew Adams
2008-11-20 18:42         ` Juanma Barranquero
2008-11-20 18:56           ` Drew Adams
2008-11-20 11:02 ` Peter Dyballa
2008-11-22  5:25 ` Xavier Maillard
     [not found] <mailman.823.1227178080.26697.help-gnu-emacs@gnu.org>
2008-11-20 10:55 ` Nordlöw
2008-11-21  4:27 ` Tim X

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.