From 9ead6bc2f8c408e31a092c02b478775927298a26 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Thu, 11 Jun 2015 13:30:40 -0700 Subject: [PATCH] Update CompilerSelectionError Fixes mistydemeo/tigerbrew#207. Fixes mistydemeo/tigerbrew#330. --- Library/Homebrew/exceptions.rb | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index 144f707688..0dc48f2344 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -457,11 +457,23 @@ end # the compilers available on the user's system class CompilerSelectionError < RuntimeError def initialize(formula) - super <<-EOS.undent - #{formula.full_name} cannot be built with any available compilers. - To install this formula, you may need to: - brew install gcc - EOS + if MacOS.version > :tiger + super <<-EOS.undent + #{formula.full_name} cannot be built with any available compilers. + To install this formula, you may need to: + brew install gcc + EOS + # Tiger doesn't ship with apple-gcc42, and this is required to build + # some software that doesn't build properly with FSF GCC. + else + super <<-EOS.undent + #{formula.full_name} cannot be built with any available compilers. + To install this formula, you may need to either: + brew install apple-gcc42 + or: + brew install gcc + EOS + end end end