I do nothing special, I do use the sourcecode of 29.0.50 from GitHub direct, build the emacs for nextstep, and launch it from the GUI of macOS.
By now it works perfectly.
#!/bin/zsh
# Build emacs from daily github save
date > emacs-build.log 2>&1 # logfile
echo "build emacs 29.0.50" > emacs-build.log 2>&1 # logfile
cd emacs >> ../emacs-build.log 2>&1 # logfile
#####
make clean >> ../emacs-build.log 2>&1 # logfile
if [ $? -eq 0 ]; then
echo " " $(date +%H:%M:%S) "make clean status exited successfully"
else
echo "autogen.sh status exited with error code"
fi
#####
./autogen.sh >> ../emacs-build.log 2>&1
if [ $? -eq 0 ]; then
echo " " $(date +%H:%M:%S) "autogen.sh status exited successfully"
else
echo "autogen.sh status exited with error code"
fi
####
git config pull.rebase false # merge (the default strategy)
git pull >> ../emacs-build.log 2>&1
if [ $? -eq 0 ]; then
echo " " $(date +%H:%M:%S) "git status exited successfully"
else
echo "git status exited with error code"
fi
####
./configure --with-native-compilation --with-xwidgets --with-mailutils >> ../emacs-build.log 2>&1
###./configure --with-xwidgets --with-mailutils >> ../emacs-build.log 2>&1
if [ $? -eq 0 ]; then
echo " " $(date +%H:%M:%S) "configuration exited successfully"
make >> ../emacs-build.log 2>&1
else
echo "ERROR in configuration"
fi
#
if [ $? -eq 0 ]; then
echo " " $(date +%H:%M:%S) "make 'emacs' exited successfully"
make install >> ../emacs-build.log 2>&1
else
echo "ERROR in make "
fi
cd ..
echo " " $(date +%H:%M:%S) "Now go to emacs/nextstep and move 'Emacs.app' to '/Applications/'"
date >> emacs-build.log 2>&1 # logfile
exit