d12frosted / homebrew-emacs-plus

Emacs Plus formulae for the Homebrew package manager
MIT License
2.36k stars 182 forks source link

Could not install emacs-plus@29 #544

Closed Cliffzz closed 4 months ago

Cliffzz commented 1 year ago

Please make sure to follow these steps (and mark the checkboxes):

What you were trying to do

Install emacs@29, emacs@28 and emacs@30 works fine, it might just be something upstream emacs.

What happened (include command output)

$ brew install emacs-plus@29
Command output

  ==> Fetching d12frosted/emacs-plus/emacs-plus@29
==> Cloning https://github.com/emacs-mirror/emacs.git
Updating /Users/cliffz/Library/Caches/Homebrew/emacs-plus@29--git
==> Checking out branch emacs-29
Already on 'emacs-29'
Your branch is up to date with 'origin/emacs-29'.
HEAD is now at f72a394716 Work around package.el transitive dependency bug
==> Installing emacs-plus@29 from d12frosted/emacs-plus
==> 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
==> ./configure --enable-locallisppath=/opt/homebrew/share/emacs/site-lisp --infodir=/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/info/emacs --prefix=/opt/homebrew/Cellar/emacs-plus@29/29.0.60 --with-xml2 --with-gnutls --
==> gmake
Last 15 lines from /Users/cliffz/Library/Logs/Homebrew/emacs-plus@29/03.gmake:
gmake[2]: Leaving directory '/private/tmp/emacs-plusA29-20230127-35677-rbj5nt/lisp'
gmake[1]: *** [Makefile:533: lisp] Error 2
gmake[1]: Leaving directory '/private/tmp/emacs-plusA29-20230127-35677-rbj5nt'
gmake[1]: Entering directory '/private/tmp/emacs-plusA29-20230127-35677-rbj5nt'
***
*** "make all" failed with exit status 2.
***
*** You could 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
***
gmake[1]: *** [Makefile:414: advice-on-failure] Error 2
gmake[1]: Leaving directory '/private/tmp/emacs-plusA29-20230127-35677-rbj5nt'
gmake: *** [Makefile:370: all] Error 2

Do not report this issue to Homebrew/brew or Homebrew/core!

  

Output of brew config

$ brew config
HOMEBREW_VERSION: 3.6.20
ORIGIN: https://github.com/Homebrew/brew
HEAD: 344d32bf7f40183359592ef81ca6486e0587981b
Last commit: 8 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 2f0350ab74d4f44486460f04d32505beb50e0259
Core tap last commit: 19 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 14.0.0 build 1400
Git: 2.39.1 => /opt/homebrew/bin/git
Curl: 7.84.0 => /usr/bin/curl
macOS: 13.0.1-arm64
CLT: 14.1.0.0.1.1666437224
Xcode: 14.2
Rosetta 2: false

Output of brew doctor

$ brew doctor
Your system is ready to brew.
d12frosted commented 1 year ago

Try to retry πŸ™ƒ

Cliffzz commented 1 year ago

Hmm, just tried again. It did pull in some updates but same error basically.

Command output
Already up-to-date.
➜  ~ brew doctor
Your system is ready to brew.
➜  ~ brew install emacs-plus@29
==> Fetching d12frosted/emacs-plus/emacs-plus@29
==> Cloning https://github.com/emacs-mirror/emacs.git
Updating /Users/cliffz/Library/Caches/Homebrew/emacs-plus@29--git
From https://github.com/emacs-mirror/emacs
   f72a394716..752c526585  emacs-29   -> origin/emacs-29
==> Checking out branch emacs-29
Already on 'emacs-29'
Your branch is behind 'origin/emacs-29' by 2 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
HEAD is now at 752c526585 ; Fix typos
==> Installing emacs-plus@29 from d12frosted/emacs-plus
==> 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
==> ./configure --enable-locallisppath=/opt/homebrew/share/emacs/site-lisp --infodir=/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/info/emacs --prefix=/opt/homebrew/Cellar/emacs-plus@29/29.0.60 --with-xml2 --with-gnutls --
==> gmake
Last 15 lines from /Users/cliffz/Library/Logs/Homebrew/emacs-plus@29/03.gmake:
gmake[2]: Leaving directory '/private/tmp/emacs-plusA29-20230127-86598-1s2bfy0/lisp'
gmake[1]: *** [Makefile:533: lisp] Error 2
gmake[1]: Leaving directory '/private/tmp/emacs-plusA29-20230127-86598-1s2bfy0'
gmake[1]: Entering directory '/private/tmp/emacs-plusA29-20230127-86598-1s2bfy0'
***
*** "make all" failed with exit status 2.
***
*** You could 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
***
gmake[1]: *** [Makefile:414: advice-on-failure] Error 2
gmake[1]: Leaving directory '/private/tmp/emacs-plusA29-20230127-86598-1s2bfy0'
gmake: *** [Makefile:370: all] Error 2

