Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not install Emacs 28 #466

Open
3 tasks done
jidicula opened this issue May 16, 2022 · 27 comments · Fixed by #468
Open
3 tasks done

Could not install Emacs 28 #466

jidicula opened this issue May 16, 2022 · 27 comments · Fixed by #468
Assignees

Comments

@jidicula
Copy link
Contributor

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

  • run brew update and try to reproduce the issue again
  • run brew doctor, fix all issues and try to reproduce your issue again
  • run brew config and brew doctor and include their output

What you were trying to do

Install emacs 28. Note that this is unrelated to the other issue I submitted.

What happened (include command output)

$ brew install emacs-plus@28 --with-elrumo2-icon --with-mailutils --with-xwidgets --with-native-comp --with-imagemagick --with-no-frame-refocus
Command output

==> Downloading https://ftp.gnu.org/gnu/emacs/emacs-28.1.tar.xz
Already downloaded: /Users/johanan/Library/Caches/Homebrew/downloads/81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz
==> Installing emacs-plus@28 from d12frosted/emacs-plus
==> Patching
==> Applying no-frame-refocus-cocoa.patch
patching file src/frame.c
Hunk #1 succeeded at 2118 (offset 62 lines).
==> Applying fix-window-role.patch
patching file src/nsterm.m
Hunk #1 succeeded at 8583 (offset -185 lines).
==> Applying system-appearance.patch
patching file src/frame.h
patching file src/nsfns.m
Hunk #1 succeeded at 1315 (offset 59 lines).
patching file src/nsterm.m
Hunk #1 succeeded at 1878 (offset -11 lines).
Hunk #2 succeeded at 5389 (offset -6 lines).
Hunk #3 succeeded at 5635 (offset -6 lines).
Hunk #4 succeeded at 5685 (offset -6 lines).
Hunk #5 succeeded at 5911 (offset -6 lines).
Hunk #6 succeeded at 8916 (offset 14 lines).
Hunk #7 succeeded at 10072 (offset 14 lines).
==> Applying fix-MAC_LIBS-inference-on-Intel.patch
patching file configure.ac
Hunk #1 succeeded at 3843 (offset -282 lines).
==> ImageMagick PKG_CONFIG_PATH:
/opt/homebrew/opt/imagemagick/lib/pkgconfig
==> ./autogen.sh
==> ./configure --enable-locallisppath=/opt/homebrew/share/emacs/site-lisp --inf
Last 15 lines from /Users/johanan/Library/Logs/Homebrew/emacs-plus@28/02.configure:
--with-xml2
--with-gnutls
--with-native-compilation
--without-dbus
--with-imagemagick
--with-modules
--with-rsvg
--without-pop
--with-xwidgets
--with-ns
--disable-ns-self-contained

configure: WARNING: unrecognized options: --disable-dependency-tracking
usage: ls [-dlmnpqrstuFQ] [file ...]
configure: error: working directory cannot be determined
tr: ambiguous translation
tr: ambiguous translation

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

Output of brew config

$ brew config
HOMEBREW_VERSION: 3.4.11-39-g8a5f664
ORIGIN: https://github.com/Homebrew/brew
HEAD: 8a5f6645b8bde6d38b78936f23ce2acf94ff3a6a
Last commit: 23 minutes ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 089b5e66806ec196e1f760decd0d994da223bdee
Core tap last commit: 33 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_CORE_GIT_REMOTE: https://github.com/Homebrew/homebrew-core
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.MQ5Ez9zd4o/org.xquartz:0
HOMEBREW_EDITOR: /usr/bin/env emacs
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 13.1.6 build 1316
Git: 2.36.1 => /opt/homebrew/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.3.1-arm64
CLT: 13.4.0.0.1.1651278267
Xcode: N/A
Rosetta 2: false

Output of brew doctor

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed kegs have no formulae!
This means they were either deleted or installed manually.
You should find replacements for the following formulae:
  szip

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  [email protected]

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
  /Users/johanan/.pyenv/shims/python3.10-config
  /Users/johanan/.pyenv/shims/python3.9-config
  /Users/johanan/.pyenv/shims/python-config
  /Users/johanan/.pyenv/shims/python3-config
  /Users/johanan/.pyenv/shims/python3.8-config
@d12frosted
Copy link
Owner

Hey,

Looks like this one has the same root cause as #465. In this case it's related to ls. Since ls is not used by formula directly, I am not sure how to properly fix that, but you should be able to workaround it in the same way you did it with #465. Just install coreutils and prepend them to the PATH.

Meanwhile will think about better solution.

@jidicula
Copy link
Contributor Author

jidicula commented May 17, 2022

Good call, I added coreutils to my PATH and got past this error... and hit another, this time with awk 😖

