Closed elondres-mim closed 1 day ago
This is happening to me as well. I notice that the formula is trying to use /Library/Developer/CommandLineTools/usr/bin/gm4
rather than the homebrew m4 (/opt/homebrew/opt/m4/bin/m4
) In addition to this I also have the system default /usr/bin/m4
. Of those three versions only the homebrew version supports the --gnu
flag. Not sure how to fix this to get to the correct m4 instance. neither brew link
nor path changes seem to do what's needed
Im getting the same error when tying to install the stable version to gnu-emacs (29)
==> Installing d12frosted/emacs-plus/emacs-plus@29 --with-native-comp
==> Patching
==> Applying fix-window-role.patch
patching file 'src/nsterm.m'
==> Applying system-appearance.patch
patching file 'src/frame.h'
patching file 'src/nsfns.m'
patching file 'src/nsterm.m'
==> Applying round-undecorated-frame.patch
patching file 'src/frame.c'
patching file 'src/frame.h'
patching file 'src/nsfns.m'
patching file 'src/nsterm.h'
patching file 'src/nsterm.m'
==> ./autogen.sh
Last 15 lines from /Users/adithyaps/Library/Logs/Homebrew/emacs-plus@29/01.autogen.sh:
2024-09-12 19:14:07 +0000
./autogen.sh
Checking whether you have the necessary tools...
(Read INSTALL.REPO for more details on building Emacs)
Checking for autoconf (need at least version 2.65) ... ok
Your system has the required tools.
Running 'autoreconf -fi -I m4' ...
/Library/Developer/CommandLineTools/usr/bin/gm4: unrecognized option `--gnu'
Try `/Library/Developer/CommandLineTools/usr/bin/gm4 --help' for more information.
autom4te: error: /usr/bin/gm4 failed with exit status: 1
autoreconf: error: /usr/local/Cellar/autoconf/2.72/bin/autoconf failed with exit status: 1
If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
https://github.com/d12frosted/homebrew-emacs-plus/issues
comment from @d12frosted: β οΈ do not use it as a workaround as you might mess your environment; the formula just lacked a dependency; the issue was resolved, so now you just need to brew update
and give it another try
Manually removing gm4 from /Library/Developer/CommandLineTools/usr/bin/
path and symlinking it with the homebrew version as gm4
and m4
seems to progress further. Im not sure if this is recommended. I will undo the changes upon installation.
β― ll /Library/Developer/CommandLineTools/usr/bin/ | rg m4
lrwxr-xr-x@ - root 13 Sep 00:52 gm4 -> /usr/local/opt/m4/bin/m4
lrwxr-xr-x@ - root 13 Sep 00:52 m4 -> /usr/local/opt/m4/bin/m4
I ran into the same problem on M2 Air. @psadi 's solution worked for me.
I can also confirm that doing what psadi suggested worked for me.
Can someone try by adding m4
to the list of dependencies? Something like this:
And also please avoid removing anything manually. You might break other things on your system. I mean - it's up to you, but this can't be a recommendation.
Can someone try by adding
m4
to the list of dependencies? Something like this:
This works as expected.
@pauldub thanks, will add it to deps for Emacs 30 and Emacs 31.
I don't know why (maybe I am on the old OS), but I could not reproduce the issue hence needed some help π
Done via 3855ebb1ec34c9c45f26c1dffe9981ec0efc99e6 and 5c03f0aefe58265a115613e63c7c8aef0696eef2.
Now you can do brew update
and give it another try.
@d12frosted Can this be added to Emacs 29 as well?
Yes! Send a PR if you want to get it now and not in ~12 hours π
Yes! Send a PR if you want to get it now and not in ~12 hours π
Thanks! Merged.
Version
emacs-plus@30
Make sure to follow these steps before submitting the issue
brew update
and try to reproduce the issue againbrew doctor
, fix all issues and try to reproduce your issue againWhat happened?
Command output
brew doctor output
lots of stuff about one other package (wkhtmltox) but that's it
brew config output
Any extra information
This was originally an upgrade, it worked before the latest update on my system.