Do not report this issue to Homebrew/brew or Homebrew/core!

These open issues may also help:
Could not install emacs-plus@29 https://github.com/d12frosted/homebrew-emacs-plus/issues/544
  
d12frosted commented 1 year ago

@Cliffzz I understand it's not helpful, but I can't reproduce in nor locally, nor on CI. As a wild guess, try cleaning /Users/cliffz/Library/Caches/Homebrew/emacs-plus@29--git. I know that sometimes it helps people.

jvtrigueros commented 1 year ago

I just had the same issue, deleting the directory helped. Thank you!

aport commented 1 year ago

I experienced this issue and deleting the cache repository did not help. The error I saw was: In toplevel form: cedet/semantic/wisent/python.el:30:2: Error: Symbol's function definition is void: treesit-parser-list gmake[3]: *** [Makefile:332: cedet/semantic/wisent/python.elc] Error 1

After installing brew install tree-sitter and rebuilding it was successful πŸ‘πŸ»

Cliffzz commented 1 year ago

@d12frosted No worries, I understand the inability to really do something witout a reproduction of the issue.

I tried deleting directory you mention but unfortunately that didn't rearlly do anything. After checking the gmake logs I had the same error as @aport. After installing tree-sitter manually it works.

R0flcopt3r commented 1 year ago

@Cliffzz could you take look at the file /Users/cliffz/Library/Logs/Homebrew/emacs-plus@29/03.gmake?

I have the same issues, and it's linking errors to ctags. Should this provide ctags by itself? or should i have to install it seperately? I had emacs installed, removed it along with all references to tags,ctags,etags. still having the same issue. Also tried to remove the cache.

Here is the relevant output from gmake:


# ...
Undefined symbols for architecture arm64:
  "_file_has_acl", referenced from:
      _connect_socket in emacsclient-2ec1ae.o
  "_rpl_faccessat", referenced from:
      _set_local_socket in emacsclient-2ec1ae.o
  "_rpl_free", referenced from:
      _get_current_dir_name in emacsclient-2ec1ae.o
      _main in emacsclient-2ec1ae.o
      _quote_argument in emacsclient-2ec1ae.o
      _set_tcp_socket in emacsclient-2ec1ae.o
  "_rpl_getopt_long_only", referenced from:
      _main in emacsclient-2ec1ae.o
  "_rpl_open", referenced from:
      _connect_socket in emacsclient-2ec1ae.o
      _local_sockname in emacsclient-2ec1ae.o
  "_rpl_optarg", referenced from:
      _main in emacsclient-2ec1ae.o
  "_rpl_optind", referenced from:
      _main in emacsclient-2ec1ae.o
      _fail in emacsclient-2ec1ae.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [Makefile:427: emacsclient] Error 1
gmake[2]: *** Waiting for unfinished jobs....
Undefined symbols for architecture arm64:
  "_rpl_free", referenced from:
      _globals in ebrowse-93ac4f.o
      _member in ebrowse-93ac4f.o
      _add_declarator in ebrowse-93ac4f.o
  "_rpl_getopt_long", referenced from:
      _main in ebrowse-93ac4f.o
  "_rpl_optarg", referenced from:
      _main in ebrowse-93ac4f.o
  "_rpl_optind", referenced from:
      _main in ebrowse-93ac4f.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [Makefile:411: ebrowse] Error 1
Undefined symbols for architecture arm64:
  "_c_isalnum", referenced from:
      _scan_c_stream in make-docfile-e09ce7.o
  "_rpl_free", referenced from:
      _main in make-docfile-e09ce7.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [Makefile:414: make-docfile] Error 1
