unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#74530: 31.0.50; Emacs fails to compile cape package
@ 2024-11-25 15:07 Osama Rebach
  2024-11-25 15:58 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Osama Rebach @ 2024-11-25 15:07 UTC (permalink / raw)
  To: 74530

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





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

* bug#74530: 31.0.50; Emacs fails to compile cape package
  2024-11-25 15:07 bug#74530: 31.0.50; Emacs fails to compile cape package Osama Rebach
@ 2024-11-25 15:58 ` Eli Zaretskii
  2024-11-26  2:10   ` Sean Whitton
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2024-11-25 15:58 UTC (permalink / raw)
  To: Osama Rebach, Sean Whitton; +Cc: 74530

> From: Osama Rebach <osamarebach@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?





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

* bug#74530: 31.0.50; Emacs fails to compile cape package
  2024-11-25 15:58 ` Eli Zaretskii
@ 2024-11-26  2:10   ` Sean Whitton
  2024-11-26  3:24     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 7+ messages in thread
From: Sean Whitton @ 2024-11-26  2:10 UTC (permalink / raw)
  To: Eli Zaretskii, Stefan Monnier; +Cc: 74530, Osama Rebach

Hello,

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

>> From: Osama Rebach <osamarebach@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





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

* bug#74530: 31.0.50; Emacs fails to compile cape package
  2024-11-26  2:10   ` Sean Whitton
@ 2024-11-26  3:24     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-11-27  2:37       ` Sean Whitton
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-26  3:24 UTC (permalink / raw)
  To: Sean Whitton; +Cc: Eli Zaretskii, 74530, Osama Rebach

> 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






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

* bug#74530: 31.0.50; Emacs fails to compile cape package
  2024-11-26  3:24     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-27  2:37       ` Sean Whitton
  2024-11-27 10:01         ` Osama Rebach
  0 siblings, 1 reply; 7+ messages in thread
From: Sean Whitton @ 2024-11-27  2:37 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Eli Zaretskii, 74530, Osama Rebach

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





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

* bug#74530: 31.0.50; Emacs fails to compile cape package
  2024-11-27  2:37       ` Sean Whitton
@ 2024-11-27 10:01         ` Osama Rebach
  2024-11-27 11:36           ` Sean Whitton
  0 siblings, 1 reply; 7+ messages in thread
From: Osama Rebach @ 2024-11-27 10:01 UTC (permalink / raw)
  To: Sean Whitton, Stefan Monnier; +Cc: Eli Zaretskii, 74530

Sean Whitton <spwhitton@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.





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

* bug#74530: 31.0.50; Emacs fails to compile cape package
  2024-11-27 10:01         ` Osama Rebach
@ 2024-11-27 11:36           ` Sean Whitton
  0 siblings, 0 replies; 7+ messages in thread
From: Sean Whitton @ 2024-11-27 11:36 UTC (permalink / raw)
  To: Osama Rebach; +Cc: Eli Zaretskii, 74530-done, Stefan Monnier

Hello,

Thanks for confirming.

-- 
Sean Whitton





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

end of thread, other threads:[~2024-11-27 11:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-25 15:07 bug#74530: 31.0.50; Emacs fails to compile cape package Osama Rebach
2024-11-25 15:58 ` Eli Zaretskii
2024-11-26  2:10   ` Sean Whitton
2024-11-26  3:24     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-27  2:37       ` Sean Whitton
2024-11-27 10:01         ` Osama Rebach
2024-11-27 11:36           ` Sean Whitton

Code repositories for project(s) associated with this public inbox

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

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).