==> Downloading https://ftp.gnu.org/gnu/emacs/emacs-28.1.tar.xz
Already downloaded: /Users/johanan/Library/Caches/Homebrew/downloads/81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz
==> Installing emacs-plus@28 from d12frosted/emacs-plus
==> Patching
==> Applying no-frame-refocus-cocoa.patch
patching file src/frame.c
Hunk #1 succeeded at 2118 (offset 62 lines).
==> Applying fix-window-role.patch
patching file src/nsterm.m
Hunk #1 succeeded at 8583 (offset -185 lines).
==> Applying system-appearance.patch
patching file src/frame.h
patching file src/nsfns.m
Hunk #1 succeeded at 1315 (offset 59 lines).
patching file src/nsterm.m
Hunk #1 succeeded at 1878 (offset -11 lines).
Hunk #2 succeeded at 5389 (offset -6 lines).
Hunk #3 succeeded at 5635 (offset -6 lines).
Hunk #4 succeeded at 5685 (offset -6 lines).
Hunk #5 succeeded at 5911 (offset -6 lines).
Hunk #6 succeeded at 8916 (offset 14 lines).
Hunk #7 succeeded at 10072 (offset 14 lines).
==> Applying fix-MAC_LIBS-inference-on-Intel.patch
patching file configure.ac
Hunk #1 succeeded at 3843 (offset -282 lines).
==> ImageMagick PKG_CONFIG_PATH: 
/opt/homebrew/opt/imagemagick/lib/pkgconfig
==> ./autogen.sh
==> ./configure --enable-locallisppath=/opt/homebrew/share/emacs/site-lisp --inf
Last 15 lines from /Users/johanan/Library/Logs/Homebrew/emacs-plus@28/02.configure:
config.status: creating lwlib/Makefile
config.status: creating lisp/Makefile
config.status: creating leim/Makefile
config.status: creating nextstep/Makefile
config.status: creating nt/Makefile
config.status: creating test/Makefile
config.status: creating admin/charsets/Makefile
config.status: creating admin/unidata/Makefile
config.status: creating admin/grammars/Makefile
config.status: creating src/config.h
awk: char class too large; increase Reclass.spans size
 source ./confLWEDyx/defines.awk:371
 context is
	vwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t >>>  (]|$)/ <<<  {
config.status: error: could not create src/config.h

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

Brew-installing awk (rather than using the system awk in macOS seems to get past this though.

@d12frosted
Copy link
Owner

😮 so many things to install; thank you for sharing

@jidicula
Copy link
Contributor Author

next build failure involves Apple gzip, brew installing that seems to resolve it, though, and the build succeeds now! 🎉

==> gmake
==> gmake install
Last 15 lines from /Users/johanan/Library/Logs/Homebrew/emacs-plus@28/04.gmake:
usage: gzip [-vcD] [-1-9] [file ...]
usage: gzip [-vcD] [-1-9] [file ...]
usage: gzip [-vcD] [-1-9] [file ...]
usage: gzip [-vcD] [-1-9] [file ...]
usage: gzip [-vcD] [-1-9] [file ...]
usage: gzip [-vcD] [-1-9] [file ...]
usage: gzip [-vcD] [-1-9] [file ...]
usage: gzip [-vcD] [-1-9] [file ...]
usage: gzip [-vcD] [-1-9] [file ...]
usage: gzip [-vcD] [-1-9] [file ...]
usage: gzip [-vcD] [-1-9] [file ...]
usage: gzip [-vcD] [-1-9] [file ...]
usage: gzip [-vcD] [-1-9] [file ...]
usage: gzip [-vcD] [-1-9] [file ...]
gmake: *** [Makefile:605: install-arch-indep] Error 1

jidicula added a commit to jidicula/dotfiles that referenced this issue May 17, 2022
d12frosted added a commit that referenced this issue May 17, 2022
d12frosted added a commit that referenced this issue May 17, 2022
Fixes #466 and #465

This kind of nullifies drawbacks of using standard env as it appends
critical stuff the beginning of PATH (e.g. prepends) and still allows
us to access it later to bake it in Emacs.app/Info.plist file.
d12frosted added a commit that referenced this issue May 17, 2022
Fixes #466 and #465

This kind of nullifies drawbacks of using standard env as it appends
critical stuff the beginning of PATH (e.g. prepends) and still allows
us to access it later to bake it in Emacs.app/Info.plist file.
d12frosted added a commit that referenced this issue May 17, 2022
Fixes #466 and #465

This kind of nullifies drawbacks of using standard env as it appends
critical stuff the beginning of PATH (e.g. prepends) and still allows
us to access it later to bake it in Emacs.app/Info.plist file.
@d12frosted
Copy link
Owner

So I've prepared a (possible) fix - #468. I would be grateful if you test it locally after you revert you changes to PATH. Basically, you can do the following (assuming jq is installed):

  1. cd $(brew tap-info --json d12frosted/emacs-plus | jq -r '.[0].path') && git switch fix/stdenv-build
  2. brew install emacs-plus@28 [OPTIONS].

Thank you in advance :)

@d12frosted
Copy link
Owner

Since that PR makes sense in general and the build is green, I will merge it in ~12 hours, so I have more room for being responsive if this change breaks someone. Still, your testing results would be much appreciated 🙏

@jidicula
Copy link
Contributor Author

jidicula commented May 17, 2022

Hmm, no luck - it still fails with the tar error I saw first. I commented out the relevant PATH prepends for GNU tools and ensured that I had the latest changes from your branch too - currently checked out to 3a0c8b5 .

@d12frosted
Copy link
Owner

Thanks for giving it a try. I guess with tar it's because I need to modify PATH a little bit earlier as downloading and unpacking happens before install function is invoked. Alright, tomorrow with try to move it earlier.

In case you feel bored, you can try to install gnu-tar, add it to PATH and see if everything else is working. I mean, ls and awk are used during build, so I expect them to work now.

@jidicula
Copy link
Contributor Author

jidicula commented May 17, 2022

Oh ok, I just tried on your patch with gnu-tar on my PATH but no coreutils in PATH and it still failed with the previous ls error 😦

==> ./configure --enable-locallisppath=/opt/homebrew/share/emacs/site-lisp --inf
Last 15 lines from /Users/johanan/Library/Logs/Homebrew/emacs-plus@28/02.configure:
--with-xml2
--with-gnutls
--with-native-compilation
--without-dbus
--with-imagemagick
--with-modules
--with-rsvg
--without-pop
--with-xwidgets
--with-ns
--disable-ns-self-contained

configure: WARNING: unrecognized options: --disable-dependency-tracking
usage: ls [-dlmnpqrstuFQ] [file ...]
configure: error: working directory cannot be determined

@d12frosted
Copy link
Owner

Really strange. In this case I am not sure what's wrong. Gonna read some brew sources to better understand how they bake PATH. Thanks for testing though! Will come back once I have ideas.

P.S. Not merging that PR yet.

@d12frosted
Copy link
Owner

Ok, got another idea. TL;DR - please try building with 542f0c0. In case it doesn't work, run with --verbose flag and share output.

So there were two mistakes.

  1. Formulas that override built-in commands put binaries under bin directory with altered name (for example, tar => gtar). Binaries with original name reside in libexec/gnubin directory. So one of the changes in my latest commit is to append these gnubin directories to the PATH in addition to bin.
  2. Some of the utilities (like tar) are used before install function is invoked. But we need proper tar sooner. That's why I also moved PATH setup to initialisation phase.

While I was playing with this, I added few debug lines in various places:

p ENV['PATH']
system "which", "tar"
system "which", "ls"

Basically, I want to see what these binaries resolve to. If you build with --verbose flag, you might notice output from system calls. And actually it provides more information on what command is run at each step.

"/opt/homebrew/opt/make/libexec/gnubin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:/opt/homebrew/opt/gnu-tar/libexec/gnubin:/opt/homebrew/opt/coreutils/libexec/gnubin:/opt/homebrew/opt/make/bin:/opt/homebrew/opt/autoconf/bin:/opt/homebrew/opt/gnu-sed/bin:/opt/homebrew/opt/gnu-tar/bin:/opt/homebrew/opt/awk/bin:/opt/homebrew/opt/coreutils/bin:/opt/homebrew/opt/pkg-config/bin:/opt/homebrew/opt/texinfo/bin:/opt/homebrew/opt/gnutls/bin:/opt/homebrew/opt/librsvg/bin:/opt/homebrew/opt/little-cms2/bin:/opt/homebrew/Library/Homebrew/shims/shared:/usr/bin:/bin:/usr/sbin:/sbin"
==> which tar
/opt/homebrew/opt/gnu-tar/libexec/gnubin/tar
==> which ls
/opt/homebrew/opt/coreutils/libexec/gnubin/ls
"/opt/homebrew/opt/make/libexec/gnubin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:/opt/homebrew/opt/gnu-tar/libexec/gnubin:/opt/homebrew/opt/coreutils/libexec/gnubin:/opt/homebrew/opt/make/bin:/opt/homebrew/opt/autoconf/bin:/opt/homebrew/opt/gnu-sed/bin:/opt/homebrew/opt/gnu-tar/bin:/opt/homebrew/opt/awk/bin:/opt/homebrew/opt/coreutils/bin:/opt/homebrew/opt/pkg-config/bin:/opt/homebrew/opt/texinfo/bin:/opt/homebrew/opt/gnutls/bin:/opt/homebrew/opt/librsvg/bin:/opt/homebrew/opt/little-cms2/bin:/opt/homebrew/Library/Homebrew/shims/shared:/usr/bin:/bin:/usr/sbin:/sbin"
==> which tar
/opt/homebrew/opt/gnu-tar/libexec/gnubin/tar
==> which ls
/opt/homebrew/opt/coreutils/libexec/gnubin/ls
==> Verifying checksum for 'fix-window-role.patch'
==> Verifying checksum for 'system-appearance.patch'
==> Downloading https://ftp.gnu.org/gnu/emacs/emacs-28.1.tar.xz
Already downloaded: /Users/d12frosted/Library/Caches/Homebrew/downloads/81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz
==> Verifying checksum for '81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz'
"/opt/homebrew/opt/make/libexec/gnubin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:/opt/homebrew/opt/gnu-tar/libexec/gnubin:/opt/homebrew/opt/coreutils/libexec/gnubin:/opt/homebrew/opt/make/bin:/opt/homebrew/opt/autoconf/bin:/opt/homebrew/opt/gnu-sed/bin:/opt/homebrew/opt/gnu-tar/bin:/opt/homebrew/opt/awk/bin:/opt/homebrew/opt/coreutils/bin:/opt/homebrew/opt/pkg-config/bin:/opt/homebrew/opt/texinfo/bin:/opt/homebrew/opt/gnutls/bin:/opt/homebrew/opt/librsvg/bin:/opt/homebrew/opt/little-cms2/bin:/opt/homebrew/Library/Homebrew/shims/shared:/usr/bin:/bin:/usr/sbin:/sbin"
==> which tar
==> which ls
"/opt/homebrew/opt/make/libexec/gnubin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:/opt/homebrew/opt/gnu-tar/libexec/gnubin:/opt/homebrew/opt/coreutils/libexec/gnubin:/opt/homebrew/opt/make/bin:/opt/homebrew/opt/autoconf/bin:/opt/homebrew/opt/gnu-sed/bin:/opt/homebrew/opt/gnu-tar/bin:/opt/homebrew/opt/awk/bin:/opt/homebrew/opt/coreutils/bin:/opt/homebrew/opt/pkg-config/bin:/opt/homebrew/opt/texinfo/bin:/opt/homebrew/opt/gnutls/bin:/opt/homebrew/opt/librsvg/bin:/opt/homebrew/opt/little-cms2/bin:/opt/homebrew/Library/Homebrew/shims/shared:/usr/bin:/bin:/usr/sbin:/sbin"
==> which tar
/opt/homebrew/opt/gnu-tar/libexec/gnubin/tar
==> which ls
/opt/homebrew/opt/coreutils/libexec/gnubin/ls
tar --extract --no-same-owner --file /Users/d12frosted/Library/Caches/Homebrew/downloads/81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz --directory /private/tmp/d20220518-40980-1ahtzd4
cp -pR /private/tmp/d20220518-40980-1ahtzd4/emacs-28.1/. /private/tmp/emacs-plus-local-20220518-40980-hh7xgr/emacs-28.1
chmod -Rf +w /private/tmp/d20220518-40980-1ahtzd4
==> Patching
cp -p /Users/d12frosted/Developer/homebrew-emacs-plus/patches/emacs-28/fix-window-role.patch /private/tmp/emacs-plus-local--patch-20220518-40980-1io6xj8/fix-window-role.patch
==> Applying fix-window-role.patch
patch -g 0 -f -p1 -i /private/tmp/emacs-plus-local--patch-20220518-40980-1io6xj8/fix-window-role.patch
patching file src/nsterm.m
Hunk #1 succeeded at 8583 (offset -185 lines).
cp -p /Users/d12frosted/Developer/homebrew-emacs-plus/patches/emacs-28/system-appearance.patch /private/tmp/emacs-plus-local--patch-20220518-40980-9e97e6/system-appearance.patch
==> Applying system-appearance.patch
patch -g 0 -f -p1 -i /private/tmp/emacs-plus-local--patch-20220518-40980-9e97e6/system-appearance.patch
patching file src/frame.h
patching file src/nsfns.m
Hunk #1 succeeded at 1315 (offset 59 lines).
patching file src/nsterm.m
Hunk #1 succeeded at 1878 (offset -11 lines).
Hunk #2 succeeded at 5389 (offset -6 lines).
Hunk #3 succeeded at 5635 (offset -6 lines).
Hunk #4 succeeded at 5685 (offset -6 lines).
Hunk #5 succeeded at 5911 (offset -6 lines).
Hunk #6 succeeded at 8916 (offset 14 lines).
Hunk #7 succeeded at 10072 (offset 14 lines).
"/opt/homebrew/opt/make/libexec/gnubin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:/opt/homebrew/opt/gnu-tar/libexec/gnubin:/opt/homebrew/opt/coreutils/libexec/gnubin:/opt/homebrew/opt/make/bin:/opt/homebrew/opt/autoconf/bin:/opt/homebrew/opt/gnu-sed/bin:/opt/homebrew/opt/gnu-tar/bin:/opt/homebrew/opt/awk/bin:/opt/homebrew/opt/coreutils/bin:/opt/homebrew/opt/pkg-config/bin:/opt/homebrew/opt/texinfo/bin:/opt/homebrew/opt/gnutls/bin:/opt/homebrew/opt/librsvg/bin:/opt/homebrew/opt/little-cms2/bin:/opt/homebrew/opt/icu4c/bin:/opt/homebrew/opt/sqlite/bin:/opt/homebrew/opt/[email protected]/bin:/opt/homebrew/opt/m4/bin:/opt/homebrew/Library/Homebrew/shims/shared:/Library/Apple/usr/bin:/Users/d12frosted/.config/bin:/Users/d12frosted/.local/bin:/Users/d12frosted/.nix-profile/bin:/opt/homebrew/opt/llvm/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/run/current-system/sw/bin:/nix/var/nix/profiles/default/bin:/usr/bin:/bin:/usr/sbin:/sbin"
==> which tar
/opt/homebrew/opt/gnu-tar/libexec/gnubin/tar
==> which ls
/opt/homebrew/opt/coreutils/libexec/gnubin/ls

Before my changes, ls was either system one or installed from nix. Now it works as expected.

The current code is quite dirty, just want to see if that works.

@jidicula
Copy link
Contributor Author

Still fails. Very odd, it looks like it's still grabbing macOS tar instead of gnu-tar.

❯ brew install emacs-plus@28 --verbose --with-elrumo2-icon --with-mailutils --with-xwidgets --with-native-comp --with-imagemagick --with-no-frame-refocus 
"/opt/homebrew/opt/make/libexec/gnubin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:/opt/homebrew/opt/gnu-tar/libexec/gnubin:/opt/homebrew/opt/coreutils/libexec/gnubin:/opt/homebrew/opt/make/bin:/opt/homebrew/opt/autoconf/bin:/opt/homebrew/opt/gnu-sed/bin:/opt/homebrew/opt/gnu-tar/bin:/opt/homebrew/opt/awk/bin:/opt/homebrew/opt/coreutils/bin:/opt/homebrew/opt/pkg-config/bin:/opt/homebrew/opt/texinfo/bin:/opt/homebrew/opt/gnutls/bin:/opt/homebrew/opt/librsvg/bin:/opt/homebrew/opt/little-cms2/bin:/opt/homebrew/opt/imagemagick/bin:/opt/homebrew/opt/dbus/bin:/opt/homebrew/opt/mailutils/bin:/opt/homebrew/opt/gcc/bin:/opt/homebrew/opt/jpeg/bin:/opt/homebrew/Library/Homebrew/shims/shared:/usr/bin:/bin:/usr/sbin:/sbin"
==> which tar
/opt/homebrew/opt/gnu-tar/libexec/gnubin/tar
==> which ls
/opt/homebrew/opt/coreutils/libexec/gnubin/ls
"/opt/homebrew/opt/make/libexec/gnubin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:/opt/homebrew/opt/gnu-tar/libexec/gnubin:/opt/homebrew/opt/coreutils/libexec/gnubin:/opt/homebrew/opt/make/bin:/opt/homebrew/opt/autoconf/bin:/opt/homebrew/opt/gnu-sed/bin:/opt/homebrew/opt/gnu-tar/bin:/opt/homebrew/opt/awk/bin:/opt/homebrew/opt/coreutils/bin:/opt/homebrew/opt/pkg-config/bin:/opt/homebrew/opt/texinfo/bin:/opt/homebrew/opt/gnutls/bin:/opt/homebrew/opt/librsvg/bin:/opt/homebrew/opt/little-cms2/bin:/opt/homebrew/opt/imagemagick/bin:/opt/homebrew/opt/dbus/bin:/opt/homebrew/opt/mailutils/bin:/opt/homebrew/opt/gcc/bin:/opt/homebrew/opt/jpeg/bin:/opt/homebrew/Library/Homebrew/shims/shared:/usr/bin:/bin:/usr/sbin:/sbin"
==> which tar
/opt/homebrew/opt/gnu-tar/libexec/gnubin/tar
==> which ls
/opt/homebrew/opt/coreutils/libexec/gnubin/ls
==> Verifying checksum for 'no-frame-refocus-cocoa.patch'
==> Verifying checksum for 'fix-window-role.patch'
==> Verifying checksum for 'system-appearance.patch'
==> Verifying checksum for 'fix-MAC_LIBS-inference-on-Intel.patch'
==> Verifying checksum for 'elrumo2.icns'
==> Downloading https://ftp.gnu.org/gnu/emacs/emacs-28.1.tar.xz
Already downloaded: /Users/johanan/Library/Caches/Homebrew/downloads/81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz
==> Verifying checksum for '81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz'
==> Installing emacs-plus@28 from d12frosted/emacs-plus
"/opt/homebrew/opt/make/libexec/gnubin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:/opt/homebrew/opt/gnu-tar/libexec/gnubin:/opt/homebrew/opt/coreutils/libexec/gnubin:/opt/homebrew/opt/make/bin:/opt/homebrew/opt/autoconf/bin:/opt/homebrew/opt/gnu-sed/bin:/opt/homebrew/opt/gnu-tar/bin:/opt/homebrew/opt/awk/bin:/opt/homebrew/opt/coreutils/bin:/opt/homebrew/opt/pkg-config/bin:/opt/homebrew/opt/texinfo/bin:/opt/homebrew/opt/gnutls/bin:/opt/homebrew/opt/librsvg/bin:/opt/homebrew/opt/little-cms2/bin:/opt/homebrew/opt/imagemagick/bin:/opt/homebrew/opt/dbus/bin:/opt/homebrew/opt/mailutils/bin:/opt/homebrew/opt/gcc/bin:/opt/homebrew/opt/jpeg/bin:/opt/homebrew/Library/Homebrew/shims/shared:/usr/bin:/bin:/usr/sbin:/sbin"
==> which tar
/opt/homebrew/opt/gnu-tar/libexec/gnubin/tar
==> which ls
/opt/homebrew/opt/coreutils/libexec/gnubin/ls
"/opt/homebrew/opt/make/libexec/gnubin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:/opt/homebrew/opt/gnu-tar/libexec/gnubin:/opt/homebrew/opt/coreutils/libexec/gnubin:/opt/homebrew/opt/make/bin:/opt/homebrew/opt/autoconf/bin:/opt/homebrew/opt/gnu-sed/bin:/opt/homebrew/opt/gnu-tar/bin:/opt/homebrew/opt/awk/bin:/opt/homebrew/opt/coreutils/bin:/opt/homebrew/opt/pkg-config/bin:/opt/homebrew/opt/texinfo/bin:/opt/homebrew/opt/gnutls/bin:/opt/homebrew/opt/librsvg/bin:/opt/homebrew/opt/little-cms2/bin:/opt/homebrew/opt/imagemagick/bin:/opt/homebrew/opt/dbus/bin:/opt/homebrew/opt/mailutils/bin:/opt/homebrew/opt/gcc/bin:/opt/homebrew/opt/jpeg/bin:/opt/homebrew/Library/Homebrew/shims/shared:/usr/bin:/bin:/usr/sbin:/sbin"
==> which tar
==> which ls
"/opt/homebrew/opt/make/libexec/gnubin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:/opt/homebrew/opt/gnu-tar/libexec/gnubin:/opt/homebrew/opt/coreutils/libexec/gnubin:/opt/homebrew/opt/make/bin:/opt/homebrew/opt/autoconf/bin:/opt/homebrew/opt/gnu-sed/bin:/opt/homebrew/opt/gnu-tar/bin:/opt/homebrew/opt/awk/bin:/opt/homebrew/opt/coreutils/bin:/opt/homebrew/opt/pkg-config/bin:/opt/homebrew/opt/texinfo/bin:/opt/homebrew/opt/gnutls/bin:/opt/homebrew/opt/librsvg/bin:/opt/homebrew/opt/little-cms2/bin:/opt/homebrew/opt/imagemagick/bin:/opt/homebrew/opt/dbus/bin:/opt/homebrew/opt/mailutils/bin:/opt/homebrew/opt/gcc/bin:/opt/homebrew/opt/jpeg/bin:/opt/homebrew/Library/Homebrew/shims/shared:/usr/bin:/bin:/usr/sbin:/sbin"
==> which tar
/opt/homebrew/opt/gnu-tar/libexec/gnubin/tar
==> which ls
/opt/homebrew/opt/coreutils/libexec/gnubin/ls
tar --extract --no-same-owner --file /Users/johanan/Library/Caches/Homebrew/downloads/81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz --directory /private/tmp/d20220518-30247-1vq0rtb
tar: unknown letter e
tar: unknown letter a
usage: tar {crtx}[PRTfgkmpuvz] [archive] file1 file2...
Error: Failure while executing; `tar --extract --no-same-owner --file /Users/johanan/Library/Caches/Homebrew/downloads/81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz --directory /private/tmp/d20220518-30247-1vq0rtb` exited with 1. Here's the output:
tar: unknown letter e
tar: unknown letter a
usage: tar {crtx}[PRTfgkmpuvz] [archive] file1 file2...

@d12frosted
Copy link
Owner

I see. Thanks for testing. Not sure why it picks incorrect tar. Will dig into it later.

@d12frosted
Copy link
Owner

The thing is that I can't reproduce the error. What I tried:

  1. Set the PATH to /opt/homebrew/opt/llvm/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin (basically default macOS PATH + homebrew basic stuff).
  2. Revert my changes.
  3. Install the package using build script in the root of the project.

To help with that, I've created the following script:

#!/usr/bin/env bash

export PATH=/opt/homebrew/opt/llvm/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin

./build 28 --verbose

And then after running it I see the following output:

"/opt/homebrew/Library/Homebrew/shims/shared:/usr/bin:/bin:/usr/sbin:/sbin"
==> which tar
/usr/bin/tar
==> which ls
/bin/ls
"/opt/homebrew/Library/Homebrew/shims/shared:/usr/bin:/bin:/usr/sbin:/sbin"
==> which tar
/usr/bin/tar
==> which ls
/bin/ls
==> Verifying checksum for 'fix-window-role.patch'
==> Verifying checksum for 'system-appearance.patch'
==> Downloading https://ftp.gnu.org/gnu/emacs/emacs-28.1.tar.xz
Already downloaded: /Users/d12frosted/Library/Caches/Homebrew/downloads/81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz
==> Verifying checksum for '81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz'
"/opt/homebrew/Library/Homebrew/shims/shared:/usr/bin:/bin:/usr/sbin:/sbin"
==> which tar
==> which ls
"/opt/homebrew/Library/Homebrew/shims/shared:/usr/bin:/bin:/usr/sbin:/sbin"
==> which tar
/usr/bin/tar
==> which ls
/bin/ls
tar --extract --no-same-owner --file /Users/d12frosted/Library/Caches/Homebrew/downloads/81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz --directory /private/tmp/d20220518-12034-b0gqyp
cp -pR /private/tmp/d20220518-12034-b0gqyp/emacs-28.1/. /private/tmp/emacs-plus-local-20220518-12034-zudi08/emacs-28.1
chmod -Rf +w /private/tmp/d20220518-12034-b0gqyp
==> Patching
cp -p /Users/d12frosted/Developer/homebrew-emacs-plus/patches/emacs-28/fix-window-role.patch /private/tmp/emacs-plus-local--patch-20220518-12034-10dn4qd/fix-window-role.patch
==> Applying fix-window-role.patch
patch -g 0 -f -p1 -i /private/tmp/emacs-plus-local--patch-20220518-12034-10dn4qd/fix-window-role.patch
patching file src/nsterm.m
Hunk #1 succeeded at 8583 (offset -185 lines).
cp -p /Users/d12frosted/Developer/homebrew-emacs-plus/patches/emacs-28/system-appearance.patch /private/tmp/emacs-plus-local--patch-20220518-12034-1hidpig/system-appearance.patch
==> Applying system-appearance.patch
patch -g 0 -f -p1 -i /private/tmp/emacs-plus-local--patch-20220518-12034-1hidpig/system-appearance.patch
patching file src/frame.h
patching file src/nsfns.m
Hunk #1 succeeded at 1315 (offset 59 lines).
patching file src/nsterm.m
Hunk #1 succeeded at 1878 (offset -11 lines).
Hunk #2 succeeded at 5389 (offset -6 lines).
Hunk #3 succeeded at 5635 (offset -6 lines).
Hunk #4 succeeded at 5685 (offset -6 lines).
Hunk #5 succeeded at 5911 (offset -6 lines).
Hunk #6 succeeded at 8916 (offset 14 lines).
Hunk #7 succeeded at 10072 (offset 14 lines).
"/opt/homebrew/opt/icu4c/bin:/opt/homebrew/opt/sqlite/bin:/opt/homebrew/opt/[email protected]/bin:/opt/homebrew/opt/readline/bin:/opt/homebrew/opt/m4/bin:/opt/homebrew/opt/libffi/bin:/opt/homebrew/opt/texinfo/bin:/opt/homebrew/Library/Homebrew/shims/shared:/opt/homebrew/opt/llvm/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/Library/Apple/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
==> which tar
/usr/bin/tar
==> which ls
/bin/ls

I wonder if brew somehow resolves tar differently 🤔

@d12frosted
Copy link
Owner

So basically, this is what brew tries to do:

tar --extract --no-same-owner --file /Users/d12frosted/Library/Caches/Homebrew/downloads/81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz --directory /private/tmp/d20220518-12034-b0gqyp

I tried with different tar binaries:

$ /usr/bin/tar --extract --no-same-owner --file /Users/d12frosted/Library/Caches/Homebrew/downloads/81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz --directory "$(mktemp -d)"
# works

$ /opt/homebrew/opt/gnu-tar/libexec/gnubin/tar --extract --no-same-owner --file /Users/d1
2frosted/Library/Caches/Homebrew/downloads/81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz --directory "$(mktemp -d)"
# works

(notice that I changed --directory output to $(mktemp -d))

How does it work for you?

Also, what is your PATH and shell?

@d12frosted
Copy link
Owner

Ah, I also checked man of bsdtar (/usr/bin/tar is just a link to /usr/bin/bsdtar) and it seems that --extract is valid option. See https://www.mankier.com/1/bsdtar#-x

d12frosted added a commit that referenced this issue May 19, 2022
Fixes #466 and #465

This kind of nullifies drawbacks of using standard env as it appends
critical stuff the beginning of PATH (e.g. prepends) and still allows
us to access it later to bake it in Emacs.app/Info.plist file.
d12frosted added a commit that referenced this issue May 19, 2022
Fixes #466 and #465

This kind of nullifies drawbacks of using standard env as it appends
critical stuff the beginning of PATH (e.g. prepends) and still allows
us to access it later to bake it in Emacs.app/Info.plist file.
@d12frosted
Copy link
Owner

Just FYI, I've updated the PR a little bit. But I still have not managed to reproduce the issue.

d12frosted added a commit that referenced this issue May 20, 2022
Fixes #466 and #465

This kind of nullifies drawbacks of using standard env as it appends
critical stuff the beginning of PATH (e.g. prepends) and still allows
us to access it later to bake it in Emacs.app/Info.plist file.
@jidicula
Copy link
Contributor Author

So basically, this is what brew tries to do:

tar --extract --no-same-owner --file /Users/d12frosted/Library/Caches/Homebrew/downloads/81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz --directory /private/tmp/d20220518-12034-b0gqyp

I tried with different tar binaries:

$ /usr/bin/tar --extract --no-same-owner --file /Users/d12frosted/Library/Caches/Homebrew/downloads/81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz --directory "$(mktemp -d)"
# works

$ /opt/homebrew/opt/gnu-tar/libexec/gnubin/tar --extract --no-same-owner --file /Users/d1
2frosted/Library/Caches/Homebrew/downloads/81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz --directory "$(mktemp -d)"
# works

(notice that I changed --directory output to $(mktemp -d))

How does it work for you?

Also, what is your PATH and shell?

Sorry for the delay, some stuff came up and I couldn't devote any time to this.

Ok so running both of those commands (/usr/bin/tar and /opt/homebrew/opt/gnu-tar/libexec/gnubin/tar) work.

PATH is /Users/johanan/.rbenv/shims:/opt/homebrew/Cellar/pyenv-virtualenv/1.1.5/shims:/Users/johanan/.pyenv/shims:/opt/homebrew/opt/coreutils/libexec/gnubin:/opt/homebrew/opt/gnu-tar/libexec/gnubin:/Users/johanan/.dotnet/tools:/Users/johanan/.rbenv/shims:/Users/johanan/.rbenv/bin:/Users/johanan/.nodenv/shims:/Users/johanan/.nodenv/bin:/Users/johanan/.pyenv/bin:/usr/local/opt/openjdk@11/bin:/Users/johanan/.local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin:/Users/johanan/.local/bin:/Users/johanan/go/bin:/bin:/usr/local/plan9/bin

My shell is zsh with oh-my-zsh plugins.

@jidicula
Copy link
Contributor Author

Just FYI, I've updated the PR a little bit. But I still have not managed to reproduce the issue.

No luck with this either, very mystifying. It's odd that it's not being surfaced in CI either :/

❯ brew install emacs-plus@28 --verbose --with-elrumo2-icon --with-mailutils --with-xwidgets --with-native-comp --with-imagemagick --with-no-frame-refocus
PATH value was changed to:
/opt/homebrew/opt/make/libexec/gnubin
/opt/homebrew/opt/autoconf/libexec/gnubin
/opt/homebrew/opt/gnu-sed/libexec/gnubin
/opt/homebrew/opt/gnu-tar/libexec/gnubin
/opt/homebrew/opt/awk/libexec/gnubin
/opt/homebrew/opt/coreutils/libexec/gnubin
/opt/homebrew/opt/pkg-config/libexec/gnubin
/opt/homebrew/opt/texinfo/libexec/gnubin
/opt/homebrew/opt/gnutls/libexec/gnubin
/opt/homebrew/opt/librsvg/libexec/gnubin
/opt/homebrew/opt/little-cms2/libexec/gnubin
/opt/homebrew/opt/jansson/libexec/gnubin
/opt/homebrew/opt/imagemagick/libexec/gnubin
/opt/homebrew/opt/dbus/libexec/gnubin
/opt/homebrew/opt/mailutils/libexec/gnubin
/opt/homebrew/opt/libgccjit/libexec/gnubin
/opt/homebrew/opt/gcc/libexec/gnubin
/opt/homebrew/opt/gmp/libexec/gnubin
/opt/homebrew/opt/jpeg/libexec/gnubin
/opt/homebrew/opt/zlib/libexec/gnubin
/opt/homebrew/opt/make/bin
/opt/homebrew/opt/autoconf/bin
/opt/homebrew/opt/gnu-sed/bin
/opt/homebrew/opt/gnu-tar/bin
/opt/homebrew/opt/awk/bin
/opt/homebrew/opt/coreutils/bin
/opt/homebrew/opt/pkg-config/bin
/opt/homebrew/opt/texinfo/bin
/opt/homebrew/opt/gnutls/bin
/opt/homebrew/opt/librsvg/bin
/opt/homebrew/opt/little-cms2/bin
/opt/homebrew/opt/jansson/bin
/opt/homebrew/opt/imagemagick/bin
/opt/homebrew/opt/dbus/bin
/opt/homebrew/opt/mailutils/bin
/opt/homebrew/opt/libgccjit/bin
/opt/homebrew/opt/gcc/bin
/opt/homebrew/opt/gmp/bin
/opt/homebrew/opt/jpeg/bin
/opt/homebrew/opt/zlib/bin
/opt/homebrew/Library/Homebrew/shims/shared
/usr/bin
/bin
/usr/sbin
/sbin
==> which tar
/opt/homebrew/opt/gnu-tar/libexec/gnubin/tar
==> which ls
/opt/homebrew/opt/coreutils/libexec/gnubin/ls
PATH value was changed to:
/opt/homebrew/opt/make/libexec/gnubin
/opt/homebrew/opt/autoconf/libexec/gnubin
/opt/homebrew/opt/gnu-sed/libexec/gnubin
/opt/homebrew/opt/gnu-tar/libexec/gnubin
/opt/homebrew/opt/awk/libexec/gnubin
/opt/homebrew/opt/coreutils/libexec/gnubin
/opt/homebrew/opt/pkg-config/libexec/gnubin
/opt/homebrew/opt/texinfo/libexec/gnubin
/opt/homebrew/opt/gnutls/libexec/gnubin
/opt/homebrew/opt/librsvg/libexec/gnubin
/opt/homebrew/opt/little-cms2/libexec/gnubin
/opt/homebrew/opt/jansson/libexec/gnubin
/opt/homebrew/opt/imagemagick/libexec/gnubin
/opt/homebrew/opt/dbus/libexec/gnubin
/opt/homebrew/opt/mailutils/libexec/gnubin
/opt/homebrew/opt/libgccjit/libexec/gnubin
/opt/homebrew/opt/gcc/libexec/gnubin
/opt/homebrew/opt/gmp/libexec/gnubin
/opt/homebrew/opt/jpeg/libexec/gnubin
/opt/homebrew/opt/zlib/libexec/gnubin
/opt/homebrew/opt/make/bin
/opt/homebrew/opt/autoconf/bin
/opt/homebrew/opt/gnu-sed/bin
/opt/homebrew/opt/gnu-tar/bin
/opt/homebrew/opt/awk/bin
/opt/homebrew/opt/coreutils/bin
/opt/homebrew/opt/pkg-config/bin
/opt/homebrew/opt/texinfo/bin
/opt/homebrew/opt/gnutls/bin
/opt/homebrew/opt/librsvg/bin
/opt/homebrew/opt/little-cms2/bin
/opt/homebrew/opt/jansson/bin
/opt/homebrew/opt/imagemagick/bin
/opt/homebrew/opt/dbus/bin
/opt/homebrew/opt/mailutils/bin
/opt/homebrew/opt/libgccjit/bin
/opt/homebrew/opt/gcc/bin
/opt/homebrew/opt/gmp/bin
/opt/homebrew/opt/jpeg/bin
/opt/homebrew/opt/zlib/bin
/opt/homebrew/Library/Homebrew/shims/shared
/usr/bin
/bin
/usr/sbin
/sbin
==> which tar
/opt/homebrew/opt/gnu-tar/libexec/gnubin/tar
==> which ls
/opt/homebrew/opt/coreutils/libexec/gnubin/ls
==> Verifying checksum for 'no-frame-refocus-cocoa.patch'
==> Verifying checksum for 'fix-window-role.patch'
==> Verifying checksum for 'system-appearance.patch'
==> Verifying checksum for 'fix-MAC_LIBS-inference-on-Intel.patch'
==> Verifying checksum for 'elrumo2.icns'
==> Downloading https://ftp.gnu.org/gnu/emacs/emacs-28.1.tar.xz
/opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/3.4.11-87-g555cf33\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 12.4\)\ curl/7.79.1 --header Accept-Language:\ en --fail --connect-timeout 15 --retry 3 --location --remote-time --output /Users/johanan/Library/Caches/Homebrew/downloads/81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz.incomplete https://ftp.gnu.org/gnu/emacs/emacs-28.1.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 45.4M  100 45.4M    0     0  37.6M      0  0:00:01  0:00:01 --:--:-- 37.8M
==> Verifying checksum for '81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz'
==> Installing emacs-plus@28 from d12frosted/emacs-plus
PATH value was changed to:
/opt/homebrew/opt/make/libexec/gnubin
/opt/homebrew/opt/autoconf/libexec/gnubin
/opt/homebrew/opt/gnu-sed/libexec/gnubin
/opt/homebrew/opt/gnu-tar/libexec/gnubin
/opt/homebrew/opt/awk/libexec/gnubin
/opt/homebrew/opt/coreutils/libexec/gnubin
/opt/homebrew/opt/pkg-config/libexec/gnubin
/opt/homebrew/opt/texinfo/libexec/gnubin
/opt/homebrew/opt/gnutls/libexec/gnubin
/opt/homebrew/opt/librsvg/libexec/gnubin
/opt/homebrew/opt/little-cms2/libexec/gnubin
/opt/homebrew/opt/jansson/libexec/gnubin
/opt/homebrew/opt/imagemagick/libexec/gnubin
/opt/homebrew/opt/dbus/libexec/gnubin
/opt/homebrew/opt/mailutils/libexec/gnubin
/opt/homebrew/opt/libgccjit/libexec/gnubin
/opt/homebrew/opt/gcc/libexec/gnubin
/opt/homebrew/opt/gmp/libexec/gnubin
/opt/homebrew/opt/jpeg/libexec/gnubin
/opt/homebrew/opt/zlib/libexec/gnubin
/opt/homebrew/opt/make/bin
/opt/homebrew/opt/autoconf/bin
/opt/homebrew/opt/gnu-sed/bin
/opt/homebrew/opt/gnu-tar/bin
/opt/homebrew/opt/awk/bin
/opt/homebrew/opt/coreutils/bin
/opt/homebrew/opt/pkg-config/bin
/opt/homebrew/opt/texinfo/bin
/opt/homebrew/opt/gnutls/bin
/opt/homebrew/opt/librsvg/bin
/opt/homebrew/opt/little-cms2/bin
/opt/homebrew/opt/jansson/bin
/opt/homebrew/opt/imagemagick/bin
/opt/homebrew/opt/dbus/bin
/opt/homebrew/opt/mailutils/bin
/opt/homebrew/opt/libgccjit/bin
/opt/homebrew/opt/gcc/bin
/opt/homebrew/opt/gmp/bin
/opt/homebrew/opt/jpeg/bin
/opt/homebrew/opt/zlib/bin
/opt/homebrew/Library/Homebrew/shims/shared
/usr/bin
/bin
/usr/sbin
/sbin
==> which tar
/opt/homebrew/opt/gnu-tar/libexec/gnubin/tar
==> which ls
/opt/homebrew/opt/coreutils/libexec/gnubin/ls
PATH value was changed to:
/opt/homebrew/opt/make/libexec/gnubin
/opt/homebrew/opt/autoconf/libexec/gnubin
/opt/homebrew/opt/gnu-sed/libexec/gnubin
/opt/homebrew/opt/gnu-tar/libexec/gnubin
/opt/homebrew/opt/awk/libexec/gnubin
/opt/homebrew/opt/coreutils/libexec/gnubin
/opt/homebrew/opt/pkg-config/libexec/gnubin
/opt/homebrew/opt/texinfo/libexec/gnubin
/opt/homebrew/opt/gnutls/libexec/gnubin
/opt/homebrew/opt/librsvg/libexec/gnubin
/opt/homebrew/opt/little-cms2/libexec/gnubin
/opt/homebrew/opt/jansson/libexec/gnubin
/opt/homebrew/opt/imagemagick/libexec/gnubin
/opt/homebrew/opt/dbus/libexec/gnubin
/opt/homebrew/opt/mailutils/libexec/gnubin
/opt/homebrew/opt/libgccjit/libexec/gnubin
/opt/homebrew/opt/gcc/libexec/gnubin
/opt/homebrew/opt/gmp/libexec/gnubin
/opt/homebrew/opt/jpeg/libexec/gnubin
/opt/homebrew/opt/zlib/libexec/gnubin
/opt/homebrew/opt/make/bin
/opt/homebrew/opt/autoconf/bin
/opt/homebrew/opt/gnu-sed/bin
/opt/homebrew/opt/gnu-tar/bin
/opt/homebrew/opt/awk/bin
/opt/homebrew/opt/coreutils/bin
/opt/homebrew/opt/pkg-config/bin
/opt/homebrew/opt/texinfo/bin
/opt/homebrew/opt/gnutls/bin
/opt/homebrew/opt/librsvg/bin
/opt/homebrew/opt/little-cms2/bin
/opt/homebrew/opt/jansson/bin
/opt/homebrew/opt/imagemagick/bin
/opt/homebrew/opt/dbus/bin
/opt/homebrew/opt/mailutils/bin
/opt/homebrew/opt/libgccjit/bin
/opt/homebrew/opt/gcc/bin
/opt/homebrew/opt/gmp/bin
/opt/homebrew/opt/jpeg/bin
/opt/homebrew/opt/zlib/bin
/opt/homebrew/Library/Homebrew/shims/shared
/usr/bin
/bin
/usr/sbin
/sbin
==> which tar
/opt/homebrew/opt/gnu-tar/libexec/gnubin/tar
==> which ls
/opt/homebrew/opt/coreutils/libexec/gnubin/ls
tar --extract --no-same-owner --file /Users/johanan/Library/Caches/Homebrew/downloads/81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz --directory /private/tmp/d20220521-582-15ndip3
tar: unknown letter e
tar: unknown letter a
usage: tar {crtx}[PRTfgkmpuvz] [archive] file1 file2...
Error: Failure while executing; `tar --extract --no-same-owner --file /Users/johanan/Library/Caches/Homebrew/downloads/81fae34a5dbd8042af6a70512829e9d4a11e31e7067bf4da5c5bded31f757129--emacs-28.1.tar.xz --directory /private/tmp/d20220521-582-15ndip3` exited with 1. Here's the output:
tar: unknown letter e
tar: unknown letter a
usage: tar {crtx}[PRTfgkmpuvz] [archive] file1 file2...

