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

Fails to use homebrew make when installed as gmake #459

Closed
3 tasks done
cdlm opened this issue Apr 29, 2022 · 3 comments · Fixed by #460
Closed
3 tasks done

Fails to use homebrew make when installed as gmake #459

cdlm opened this issue Apr 29, 2022 · 3 comments · Fixed by #460
Assignees

Comments

@cdlm
Copy link

cdlm commented Apr 29, 2022

  • 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

emacs-plus@29 recently started failing to rebuild, but my symptoms were different from #455 (I'm on M1 and it was stopping with failed to run make and no details.

What happened (include command output)

$ brew install --verbose  emacs-plus@29 --with-nobu417-big-sur-icon  --with-native-comp
Command output

Sorry, my successful build (see below) overwrote the log 😅
Will have to re-run a failing build to record it again (later this weekend, if you really need it).
But this would fail as if make failed on launch, with no further output.

I have GNU Make 4.3 installed from homebrew, but visible only as gmake in the path; I'm guessing the build was finding /usr/bin/make which is BSD Make and fails. Apparently there were recent changes about how environment is handled? Because the above command was working fine until about the same time as #455 started happening.

Anyway, I solved the problem by re-running the build with an extended $PATH as advised by brew info make, suggesting the formula should ensure it has a GNU make or somehow falls back to gmake?

$ PATH="/opt/homebrew/opt/make/libexec/gnubin:$PATH" brew install --verbose  emacs-plus@29 --with-nobu417-big-sur-icon  --with-native-comp

Output of brew config

$ brew config
HOMEBREW_VERSION: 3.4.9-25-g2c0bd31
ORIGIN: https://github.com/Homebrew/brew
HEAD: 2c0bd31d687497ad423ebe11bcdc34cca6a48bdc
Last commit: 57 minutes ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 0ceeffe34f55e1d4a14902d0db6f9a998abf0d97
Core tap last commit: 59 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_BROWSER: open
HOMEBREW_CASK_OPTS: ["--fontdir=~/Library/Fonts/homebrew"]
HOMEBREW_CORE_GIT_REMOTE: https://github.com/Homebrew/homebrew-core
HOMEBREW_EDITOR: ee!
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 13.1.6 build 1316
Git: 2.36.0 => /opt/homebrew/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.3.1-arm64
CLT: 13.3.1.0.1.1648687083
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: "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/damien/.pyenv/shims/python3.10-config
  /Users/damien/.pyenv/shims/python-config
  /Users/damien/.pyenv/shims/python3-config
  /usr/local/CrossPack-AVR/bin/libusb-config

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  emacs-plus@28
  mpv

Warning: Homebrew's "sbin" was not found in your PATH but you have installed
formulae that put executables in /opt/homebrew/sbin.
Consider setting your PATH for example like so:
  echo 'export PATH="/opt/homebrew/sbin:$PATH"' >> ~/.zshrc
@d12frosted
Copy link
Owner

Hey, thanks for the report.

Here is potential fix - #460. Would be glad if you test it without any PATH modifications (e.g. they way it was when build was failing).

You can do that by executing the following (assuming you have jq installed):

$ cd $(brew tap-info --json d12frosted/emacs-plus | jq -r '.[0].path')
$ git fetch
$ git switch fix/dependency-on-gnu-make
$ brew uninstall emacs-plus@29
$ brew install --verbose  emacs-plus@29 --with-nobu417-big-sur-icon  --with-native-comp

@cdlm
Copy link
Author

cdlm commented Apr 29, 2022

Yup, that seems to fix it 👍🏻

d12frosted added a commit that referenced this issue Apr 29, 2022
@d12frosted
Copy link
Owner

@cdlm thanks for checking this out. Merged.

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.

2 participants