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

readline failed to build on 10.6 #1186

Open
foxscribe opened this issue Aug 12, 2024 · 2 comments
Open

readline failed to build on 10.6 #1186

foxscribe opened this issue Aug 12, 2024 · 2 comments

Comments

@foxscribe
Copy link

https://gist.github.com/foxscribe/8ca0aaf0f33644f5be95c19cd4eaeaf0

@mistydemeo
Copy link
Owner

Hmm, looks like it's trying to use a flag your compiler doesn't support. (I'd forgotten some users could be on an Xcode with no "real" GCC!) I'll see if we can convince readline not to add it.

@sevan
Copy link
Contributor

sevan commented Aug 20, 2024

Try making this change to your Library/Formula/readline.rb to sidestep the issue for now (not sure if it applies to Lion & more recent versions yet).

diff --git a/Library/Formula/readline.rb b/Library/Formula/readline.rb
index 30086d4f41..47e7235673 100644
--- a/Library/Formula/readline.rb
+++ b/Library/Formula/readline.rb
@@ -39,7 +39,7 @@ class Readline < Formula
     ENV.universal_binary
     # Since we don't set any CFLAGS, readline adds some
     # which break the build as they're not supported by GCC 4.2
-    ENV.append_to_cflags "-g -O2" if ENV.compiler == :gcc
+    ENV.append_to_cflags "-g -O2" if ENV.compiler == :gcc or MacOS.version == :snow_leopard
     system "./configure", "--prefix=#{prefix}", "--enable-multibyte"
     system "make", "install"
   end

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

No branches or pull requests

3 participants