I can't seem to google when the

tar: unknown letter e
tar: unknown letter a
usage: tar {crtx}[PRTfgkmpuvz] [archive] file1 file2...

error message is emitted either - do you have any idea? It doesn't look like what tar (either gnu-tar or macOS tar) emits when you pass it a bad flag:

❯ tar -q 
tar: Must specify one of -c, -r, -t, -u, -x

and

❯ gtar -q
gtar: invalid option -- 'q'
Try 'gtar --help' or 'gtar --usage' for more information.

@d12frosted
Copy link
Owner

Sorry for the delay, some stuff came up and I couldn't devote any time to this.

Sure, no worries. Plus I understand that it requires uninstalling Emacs and messing around with your environment. That's why I really advice you to use build script from the repository as it allows you to test installation without uninstalling Emacs 😸 Basically it just creates a formula called emacs-plus-local, which can be built alongside with emacs-plus. It fails during linking obviously, but we are testing how it builds.

Also you can create a script like this:

#!/usr/bin/env bash

export PATH=YOUR_PATH

./build 28 --verbose [OPTIONS]

That will help you with testing in specific PATH setup.

error message is emitted either - do you have any idea? It doesn't look like what tar (either gnu-tar or macOS tar) emits when you pass it a bad flag:

That's interesting observation. I have no ideas right now, but might be a good lead. Will take a look later.

