Subject: Re: bug#63288: 30.0.50; Emacs 30 packages fail to build with native comp on some machines

From: [email-masked]
Date: Sat, 25 Jan 2025 18:08:10 +0100

To reproduce, I simply have to start `emacs -Q` and eval

```
(require 'package)
(package-read-from-string "((emacs \"25.1\"))")
```
in the scratch buffer:

```
Debugger entered--Lisp error: (error "Can’t read whole string")
  error("Can't read whole string")
  package-read-from-string("((emacs \"25.1\"))")
  (progn (package-read-from-string "((emacs \"25.1\"))"))
  eval((progn (package-read-from-string "((emacs \"25.1\"))")) t)
  elisp--eval-last-sexp(nil)
```
Again, after re-evaluating the defun, it's working ok.

I found something while messing around with recompiling the file. 
If I rebuild it manually it works ok, but then rebuilding the whole emacs source tree, and it fails again.
So I found this: building with `make -j48` (I have a 24 core CPU) triggers the problem while building 
with `make -j 1` does not. I attach the build.sh I used to configure the source tree, the configure and
 build logs, the elc file with the problem and a good version.

I don't think this is some memory corruption happening under load, I compile a big c++ code base 
daily and I never encountered any problem with the compiled binaries. Also I'm not the only one with
this exact problem so... But who knows...

Hope this helps!

Damien

On 2025-01-25T10:03:32.000+01:00, Eli Zaretskii <[email-masked]> wrote:

>  
> >    Cc: [email-masked]
> >  From: Andrea Corallo <[email-masked]>
> >  Date: Wed, 15 Jan 2025 15:14:57 -0500
> >  
> >  [email-masked] writes:
> >  
> > 
> > >     Hello,
> > >  
> > >   I'm currently reproducing this bug, is there anyway I can help? I can confirm that calling `package-read-from-string'
> > >   fails when starting emacs. After manually evaluating the defun again, it works okay.
> >   
> >  Could you provide a recipe to reproduce the bug starting from a 'emacs
> >  -Q'?
>  
> Ping!  Damien, could you please provide us with such a recipe?