-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Fix grep build breakage #571
Fix grep build breakage #571
Conversation
For consistency with LIBRARY_PATH and CPATH appending, we should also append to LDFLAGS at build-time, to ensure that the same version of gcc and its libs are used throughout the build.
I found that on my system, I had a different incompatible version of grep from a plan9 installation on my PATH that was superseding the builtin grep on one of my Macs. This explains why the `with-native-comp` build was failing on one of my Macs but not the other - the Mac with the successful emacs-plus@28 `with-native-comp` build only had the built-in version of grep on its PATH. Adding GNU grep as a build-time dependency will include it in the `gnubin` directory, which is prepended to the PATH in each formula. I've also added an explicit PATH prepending step for each of the GNU build-time dependencies. This indicates the coupling of those dependencies with the `gnubin` PATH prepending. Related to d12frosted#555 and d12frosted#556
@@ -36,6 +36,7 @@ class EmacsPlusAT28 < EmacsBase | |||
depends_on "autoconf" => :build | |||
depends_on "gnu-sed" => :build | |||
depends_on "gnu-tar" => :build | |||
depends_on "grep" => :build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@d12frosted I wonder if it may be worth explicitly adding all the autoconf GNU dependencies (perhaps in a future PR?) to cover this scenario better, where users may have different incompatible versions of these tools in their PATH before usr/bin/
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think yes. Ideally I would love to find a way to use homebrew superenv
(e.g. default environment) which has everything properly configured. But path injection requires custom environment and hence all these issues 😢
@@ -36,6 +36,7 @@ class EmacsPlusAT28 < EmacsBase | |||
depends_on "autoconf" => :build | |||
depends_on "gnu-sed" => :build | |||
depends_on "gnu-tar" => :build | |||
depends_on "grep" => :build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think yes. Ideally I would love to find a way to use homebrew superenv
(e.g. default environment) which has everything properly configured. But path injection requires custom environment and hence all these issues 😢
@@ -156,6 +158,8 @@ def install | |||
args << "--with-xwidgets" if build.with? "xwidgets" | |||
|
|||
ENV.prepend_path "PATH", Formula["gnu-sed"].opt_libexec/"gnubin" | |||
ENV.prepend_path "PATH", Formula["gnu-tar"].opt_libexec/"gnubin" | |||
ENV.prepend_path "PATH", Formula["grep"].opt_libexec/"gnubin" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment from #573 regarding this line.
Replaced by #573 and #574