Undefined symbols for architecture arm64:
  "_c_isalnum", referenced from:
      _Asm_labels in ctags-bcd890.o
      _Cobol_paragraphs in ctags-bcd890.o
      _Mercury_functions in ctags-bcd890.o
      _Perl_functions in ctags-bcd890.o
      _Prolog_functions in ctags-bcd890.o
      _Ruby_functions in ctags-bcd890.o
      _Ada_getit in ctags-bcd890.o
      ...
  "_c_strcasecmp", referenced from:
      _get_language_from_filename in ctags-bcd890.o
  "_c_strncasecmp", referenced from:
      _Forth_words in ctags-bcd890.o
      _Fortran_functions in ctags-bcd890.o
      _HTML_labels in ctags-bcd890.o
  "_rpl_free", referenced from:
      _main in ctags-bcd890.o
      _analyze_regex in ctags-bcd890.o
      _process_file_name in ctags-bcd890.o
      _free_regexps in ctags-bcd890.o
      _put_entries in ctags-bcd890.o
      _free_tree in ctags-bcd890.o
      _Erlang_functions in ctags-bcd890.o
      ...
  "_rpl_getopt_long", referenced from:
      _main in ctags-bcd890.o
  "_rpl_optarg", referenced from:
      _main in ctags-bcd890.o
  "_rpl_optind", referenced from:
      _main in ctags-bcd890.o
  "_rpl_re_compile_pattern", referenced from:
      _add_regex in ctags-bcd890.o
  "_rpl_re_match", referenced from:
      _readline in ctags-bcd890.o
  "_rpl_re_search", referenced from:
      _find_entries in ctags-bcd890.o
  "_rpl_re_set_syntax", referenced from:
      _add_regex in ctags-bcd890.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [Makefile:407: ctags] Error 1
Undefined symbols for architecture arm64:
  "_c_isalnum", referenced from:
      _Asm_labels in etags-657a8f.o
      _Cobol_paragraphs in etags-657a8f.o
      _Mercury_functions in etags-657a8f.o
      _Perl_functions in etags-657a8f.o
      _Prolog_functions in etags-657a8f.o
      _Ruby_functions in etags-657a8f.o
      _Ada_getit in etags-657a8f.o
      ...
  "_c_strcasecmp", referenced from:
      _get_language_from_filename in etags-657a8f.o
  "_c_strncasecmp", referenced from:
      _Forth_words in etags-657a8f.o
      _Fortran_functions in etags-657a8f.o
      _HTML_labels in etags-657a8f.o
  "_rpl_free", referenced from:
      _main in etags-657a8f.o
      _analyze_regex in etags-657a8f.o
      _process_file_name in etags-657a8f.o
      _free_regexps in etags-657a8f.o
      _put_entries in etags-657a8f.o
      _free_tree in etags-657a8f.o
      _Erlang_functions in etags-657a8f.o
      ...
  "_rpl_getopt_long", referenced from:
      _main in etags-657a8f.o
  "_rpl_optarg", referenced from:
      _main in etags-657a8f.o
  "_rpl_optind", referenced from:
      _main in etags-657a8f.o
  "_rpl_re_compile_pattern", referenced from:
      _add_regex in etags-657a8f.o
  "_rpl_re_match", referenced from:
      _readline in etags-657a8f.o
  "_rpl_re_search", referenced from:
      _find_entries in etags-657a8f.o
  "_rpl_re_set_syntax", referenced from:
      _add_regex in etags-657a8f.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [Makefile:400: etags] Error 1
gmake[2]: Leaving directory '/private/tmp/emacs-plusA29-20230201-31543-1qcbi19/lib-src'
gmake[1]: *** [Makefile:533: lib-src] Error 2
gmake[1]: *** Waiting for unfinished jobs....```
Ethanlinyf commented 1 year ago

not able to install @29

`==> gmake Last 15 lines from /Users/ethanlin/Library/Logs/Homebrew/emacs-plus@29/03.gmake: gmake[2]: Leaving directory '/private/tmp/emacs-plusA29-20230214-2769-r1jxyu/lisp' gmake[1]: *** [Makefile:533: lisp] Error 2 gmake[1]: Leaving directory '/private/tmp/emacs-plusA29-20230214-2769-r1jxyu' gmake[1]: Entering directory '/private/tmp/emacs-plusA29-20230214-2769-r1jxyu'


*** "make all" failed with exit status 2.


You could 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


gmake[1]: [Makefile:414: advice-on-failure] Error 2 gmake[1]: Leaving directory '/private/tmp/emacs-plusA29-20230214-2769-r1jxyu' gmake: [Makefile:370: all] Error 2

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core): https://github.com/d12frosted/homebrew-emacs-plus/issues

These open issues may also help: Could not install emacs-plus@29 https://github.com/d12frosted/homebrew-emacs-plus/issues/544`

tzz commented 1 year ago

(moving to new issue)

dmgerman commented 1 year ago

not able to install @29

I had the same error. I was able to install by removing first the directory ~/Library/Caches/Homebrew

belak commented 1 year ago

As far as I can tell, this is an issue with something in the PATH, somehow.

I ran PATH=/opt/homebrew/bin:/usr/bin:/bin brew install emacs-plus@29 --with-native-comp and it worked fine, though because this formula injects the PATH variable, the final injected path isn't going to have everything I need so I plan to investigate a bit more.

belak commented 1 year ago

I have it narrowed down to my nix path which had binutils installed. Removing the package fixed the issue for me, though I'm not sure why. I've also tried injecting /usr/bin before the nix path which didn't work.

roife commented 1 year ago

Uninstalling binutils indeed solves the problem, thanks @belak!

maruks commented 4 months ago

I get this error:


% brew install emacs-plus@29
==> Fetching d12frosted/emacs-plus/emacs-plus@29
==> Downloading https://ftp.gnu.org/gnu/emacs/emacs-29.3.tar.xz
Already downloaded: /Users/maris/Library/Caches/Homebrew/downloads/36b84a67854d2e937bc9f499d87c82814f8e46ce3912cb8b1a448ea23ea50fb5--emacs-29.3.tar.xz
==> Installing emacs-plus@29 from d12frosted/emacs-plus
==> Patching
cp: invalid option -- 'c'
Try 'cp --help' for more information.

HOMEBREW_VERSION: 4.3.6 ORIGIN: https://github.com/Homebrew/brew HEAD: e8430b25a1d1321f32e5093d62b57b5cb7cfb3c3 Last commit: 2 days ago Core tap JSON: 18 Jun 18:10 UTC Core cask tap JSON: 18 Jun 18:10 UTC HOMEBREW_PREFIX: /opt/homebrew HOMEBREW_CASK_OPTS: [] HOMEBREW_MAKE_JOBS: 12 Homebrew Ruby: 3.3.3 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.3/bin/ruby CPU: dodeca-core 64-bit arm_lobos Clang: 15.0.0 build 1500 Git: 2.39.3 => /Library/Developer/CommandLineTools/usr/bin/git Curl: 8.4.0 => /usr/bin/curl macOS: 14.4-arm64 CLT: 15.3.0.0.1.1708646388 Xcode: N/A Rosetta 2: false

mdempsky commented 4 months ago

I'm also getting the "cp: invalid option -- 'c'" error. I hacked around the issue by temporarily replacing /opt/homebrew/Cellar/coreutils/9.5/libexec/gnubin/cp with a symlink to /bin/cp, and then restoring the original after brew install emacs-plus finished.

% brew config
HOMEBREW_VERSION: 4.3.6
ORIGIN: https://github.com/Homebrew/brew
HEAD: e8430b25a1d1321f32e5093d62b57b5cb7cfb3c3
Last commit: 6 days ago
Core tap JSON: 22 Jun 04:33 UTC
Core cask tap JSON: 22 Jun 04:33 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 3.3.3 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.3/bin/ruby
CPU: octa-core 64-bit arm_ibiza
Clang: 16.0.0 build 1600
Git: 2.39.4 => /Applications/Xcode-beta.app/Contents/Developer/usr/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 15.0-arm64
CLT: 16.0.0.0.1.1717710328
Xcode: 16.0 => /Applications/Xcode-beta.app/Contents/Developer
Rosetta 2: false
d12frosted commented 4 months ago

The issue with cp should be fixed in the latest release of homebrew. Update it and try again.

https://github.com/d12frosted/homebrew-emacs-plus/issues/688#issuecomment-2186413911

Closing the issue as original is unrelated to currently discussed issues; the original one doesn't seem to manifest anymore; and the new one is already fixed.