diff options
| -rwxr-xr-x | Library/Homebrew/build.rb | 14 | ||||
| -rw-r--r-- | Library/Homebrew/exceptions.rb | 10 | ||||
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 6 | 
3 files changed, 15 insertions, 15 deletions
| diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb index 83dbe15cb..676d6f2cd 100755 --- a/Library/Homebrew/build.rb +++ b/Library/Homebrew/build.rb @@ -168,13 +168,15 @@ class Build            # want to record the stdlib for something that installs no            # dylibs.            stdlibs = Keg.new(f.prefix).detect_cxx_stdlibs -          # It's technically possible for the same lib to link to multiple -          # C++ stdlibs, but very bad news. Right now we don't track this -          # woeful scenario. +          # This currently only tracks a single C++ stdlib per dep, +          # though it's possible for different libs/executables in +          # a given formula to link to different ones.            stdlib_in_use = CxxStdlib.new(stdlibs.first, ENV.compiler) -          # This will raise and fail the build if there's an -          # incompatibility. -          stdlib_in_use.check_dependencies(f, deps) +          begin +            stdlib_in_use.check_dependencies(f, deps) +          rescue IncompatibleCxxStdlibs => e +            opoo e.message +          end            # This second check is recorded for checking dependencies,            # so executable are irrelevant at this point. If a piece diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index febff797a..24b9e706e 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -115,14 +115,8 @@ end  class IncompatibleCxxStdlibs < Homebrew::InstallationError    def initialize(f, dep, wrong, right)      super f, <<-EOS.undent -    #{f} dependency #{dep} was built with the following -    C++ standard library: #{wrong.type_string} (from #{wrong.compiler}) - -    This is incompatible with the standard library being used -    to build #{f}: #{right.type_string} (from #{right.compiler}) - -    Please reinstall #{dep} using a compatible compiler. -    hint: Check https://github.com/Homebrew/homebrew/wiki/C++-Standard-Libraries +    #{f} dependency #{dep} was built with a different C++ standard +    library (#{wrong.type_string} from #{wrong.compiler}). This could cause problems at runtime.      EOS    end  end diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 6d9e1f911..a2af3abd3 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -123,7 +123,11 @@ class FormulaInstaller          stdlibs = Keg.new(f.prefix).detect_cxx_stdlibs          stdlib_in_use = CxxStdlib.new(stdlibs.first, MacOS.default_compiler) -        stdlib_in_use.check_dependencies(f, f.recursive_dependencies) +        begin +          stdlib_in_use.check_dependencies(f, f.recursive_dependencies) +        rescue IncompatibleCxxStdlibs => e +          opoo e.message +        end          stdlibs = Keg.new(f.prefix).detect_cxx_stdlibs :skip_executables => true          tab = Tab.for_keg f.prefix | 