d12frosted added a commit that referenced this issue May 26, 2022
Fixes #466 and #465

This kind of nullifies drawbacks of using standard env as it appends
critical stuff the beginning of PATH (e.g. prepends) and still allows
us to access it later to bake it in Emacs.app/Info.plist file.
@d12frosted d12frosted reopened this May 26, 2022
@d12frosted
Copy link
Owner

Was closed automatically because I've merged that PR since it makes sense to have it anyways. But we know that your issue is not fixed yet. Will continue investigation.

@vmsp
Copy link

vmsp commented Dec 25, 2022

Just had this exact same issue. I commented everything I was adding to $PATH and managed to go through with the installation. No idea what was actually breaking it.

@FledgeXu
Copy link

FledgeXu commented Jan 26, 2024

I know it's an old issue, but in 2024 I still have the same issue.
brew config:

brew config                                                                                  15:29:36
HOMEBREW_VERSION: 4.2.5
ORIGIN: https://github.com/Homebrew/brew
HEAD: 9c8374d3b78c4f531c5c2c0d272d1fb1f1b60d70
Last commit: 5 days ago
Core tap JSON: 26 Jan 20:27 UTC
Core cask tap JSON: 26 Jan 20:27 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 12
Homebrew Ruby: 3.1.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: dodeca-core 64-bit arm_blizzard_avalanche
Clang: 15.0.0 build 1500
Git: 2.43.0 => /opt/homebrew/bin/git
Curl: 8.4.0 => /usr/bin/curl
macOS: 14.3-arm64
CLT: 15.1.0.0.1.1700200546
Xcode: 15.2
Rosetta 2: false

