GNU bug report logs - #13787
24.2; Call to package-install during byte compilation returns non-zero exit status

Previous Next

Package: emacs;

Reported by: Jon Dufresne <jon <at> jondufresne.org>

Date: Fri, 22 Feb 2013 17:13:02 UTC

Severity: normal

Found in version 24.2

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13787 in the body.
You can then email your comments to 13787 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#13787; Package emacs. (Fri, 22 Feb 2013 17:13:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jon Dufresne <jon <at> jondufresne.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 22 Feb 2013 17:13:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jon Dufresne <jon <at> jondufresne.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.2; Call to package-install during byte compilation returns
	non-zero exit status
Date: Fri, 22 Feb 2013 04:09:17 -0800
This bug report will be sent to the Bug-GNU-Emacs mailing list
and the GNU bug tracker at debbugs.gnu.org.  Please check that
the From: line contains a valid email address.  After a delay of up
to one day, you should receive an acknowledgement at that address.

Please write in English if possible, as the Emacs maintainers
usually do not have translators for other languages.

Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug.  If you can, give a recipe
starting from `emacs -Q':

STR:

0. Create a simple elisp file that installs an ELPA package (example
below).
1. Compile the file from the command line using "emacs --batch".
2. Check the exit status of the command, notice it is non-zero (255).

The simple elisp file used for testing has the contents:

(eval-and-compile
  (require 'package)
  (package-initialize)
  (package-refresh-contents)
  (package-install 'org))

The file is compiled from the command line using the command:

$ emacs --batch --eval '(byte-compile-file "test.el")'; echo $?

After lots of compilation output, eventually you'll see the output:

Selecting deleted buffer
Wrote /home/jon/.emacs.d/ac-comphist.dat
255

Where 255 is the exit status.

When this elisp file is compiled as part of a Makefile, this causes the
build to fail, reducing automation.

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/usr/share/emacs/24.2/etc/DEBUG.


In GNU Emacs 24.2.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.6.4)
 of 2013-02-02 on buildvm-04.phx2.fedoraproject.org
Windowing system distributor `Fedora Project', version 11.0.11302000
Configured using:
 `configure '--build=x86_64-redhat-linux-gnu'
 '--host=x86_64-redhat-linux-gnu' '--program-prefix='
 '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr'
 '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
 '--datadir=/usr/share' '--includedir=/usr/include'
 '--libdir=/usr/lib64' '--libexecdir=/usr/libexec'
 '--localstatedir=/var' '--sharedstatedir=/var/lib'
 '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus'
 '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff'
 '--with-xft' '--with-xpm' '--with-x-toolkit=gtk3' '--with-gpm=no'
 '--with-wide-int' 'build_alias=x86_64-redhat-linux-gnu'
 'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
 --param=ssp-buffer-size=4 -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,relro ''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.utf8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  global-auto-complete-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
x M-x r e p o <tab> r <tab> <return>

Recent messages:
Loading /usr/share/emacs/site-lisp/site-start.d/auto-complete-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/desktop-entry-mode-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/emacs-goodies-loaddefs.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/gnus-bonus-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/rpm-spec-mode-init.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...

Load-path shadows:






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13787; Package emacs. (Fri, 22 Feb 2013 19:01:02 GMT) Full text and rfc822 format available.

Message #8 received at 13787 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Jon Dufresne <jon <at> jondufresne.org>
Cc: 13787 <at> debbugs.gnu.org
Subject: Re: bug#13787: 24.2;
	Call to package-install during byte compilation returns non-zero exit
	status
Date: Fri, 22 Feb 2013 13:58:54 -0500
Jon Dufresne wrote:

> (eval-and-compile
>   (require 'package)
>   (package-initialize)
>   (package-refresh-contents)
>   (package-install 'org))

Why eval-and-compile?

Anyway, I think the issue can be summarized as:

cat /tmp/foo.el:

(eval-and-compile
  (byte-compile-file "/tmp/bar.el"))

cat /tmp/bar.el:

(message "hi")

emacs -Q -batch -f batch-byte-compile foo.el

  Wrote /tmp/bar.elc
  >>Error occurred processing foo.el: error (("Selecting deleted buffer"))

Recursive byte-compilation trips over itself trying to use
a single " *Compiler Input*" buffer.

(package-install byte-compiles what it installs.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13787; Package emacs. (Sat, 23 Feb 2013 01:34:02 GMT) Full text and rfc822 format available.

Message #11 received at 13787 <at> debbugs.gnu.org (full text, mbox):

From: Jon Dufresne <jon <at> jondufresne.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 13787 <at> debbugs.gnu.org
Subject: Re: bug#13787: 24.2; Call to package-install during byte
	compilation returns non-zero exit status
Date: Fri, 22 Feb 2013 17:32:23 -0800
On Fri, 2013-02-22 at 13:58 -0500, Glenn Morris wrote:
> Why eval-and-compile?

I have one init.el that I share across many installations of Emacs.
There are several third party packages in repositories that I rely on.
When I pass the init.el to a new Emacs installation, I build it using a
Makefile. My goal is to byte compile the init.el file and install all
required third party packages.

I want to avoid passing around the init.el file *and* the third party
packages. I prefer to rely on the repository for an up to date version
of the package. This way I avoid tracking all packages individually.

I figured build time was the best time to download, compile and install
these packages. This is why I use eval-and-compile.

I am probably not the first person to consider doing this. And so my
approach may be off. If there is a more direct or better approach to
handle this please let me know.






Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Sat, 23 Feb 2013 21:17:02 GMT) Full text and rfc822 format available.

Notification sent to Jon Dufresne <jon <at> jondufresne.org>:
bug acknowledged by developer. (Sat, 23 Feb 2013 21:17:02 GMT) Full text and rfc822 format available.

Message #16 received at 13787-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 13787-done <at> debbugs.gnu.org
Subject: Re: bug#13787: 24.2;
	Call to package-install during byte compilation returns non-zero exit
	status
Date: Sat, 23 Feb 2013 16:14:41 -0500
Version: 24.4

Jon Dufresne wrote:

> I have one init.el that I share across many installations of Emacs.
> There are several third party packages in repositories that I rely on.
> When I pass the init.el to a new Emacs installation, I build it using a
> Makefile. My goal is to byte compile the init.el file and install all
> required third party packages.

I still don't see the need for the eval-and-compile. Why not compile it
(leaving aside the fact that compiling ~/.emacs is a waste of time IMO),
then load it?

Anyway, I installed a fix.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 24 Mar 2013 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 46 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.