emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 9dfd945: Fix byte compilation of package built-ins


From: Lars Ingebrigtsen
Subject: Re: master 9dfd945: Fix byte compilation of package built-ins
Date: Wed, 10 Nov 2021 04:51:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> The situation is:  You have a directory (in load-path) with
>> 
>> foo.el.gz
>> foo.elc
>> 
>> and then say (require 'foo), and that fails?  I haven't tried to debug
>> further; perhaps it's obvious to somebody what's failing here.
>
> Is that a build with built-in compression capabilities?  That is
> required for natively-compiling compressed .el files.

Hm...  Oh!  I didn't notice this bit:

Test package-test-macro-compilation-gz condition:
    (file-notify-error "hashing failed" 
"/home/larsi/src/emacs/trunk/test/lisp/emacs-lisp/package-resources/macro-builtin-package-1.0/macro-builtin.el.gz")

So it passes this test:

static Lisp_Object
comp_hash_source_file (Lisp_Object filename)

[...]

#ifndef HAVE_ZLIB
  if (is_gz)
    xsignal2 (Qfile_notify_error,
              build_string ("Cannot natively compile compressed *.el files 
without zlib support"),
              filename);

But then signals an error here:

#ifdef HAVE_ZLIB
  int res = is_gz
    ? md5_gz_stream (f, SSDATA (digest))
    : md5_stream (f, SSDATA (digest));
#else
  int res = md5_stream (f, SSDATA (digest));
#endif
  fclose (f);

  if (res)
    xsignal2 (Qfile_notify_error, build_string ("hashing failed"), filename);


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

[Prev in Thread] Current Thread [Next in Thread]