brew install emacs-plus:

brew install emacs-plus                                                                      15:31:18
==> Fetching d12frosted/emacs-plus/emacs-plus@29
==> Downloading https://ftp.gnu.org/gnu/emacs/emacs-29.2.tar.xz
################################################################################################### 100.0%
==> Installing emacs-plus@29 from d12frosted/emacs-plus
tar: unknown letter e
tar: unknown letter a
usage: tar {crtx}[PRTfgkmpuvz] [archive] file1 file2...
Error: Failure while executing; `/usr/bin/env tar --extract --no-same-owner --file /Users/fledge/Library/Caches/Homebrew/downloads/ba2a3a250dc781c2b13aa38d3de79d1f72a2e3ed854c0b41384349edd43169df--emacs-29.2.tar.xz --directory /private/tmp/d20240126-16077-lsrphh` exited with 1. Here's the output:
tar: unknown letter e
tar: unknown letter a
usage: tar {crtx}[PRTfgkmpuvz] [archive] file1 file2...

env:

TERM_SESSION_ID=w0t0p0:A8B24C3C-45A7-4272-A2C7-9E793A9B8F93
SSH_AUTH_SOCK=/Users/fledge/.gnupg/S.gpg-agent.ssh
LC_TERMINAL_VERSION=3.4.23
COLORFGBG=15;0
ITERM_PROFILE=Default
XPC_FLAGS=0x0
LANG=en_US.UTF-8
PWD=/Users/fledge
SHELL=/bin/zsh
__CFBundleIdentifier=com.googlecode.iterm2
TERM_PROGRAM_VERSION=3.4.23
TERM_PROGRAM=iTerm.app
PATH=/Users/fledge/.cargo/bin:/Users/fledge/.local/bin:/Users/fledge/.local/bin/depot_tools:/Users/fledge/.opam/coq-sf/bin:/Users/fledge/.sdkman/candidates/java/current/bin:/Users/fledge/.local/share/zinit/polaris/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/fledge/.cargo/bin:/Users/fledge/Developer/plan9/plan9port/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin
LC_TERMINAL=iTerm2
COLORTERM=truecolor
COMMAND_MODE=unix2003
TERM=xterm-256color
HOME=/Users/fledge
TMPDIR=/var/folders/b_/wmkk4tkd75x5f7dwql6jk_t00000gn/T/
USER=fledge
XPC_SERVICE_NAME=0
LOGNAME=fledge
ITERM_SESSION_ID=w0t0p0:A8B24C3C-45A7-4272-A2C7-9E793A9B8F93
__CF_USER_TEXT_ENCODING=0x0:0:0
SHLVL=1
OLDPWD=/Users/fledge
HOMEBREW_PREFIX=/opt/homebrew
HOMEBREW_CELLAR=/opt/homebrew/Cellar
HOMEBREW_REPOSITORY=/opt/homebrew
MANPATH=/opt/homebrew/share/man::
INFOPATH=/opt/homebrew/share/info:
P9K_TTY=old
_P9K_TTY=/dev/ttys002
ZPFX=/Users/fledge/.local/share/zinit/polaris
ZSH_CACHE_DIR=/Users/fledge/.cache/zinit
PMSPEC=0uUpiPsf
P9K_SSH=0
_P9K_SSH_TTY=/dev/ttys002
PLAN9=/Users/fledge/Developer/plan9/plan9port
GPG_TTY=not a tty
FZF_DEFAULT_COMMAND=rg --files --hidden
SDKMAN_DIR=/Users/fledge/.sdkman
SDKMAN_CANDIDATES_API=https://api.sdkman.io/2
SDKMAN_PLATFORM=darwinarm64
SDKMAN_CANDIDATES_DIR=/Users/fledge/.sdkman/candidates
JAVA_HOME=/Users/fledge/.sdkman/candidates/java/current
NVM_DIR=/Users/fledge/.nvm
OPAM_SWITCH_PREFIX=/Users/fledge/.opam/coq-sf
CAML_LD_LIBRARY_PATH=/Users/fledge/.opam/coq-sf/lib/stublibs:/Users/fledge/.opam/coq-sf/lib/ocaml/stublibs:/Users/fledge/.opam/coq-sf/lib/ocaml
OCAML_TOPLEVEL_PATH=/Users/fledge/.opam/coq-sf/lib/toplevel
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
_=/usr/bin/env

