GNU bug report logs - #74530
31.0.50; Emacs fails to compile cape package

Previous Next

Package: emacs;

Reported by: Osama Rebach <osamarebach <at> gmail.com>

Date: Mon, 25 Nov 2024 15:24:01 UTC

Severity: normal

Found in version 31.0.50

Done: Sean Whitton <spwhitton <at> spwhitton.name>

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 74530 in the body.
You can then email your comments to 74530 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#74530; Package emacs. (Mon, 25 Nov 2024 15:24:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Osama Rebach <osamarebach <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 25 Nov 2024 15:24:01 GMT) Full text and rfc822 format available.

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

From: Osama Rebach <osamarebach <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; Emacs fails to compile cape package
Date: Mon, 25 Nov 2024 16:07:02 +0100
Emacs (commit: cf3ea44eb56) fails to compile cape (url: https://github.com/minad/cape,
commit: 9a7c44fe8b7).  Reverting commit eb1756a8a55 solves the problem.

Steps to reproduce:

run: emacs -Q

evaluate:
(add-to-list 'load-path "/path/to/cape")
(byte-compile-file "/path/to/cape/cape-char.el")

results:
cape-char.el:132:2: Error: Symbol's function definition is void: internal--with-suppressed-warnings

I can provide the full nix build log, or more information if needed.

In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.43, cairo version 1.18.2)
System Description: NixOS 25.05 (Warbler)

Configured using:
 'configure
 --prefix=/nix/store/yffm282zsg0bfgad74m9ihgx2w1i5x0g-emacs-pgtk-31.0.50-20241125102958-89b2f7c
 --disable-build-details --with-modules --with-pgtk
 --with-compress-install --with-toolkit-scroll-bars
 --with-native-compilation --without-imagemagick --with-mailutils
 --without-small-ja-dic --with-tree-sitter --without-xinput2
 --without-xwidgets --with-dbus --with-selinux --disable-gc-mark-trace'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER
PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP XIM GTK3 ZLIB




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74530; Package emacs. (Mon, 25 Nov 2024 16:00:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Osama Rebach <osamarebach <at> gmail.com>,
 Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 74530 <at> debbugs.gnu.org
Subject: Re: bug#74530: 31.0.50; Emacs fails to compile cape package
Date: Mon, 25 Nov 2024 17:58:59 +0200
> From: Osama Rebach <osamarebach <at> gmail.com>
> Date: Mon, 25 Nov 2024 16:07:02 +0100
> 
> Emacs (commit: cf3ea44eb56) fails to compile cape (url: https://github.com/minad/cape,
> commit: 9a7c44fe8b7).  Reverting commit eb1756a8a55 solves the problem.
> 
> Steps to reproduce:
> 
> run: emacs -Q
> 
> evaluate:
> (add-to-list 'load-path "/path/to/cape")
> (byte-compile-file "/path/to/cape/cape-char.el")
> 
> results:
> cape-char.el:132:2: Error: Symbol's function definition is void: internal--with-suppressed-warnings
> 
> I can provide the full nix build log, or more information if needed.

Sean, any ideas?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74530; Package emacs. (Tue, 26 Nov 2024 02:11:02 GMT) Full text and rfc822 format available.

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

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Eli Zaretskii <eliz <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 74530 <at> debbugs.gnu.org, Osama Rebach <osamarebach <at> gmail.com>
Subject: Re: bug#74530: 31.0.50; Emacs fails to compile cape package
Date: Tue, 26 Nov 2024 10:10:09 +0800
Hello,

On Mon 25 Nov 2024 at 05:58pm +02, Eli Zaretskii wrote:

>> From: Osama Rebach <osamarebach <at> gmail.com>
>> Date: Mon, 25 Nov 2024 16:07:02 +0100
>>
>> Emacs (commit: cf3ea44eb56) fails to compile cape (url: https://github.com/minad/cape,
>> commit: 9a7c44fe8b7).  Reverting commit eb1756a8a55 solves the problem.
>>
>> Steps to reproduce:
>>
>> run: emacs -Q
>>
>> evaluate:
>> (add-to-list 'load-path "/path/to/cape")
>> (byte-compile-file "/path/to/cape/cape-char.el")
>>
>> results:
>> cape-char.el:132:2: Error: Symbol's function definition is void: internal--with-suppressed-warnings
>>
>> I can provide the full nix build log, or more information if needed.
>
> Sean, any ideas?

Line 132 in cape-char.el directly calls a macro which uses when-let, at
top-level, so it calls the with-suppressed-warnings I added in the
recent commit, again at top-level.

Stefan's commit a0f60293d9 says

    `byte-compile-macro-environment` contains definitions which expand
    to code that is only understood by the rest of the byte-compiler, so
    using it for code which isn't being byte-compiled leads to errors
    such as references to non-existing function
    `internal--with-suppressed-warnings`.

So it sounds like we are inappropriately tangling with machinery
internal to the byte compiler.  I used with-suppressed-warnings in a
completely standard way, so I think the most likely thing is that we
have uncovered a bug in the byte compiler, probably something to do with
evaluating top-level forms while compiling.  Adding Stefan.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74530; Package emacs. (Tue, 26 Nov 2024 03:34:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 74530 <at> debbugs.gnu.org,
 Osama Rebach <osamarebach <at> gmail.com>
Subject: Re: bug#74530: 31.0.50; Emacs fails to compile cape package
Date: Mon, 25 Nov 2024 22:24:11 -0500
> Stefan's commit a0f60293d9 says
>
>     `byte-compile-macro-environment` contains definitions which expand
>     to code that is only understood by the rest of the byte-compiler, so
>     using it for code which isn't being byte-compiled leads to errors
>     such as references to non-existing function
>     `internal--with-suppressed-warnings`.
>
> So it sounds like we are inappropriately tangling with machinery
> internal to the byte compiler.  I used with-suppressed-warnings in a
> completely standard way, so I think the most likely thing is that we
> have uncovered a bug in the byte compiler, probably something to do with
> evaluating top-level forms while compiling.  Adding Stefan.

My guess is that it's the `when-let` inside an `eval-and-compile` that's
making us bite the dust.

I'd welcome a patch to fix that problem, but in the mean time a
patch that actually fixes `when-let` to not use `if-let` (and hence not
use `with-suppressed-warnings` either) might be a simpler solution.


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74530; Package emacs. (Wed, 27 Nov 2024 02:38:02 GMT) Full text and rfc822 format available.

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

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 74530 <at> debbugs.gnu.org,
 Osama Rebach <osamarebach <at> gmail.com>
Subject: Re: bug#74530: 31.0.50; Emacs fails to compile cape package
Date: Wed, 27 Nov 2024 10:37:27 +0800
Hello,

On Mon 25 Nov 2024 at 10:24pm -05, Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

>> Stefan's commit a0f60293d9 says
>>
>>     `byte-compile-macro-environment` contains definitions which expand
>>     to code that is only understood by the rest of the byte-compiler, so
>>     using it for code which isn't being byte-compiled leads to errors
>>     such as references to non-existing function
>>     `internal--with-suppressed-warnings`.
>>
>> So it sounds like we are inappropriately tangling with machinery
>> internal to the byte compiler.  I used with-suppressed-warnings in a
>> completely standard way, so I think the most likely thing is that we
>> have uncovered a bug in the byte compiler, probably something to do with
>> evaluating top-level forms while compiling.  Adding Stefan.
>
> My guess is that it's the `when-let` inside an `eval-and-compile` that's
> making us bite the dust.
>
> I'd welcome a patch to fix that problem, but in the mean time a
> patch that actually fixes `when-let` to not use `if-let` (and hence not
> use `with-suppressed-warnings` either) might be a simpler solution.

Okay, done, thanks.

Osama, if you could let us know whether this fixes the original bug, we
can close this.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74530; Package emacs. (Wed, 27 Nov 2024 10:04:02 GMT) Full text and rfc822 format available.

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

From: Osama Rebach <osamarebach <at> gmail.com>
To: Sean Whitton <spwhitton <at> spwhitton.name>, Stefan Monnier
 <monnier <at> iro.umontreal.ca>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 74530 <at> debbugs.gnu.org
Subject: Re: bug#74530: 31.0.50; Emacs fails to compile cape package
Date: Wed, 27 Nov 2024 11:01:58 +0100
Sean Whitton <spwhitton <at> spwhitton.name> writes:

> Okay, done, thanks.
>
> Osama, if you could let us know whether this fixes the original bug, we
> can close this.

Yes, the bug is now fixed and cape compile with the correct warnings.




Reply sent to Sean Whitton <spwhitton <at> spwhitton.name>:
You have taken responsibility. (Wed, 27 Nov 2024 11:37:01 GMT) Full text and rfc822 format available.

Notification sent to Osama Rebach <osamarebach <at> gmail.com>:
bug acknowledged by developer. (Wed, 27 Nov 2024 11:37:02 GMT) Full text and rfc822 format available.

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

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Osama Rebach <osamarebach <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 74530-done <at> debbugs.gnu.org,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#74530: 31.0.50; Emacs fails to compile cape package
Date: Wed, 27 Nov 2024 19:36:45 +0800
Hello,

Thanks for confirming.

-- 
Sean Whitton




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 25 Dec 2024 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 175 days ago.

Previous Next


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