Subject: bug#57959: 29.0.50; build error on gnulinux

From: Gregory Heytings <[email-masked]>
Date: Tue, 20 Sep 2022 23:17:52 +0000

>
>  CC       lcms.o
>  CC       inotify.o
>  CC       profiler.o
>  CC       decompress.o
> make[3]: Leaving directory '/home/pankaj/work/gnu/emacs/doc/lispref'
> make[2]: Leaving directory '/home/pankaj/work/gnu/emacs'
> make[2]: Entering directory '/home/pankaj/work/gnu/emacs'
>  CC       thread.o
>
>  "make all" failed with exit status 2.
>  You might try to:
>  - run "make bootstrap", which might fix the problem
>  - run "make V=1", which displays the full commands invoked by make,
>    to further investigate the problem
>
> make[2]: *** [Makefile:405: advice-on-failure] Error 2
> make[2]: Leaving directory '/home/pankaj/work/gnu/emacs'
> make[1]: *** [Makefile:370: all] Error 2
> make[1]: *** Waiting for unfinished jobs....
>

And what's the actual build error?  You should see it a few lines above. 
Did you try to run "make bootstrap"?