@d12frosted
Copy link
Owner

@FledgeXu you can try removing the following line by brew edit emacs-plus@28 and installing again.

Let me know if it helps.

@d12frosted
Copy link
Owner

Ah als, @FledgeXu please share the log of installing with --verbose flag 🙏

@FledgeXu
Copy link

@d12frosted
Here is the log of brew install emacs-plus --verbose:

~/.config/emacs ❯ brew install emacs-plus --verbose                                              01:20:51
==> Downloading https://formulae.brew.sh/api/formula.jws.json
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 4334k  100 4334k    0     0  21.6M      0 --:--:-- --:--:-- --:--:-- 21.7M
PATH value was changed to:
/opt/homebrew/opt/make/libexec/gnubin
/opt/homebrew/opt/autoconf/libexec/gnubin
/opt/homebrew/opt/gnu-sed/libexec/gnubin
/opt/homebrew/opt/gnu-tar/libexec/gnubin
/opt/homebrew/opt/grep/libexec/gnubin
/opt/homebrew/opt/awk/libexec/gnubin
/opt/homebrew/opt/coreutils/libexec/gnubin
/opt/homebrew/opt/pkg-config/libexec/gnubin
/opt/homebrew/opt/texinfo/libexec/gnubin
/opt/homebrew/opt/xz/libexec/gnubin
/opt/homebrew/opt/gnutls/libexec/gnubin
/opt/homebrew/opt/librsvg/libexec/gnubin
/opt/homebrew/opt/little-cms2/libexec/gnubin
/opt/homebrew/opt/jansson/libexec/gnubin
/opt/homebrew/opt/tree-sitter/libexec/gnubin
/opt/homebrew/Cellar/imagemagick/7.1.1-27/libexec/gnubin
/opt/homebrew/Cellar/dbus/1.14.10/libexec/gnubin
/opt/homebrew/Cellar/mailutils/3.17/libexec/gnubin
/opt/homebrew/opt/make/bin
/opt/homebrew/opt/autoconf/bin
/opt/homebrew/opt/gnu-sed/bin
/opt/homebrew/opt/gnu-tar/bin
/opt/homebrew/opt/grep/bin
/opt/homebrew/opt/awk/bin
/opt/homebrew/opt/coreutils/bin
/opt/homebrew/opt/pkg-config/bin
/opt/homebrew/opt/texinfo/bin
/opt/homebrew/opt/xz/bin
/opt/homebrew/opt/gnutls/bin
/opt/homebrew/opt/librsvg/bin
/opt/homebrew/opt/little-cms2/bin
/opt/homebrew/opt/jansson/bin
/opt/homebrew/opt/tree-sitter/bin
/opt/homebrew/opt/imagemagick/bin
/opt/homebrew/opt/dbus/bin
/opt/homebrew/opt/mailutils/bin
/opt/homebrew/Library/Homebrew/shims/shared
/usr/bin
/bin
/usr/sbin
/sbin
==> which tar
/opt/homebrew/opt/gnu-tar/libexec/gnubin/tar
==> which ls
/opt/homebrew/opt/coreutils/libexec/gnubin/ls
==> which grep
/opt/homebrew/opt/grep/libexec/gnubin/grep
PATH value was changed to:
/opt/homebrew/opt/make/libexec/gnubin
/opt/homebrew/opt/autoconf/libexec/gnubin
/opt/homebrew/opt/gnu-sed/libexec/gnubin
/opt/homebrew/opt/gnu-tar/libexec/gnubin
/opt/homebrew/opt/grep/libexec/gnubin
/opt/homebrew/opt/awk/libexec/gnubin
/opt/homebrew/opt/coreutils/libexec/gnubin
/opt/homebrew/opt/pkg-config/libexec/gnubin
/opt/homebrew/opt/texinfo/libexec/gnubin
/opt/homebrew/opt/xz/libexec/gnubin
/opt/homebrew/opt/gnutls/libexec/gnubin
/opt/homebrew/opt/librsvg/libexec/gnubin
/opt/homebrew/opt/little-cms2/libexec/gnubin
/opt/homebrew/opt/jansson/libexec/gnubin
/opt/homebrew/opt/tree-sitter/libexec/gnubin
/opt/homebrew/Cellar/imagemagick/7.1.1-27/libexec/gnubin
/opt/homebrew/Cellar/dbus/1.14.10/libexec/gnubin
/opt/homebrew/Cellar/mailutils/3.17/libexec/gnubin
/opt/homebrew/opt/make/bin
/opt/homebrew/opt/autoconf/bin
/opt/homebrew/opt/gnu-sed/bin
/opt/homebrew/opt/gnu-tar/bin
/opt/homebrew/opt/grep/bin
/opt/homebrew/opt/awk/bin
/opt/homebrew/opt/coreutils/bin
/opt/homebrew/opt/pkg-config/bin
/opt/homebrew/opt/texinfo/bin
/opt/homebrew/opt/xz/bin
/opt/homebrew/opt/gnutls/bin
/opt/homebrew/opt/librsvg/bin
/opt/homebrew/opt/little-cms2/bin
/opt/homebrew/opt/jansson/bin
/opt/homebrew/opt/tree-sitter/bin
/opt/homebrew/opt/imagemagick/bin
/opt/homebrew/opt/dbus/bin
/opt/homebrew/opt/mailutils/bin
/opt/homebrew/Library/Homebrew/shims/shared
/usr/bin
/bin
/usr/sbin
/sbin
==> which tar
/opt/homebrew/opt/gnu-tar/libexec/gnubin/tar
==> which ls
/opt/homebrew/opt/coreutils/libexec/gnubin/ls
==> which grep
/opt/homebrew/opt/grep/libexec/gnubin/grep
==> Downloading https://formulae.brew.sh/api/cask.jws.json
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1054k  100 1054k    0     0  10.4M      0 --:--:-- --:--:-- --:--:-- 10.5M
==> Fetching dependencies for d12frosted/emacs-plus/emacs-plus@29: libidn2
==> Fetching libidn2
==> Downloading https://ghcr.io/v2/homebrew/core/libidn2/manifests/2.3.7
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.2.5\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 14.3\)\ curl/8.4.0 --header Accept-Language:\ en --fail --retry 3 --header Accept:\ application/vnd.oci.image.index.v1+json --header Authorization:\ Bearer\ QQ== --remote-time --output /Users/fledge/Library/Caches/Homebrew/downloads/45d1d4d2930c4782bf53e761a1c0166cd8a40f4193ac8c44e86f0b6708e80354--libidn2-2.3.7.bottle_manifest.json.incomplete --location https://ghcr.io/v2/homebrew/core/libidn2/manifests/2.3.7
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  9254  100  9254    0     0  84769      0 --:--:-- --:--:-- --:--:-- 84899
==> Downloading https://ghcr.io/v2/homebrew/core/libidn2/blobs/sha256:670f6ed3768acde8ce10b5dcfc88fef69cea994ff84491b253a5e818cd4f9a1b
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.2.5\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 14.3\)\ curl/8.4.0 --header Accept-Language:\ en --fail --retry 3 --header Authorization:\ Bearer\ QQ== --remote-time --output /Users/fledge/Library/Caches/Homebrew/downloads/2ceaa2a1a4e3bc2f1c97775dfe945c1b94e5576a61a4f8888ec24251463a75bc--libidn2--2.3.7.arm64_sonoma.bottle.tar.gz.incomplete --location https://ghcr.io/v2/homebrew/core/libidn2/blobs/sha256:670f6ed3768acde8ce10b5dcfc88fef69cea994ff84491b253a5e818cd4f9a1b
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  329k  100  329k    0     0  1153k      0 --:--:-- --:--:-- --:--:-- 1153k
==> Verifying checksum for '2ceaa2a1a4e3bc2f1c97775dfe945c1b94e5576a61a4f8888ec24251463a75bc--libidn2--2.3.7.arm64_sonoma.bottle.tar.gz'
==> Fetching d12frosted/emacs-plus/emacs-plus@29
==> Verifying checksum for 'fix-window-role.patch'
==> Verifying checksum for 'system-appearance.patch'
==> Verifying checksum for 'round-undecorated-frame.patch'
==> Downloading https://ftp.gnu.org/gnu/emacs/emacs-29.2.tar.xz
Already downloaded: /Users/fledge/Library/Caches/Homebrew/downloads/ba2a3a250dc781c2b13aa38d3de79d1f72a2e3ed854c0b41384349edd43169df--emacs-29.2.tar.xz
==> Verifying checksum for 'ba2a3a250dc781c2b13aa38d3de79d1f72a2e3ed854c0b41384349edd43169df--emacs-29.2.tar.xz'
==> Installing emacs-plus@29 from d12frosted/emacs-plus
PATH value was changed to:
/opt/homebrew/opt/make/libexec/gnubin
/opt/homebrew/opt/autoconf/libexec/gnubin
/opt/homebrew/opt/gnu-sed/libexec/gnubin
/opt/homebrew/opt/gnu-tar/libexec/gnubin
/opt/homebrew/opt/grep/libexec/gnubin
/opt/homebrew/opt/awk/libexec/gnubin
/opt/homebrew/opt/coreutils/libexec/gnubin
/opt/homebrew/opt/pkg-config/libexec/gnubin
/opt/homebrew/opt/texinfo/libexec/gnubin
/opt/homebrew/opt/xz/libexec/gnubin
/opt/homebrew/opt/gnutls/libexec/gnubin
/opt/homebrew/opt/librsvg/libexec/gnubin
/opt/homebrew/opt/little-cms2/libexec/gnubin
/opt/homebrew/opt/jansson/libexec/gnubin
/opt/homebrew/opt/tree-sitter/libexec/gnubin
/opt/homebrew/Cellar/imagemagick/7.1.1-27/libexec/gnubin
/opt/homebrew/Cellar/dbus/1.14.10/libexec/gnubin
/opt/homebrew/Cellar/mailutils/3.17/libexec/gnubin
/opt/homebrew/opt/make/bin
/opt/homebrew/opt/autoconf/bin
/opt/homebrew/opt/gnu-sed/bin
/opt/homebrew/opt/gnu-tar/bin
/opt/homebrew/opt/grep/bin
/opt/homebrew/opt/awk/bin
/opt/homebrew/opt/coreutils/bin
/opt/homebrew/opt/pkg-config/bin
/opt/homebrew/opt/texinfo/bin
/opt/homebrew/opt/xz/bin
/opt/homebrew/opt/gnutls/bin
/opt/homebrew/opt/librsvg/bin
/opt/homebrew/opt/little-cms2/bin
/opt/homebrew/opt/jansson/bin
/opt/homebrew/opt/tree-sitter/bin
/opt/homebrew/opt/imagemagick/bin
/opt/homebrew/opt/dbus/bin
/opt/homebrew/opt/mailutils/bin
/opt/homebrew/Library/Homebrew/shims/shared
/usr/bin
/bin
/usr/sbin
/sbin
==> which tar
/opt/homebrew/opt/gnu-tar/libexec/gnubin/tar
==> which ls
/opt/homebrew/opt/coreutils/libexec/gnubin/ls
==> which grep
/opt/homebrew/opt/grep/libexec/gnubin/grep
==> Installing dependencies for d12frosted/emacs-plus/emacs-plus@29: libidn2
rm /opt/homebrew/bin/idn2
rm /opt/homebrew/include/idn2.h
rm /opt/homebrew/lib/libidn2.0.dylib
rm /opt/homebrew/lib/libidn2.a
rm /opt/homebrew/lib/libidn2.dylib
rm /opt/homebrew/lib/pkgconfig/libidn2.pc
rm /opt/homebrew/share/gtk-doc
uninfo /opt/homebrew/share/info/libidn2.info
rm /opt/homebrew/share/info/libidn2.info
rm /opt/homebrew/share/locale/cs/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/da/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/de/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/eo/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/es/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/fi/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/fr/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/fur/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/hr/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/hu/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/id/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/it/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/ja/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/ka/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/ko/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/nl/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/pl/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/pt_BR/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/ro/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/ru/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/sr/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/sv/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/uk/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/vi/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/locale/zh_CN/LC_MESSAGES/libidn2.mo
rm /opt/homebrew/share/man/man1/idn2.1
rm /opt/homebrew/share/man/man3/idn2_check_version.3
rm /opt/homebrew/share/man/man3/idn2_free.3
rm /opt/homebrew/share/man/man3/idn2_lookup_u8.3
rm /opt/homebrew/share/man/man3/idn2_lookup_ul.3
rm /opt/homebrew/share/man/man3/idn2_register_u8.3
rm /opt/homebrew/share/man/man3/idn2_register_ul.3
rm /opt/homebrew/share/man/man3/idn2_strerror.3
rm /opt/homebrew/share/man/man3/idn2_strerror_name.3
rm /opt/homebrew/share/man/man3/idn2_to_ascii_4i.3
rm /opt/homebrew/share/man/man3/idn2_to_ascii_4i2.3
rm /opt/homebrew/share/man/man3/idn2_to_ascii_4z.3
rm /opt/homebrew/share/man/man3/idn2_to_ascii_8z.3
rm /opt/homebrew/share/man/man3/idn2_to_ascii_lz.3
rm /opt/homebrew/share/man/man3/idn2_to_unicode_44i.3
rm /opt/homebrew/share/man/man3/idn2_to_unicode_4z4z.3
rm /opt/homebrew/share/man/man3/idn2_to_unicode_8z4z.3
rm /opt/homebrew/share/man/man3/idn2_to_unicode_8z8z.3
rm /opt/homebrew/share/man/man3/idn2_to_unicode_8zlz.3
rm /opt/homebrew/share/man/man3/idn2_to_unicode_lzlz.3
==> Installing d12frosted/emacs-plus/emacs-plus@29 dependency: libidn2
==> Downloading https://ghcr.io/v2/homebrew/core/libidn2/manifests/2.3.7
Already downloaded: /Users/fledge/Library/Caches/Homebrew/downloads/45d1d4d2930c4782bf53e761a1c0166cd8a40f4193ac8c44e86f0b6708e80354--libidn2-2.3.7.bottle_manifest.json
==> Pouring libidn2--2.3.7.arm64_sonoma.bottle.tar.gz
/usr/bin/env tar --extract --no-same-owner --file /Users/fledge/Library/Caches/Homebrew/downloads/2ceaa2a1a4e3bc2f1c97775dfe945c1b94e5576a61a4f8888ec24251463a75bc--libidn2--2.3.7.arm64_sonoma.bottle.tar.gz --directory /private/tmp/d20240129-6627-83att1
/usr/bin/env cp -pR /private/tmp/d20240129-6627-83att1/libidn2/. /opt/homebrew/Cellar/libidn2
==> Finishing up
ln -s ../Cellar/libidn2/2.3.7/bin/idn2 idn2
ln -s ../Cellar/libidn2/2.3.7/include/idn2.h idn2.h
ln -s ../Cellar/libidn2/2.3.7/share/gtk-doc gtk-doc
ln -s ../../Cellar/libidn2/2.3.7/share/info/libidn2.info libidn2.info
info /opt/homebrew/share/info/libidn2.info
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/cs/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/da/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/de/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/eo/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/es/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/fi/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/fr/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/fur/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/hr/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/hu/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/id/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/it/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/ja/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/ka/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/ko/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/nl/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/pl/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/pt_BR/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/ro/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/ru/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/sr/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/sv/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/uk/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/vi/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../../Cellar/libidn2/2.3.7/share/locale/zh_CN/LC_MESSAGES/libidn2.mo libidn2.mo
ln -s ../../../Cellar/libidn2/2.3.7/share/man/man1/idn2.1 idn2.1
ln -s ../../../Cellar/libidn2/2.3.7/share/man/man3/idn2_check_version.3 idn2_check_version.3
ln -s ../../../Cellar/libidn2/2.3.7/share/man/man3/idn2_free.3 idn2_free.3
ln -s ../../../Cellar/libidn2/2.3.7/share/man/man3/idn2_lookup_u8.3 idn2_lookup_u8.3
ln -s ../../../Cellar/libidn2/2.3.7/share/man/man3/idn2_lookup_ul.3 idn2_lookup_ul.3
ln -s ../../../Cellar/libidn2/2.3.7/share/man/man3/idn2_register_u8.3 idn2_register_u8.3
ln -s ../../../Cellar/libidn2/2.3.7/share/man/man3/idn2_register_ul.3 idn2_register_ul.3
ln -s ../../../Cellar/libidn2/2.3.7/share/man/man3/idn2_strerror.3 idn2_strerror.3
ln -s ../../../Cellar/libidn2/2.3.7/share/man/man3/idn2_strerror_name.3 idn2_strerror_name.3
ln -s ../../../Cellar/libidn2/2.3.7/share/man/man3/idn2_to_ascii_4i.3 idn2_to_ascii_4i.3
ln -s ../../../Cellar/libidn2/2.3.7/share/man/man3/idn2_to_ascii_4i2.3 idn2_to_ascii_4i2.3
ln -s ../../../Cellar/libidn2/2.3.7/share/man/man3/idn2_to_ascii_4z.3 idn2_to_ascii_4z.3
ln -s ../../../Cellar/libidn2/2.3.7/share/man/man3/idn2_to_ascii_8z.3 idn2_to_ascii_8z.3
ln -s ../../../Cellar/libidn2/2.3.7/share/man/man3/idn2_to_ascii_lz.3 idn2_to_ascii_lz.3
ln -s ../../../Cellar/libidn2/2.3.7/share/man/man3/idn2_to_unicode_44i.3 idn2_to_unicode_44i.3
ln -s ../../../Cellar/libidn2/2.3.7/share/man/man3/idn2_to_unicode_4z4z.3 idn2_to_unicode_4z4z.3
ln -s ../../../Cellar/libidn2/2.3.7/share/man/man3/idn2_to_unicode_8z4z.3 idn2_to_unicode_8z4z.3
ln -s ../../../Cellar/libidn2/2.3.7/share/man/man3/idn2_to_unicode_8z8z.3 idn2_to_unicode_8z8z.3
ln -s ../../../Cellar/libidn2/2.3.7/share/man/man3/idn2_to_unicode_8zlz.3 idn2_to_unicode_8zlz.3
ln -s ../../../Cellar/libidn2/2.3.7/share/man/man3/idn2_to_unicode_lzlz.3 idn2_to_unicode_lzlz.3
ln -s ../Cellar/libidn2/2.3.7/lib/libidn2.0.dylib libidn2.0.dylib
ln -s ../Cellar/libidn2/2.3.7/lib/libidn2.a libidn2.a
ln -s ../Cellar/libidn2/2.3.7/lib/libidn2.dylib libidn2.dylib
ln -s ../../Cellar/libidn2/2.3.7/lib/pkgconfig/libidn2.pc libidn2.pc
==> Summary
🍺  /opt/homebrew/Cellar/libidn2/2.3.7: 80 files, 1MB
==> Installing d12frosted/emacs-plus/emacs-plus@29
PATH value was changed to:
/opt/homebrew/opt/make/libexec/gnubin
/opt/homebrew/opt/autoconf/libexec/gnubin
/opt/homebrew/opt/gnu-sed/libexec/gnubin
/opt/homebrew/opt/gnu-tar/libexec/gnubin
/opt/homebrew/opt/grep/libexec/gnubin
/opt/homebrew/opt/awk/libexec/gnubin
/opt/homebrew/opt/coreutils/libexec/gnubin
/opt/homebrew/opt/pkg-config/libexec/gnubin
/opt/homebrew/opt/texinfo/libexec/gnubin
/opt/homebrew/opt/xz/libexec/gnubin
/opt/homebrew/opt/gnutls/libexec/gnubin
/opt/homebrew/opt/librsvg/libexec/gnubin
/opt/homebrew/opt/little-cms2/libexec/gnubin
/opt/homebrew/opt/jansson/libexec/gnubin
/opt/homebrew/opt/tree-sitter/libexec/gnubin
/opt/homebrew/Cellar/imagemagick/7.1.1-27/libexec/gnubin
/opt/homebrew/Cellar/dbus/1.14.10/libexec/gnubin
/opt/homebrew/Cellar/mailutils/3.17/libexec/gnubin
/opt/homebrew/opt/make/bin
/opt/homebrew/opt/autoconf/bin
/opt/homebrew/opt/gnu-sed/bin
/opt/homebrew/opt/gnu-tar/bin
/opt/homebrew/opt/grep/bin
/opt/homebrew/opt/awk/bin
/opt/homebrew/opt/coreutils/bin
/opt/homebrew/opt/pkg-config/bin
/opt/homebrew/opt/texinfo/bin
/opt/homebrew/opt/xz/bin
/opt/homebrew/opt/gnutls/bin
/opt/homebrew/opt/librsvg/bin
/opt/homebrew/opt/little-cms2/bin
/opt/homebrew/opt/jansson/bin
/opt/homebrew/opt/tree-sitter/bin
/opt/homebrew/opt/imagemagick/bin
/opt/homebrew/opt/dbus/bin
/opt/homebrew/opt/mailutils/bin
/opt/homebrew/Library/Homebrew/shims/shared
/usr/bin
/bin
/usr/sbin
/sbin
==> which tar
/opt/homebrew/opt/gnu-tar/libexec/gnubin/tar
==> which ls
/opt/homebrew/opt/coreutils/libexec/gnubin/ls
==> which grep
/opt/homebrew/opt/grep/libexec/gnubin/grep
/usr/bin/env tar --extract --no-same-owner --file /Users/fledge/Library/Caches/Homebrew/downloads/ba2a3a250dc781c2b13aa38d3de79d1f72a2e3ed854c0b41384349edd43169df--emacs-29.2.tar.xz --directory /private/tmp/d20240129-7003-iqnv6i
tar: unknown letter e
tar: unknown letter a
usage: tar {crtx}[PRTfgkmpuvz] [archive] file1 file2...
Error: Failure while executing; `/usr/bin/env tar --extract --no-same-owner --file /Users/fledge/Library/Caches/Homebrew/downloads/ba2a3a250dc781c2b13aa38d3de79d1f72a2e3ed854c0b41384349edd43169df--emacs-29.2.tar.xz --directory /private/tmp/d20240129-7003-iqnv6i` exited with 1. Here's the output:
tar: unknown letter e
tar: unknown letter a
usage: tar {crtx}[PRTfgkmpuvz] [archive] file1 file2...

@FledgeXu
Copy link

After I commented the env :std, the "tar issue" is gone. However, I get a new issue:

==> Injecting PATH value to Emacs.app/Contents/Info.plist
Full PATH, including entries required for build: /opt/homebrew/opt/grep/libexec/gnubin:/opt/homebrew/opt/gnu-tar/libexec/gnubin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:/opt/homebrew/opt/make/libexec/gnubin:/opt/homebrew/opt/coreutils/libexec/gnubin:/opt/homebrew/opt/make/bin:/opt/homebrew/opt/autoconf/bin:/opt/homebrew/opt/gnu-sed/bin:/opt/homebrew/opt/gnu-tar/bin:/opt/homebrew/opt/grep/bin:/opt/homebrew/opt/awk/bin:/opt/homebrew/opt/coreutils/bin:/opt/homebrew/opt/pkg-config/bin:/opt/homebrew/opt/texinfo/bin:/opt/homebrew/opt/xz/bin:/opt/homebrew/opt/gnutls/bin:/opt/homebrew/opt/librsvg/bin:/opt/homebrew/opt/little-cms2/bin:/opt/homebrew/opt/tree-sitter/bin:/opt/homebrew/Library/Homebrew/shims/mac/super:/opt/homebrew/opt/gettext/bin:/opt/homebrew/opt/libidn2/bin:/opt/homebrew/opt/libtasn1/bin:/opt/homebrew/opt/nettle/bin:/opt/homebrew/opt/p11-kit/bin:/opt/homebrew/opt/openssl@3/bin:/opt/homebrew/opt/libevent/bin:/opt/homebrew/opt/libpng/bin:/opt/homebrew/opt/freetype/bin:/opt/homebrew/opt/fontconfig/bin:/opt/homebrew/opt/pcre2/bin:/opt/homebrew/opt/glib/bin:/opt/homebrew/opt/cairo/bin:/opt/homebrew/opt/jpeg-turbo/bin:/opt/homebrew/opt/lz4/bin:/opt/homebrew/opt/zstd/bin:/opt/homebrew/opt/libtiff/bin:/opt/homebrew/opt/gdk-pixbuf/bin:/opt/homebrew/opt/fribidi/bin:/opt/homebrew/opt/graphite2/bin:/opt/homebrew/opt/icu4c/bin:/opt/homebrew/opt/harfbuzz/bin:/opt/homebrew/opt/pango/bin:/usr/bin:/bin:/usr/sbin:/sbin
Error: An exception occurred within a child process:
  NoMethodError: undefined method `+' for nil:NilClass

Here is the full log: [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants