Ask Your Question

Sanket's profile - activity

2016-03-20 01:35:26 -0600 received badge  Enthusiast
2016-03-09 16:57:07 -0600 answered a question Mac OS X install error: No available formula for gtest

An update on the formula script from above that resolved some errors on mac OS X regarding TR1 tuples during gtest compilation and unsupported md5, in case anyone is facing similar issues:

 require 'formula'

 class Gtest < Formula
   url 'http://googletest.googlecode.com/files/gtest-1.5.0.tar.gz'
   homepage 'http://code.google.com/p/googletest/'
   sha256 '24156a23cfa49a194c48d1b630fd8eaa63fffc403719b5ddb94cdbe8d9a96aff'

   def options
     [
       ["--universal", "Build for both 32 & 64 bit Intel."],
     ]
   end

   def install
     ENV.universal_binary if ARGV.build_universal?

    system "./configure","CPPFLAGS=-DGTEST_USE_OWN_TR1_TUPLE=1", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
    # gtest-config tries to be clever in locating libraries, but Homebrew's
    # Cellar confuses it. This lets `gtest-config --libs` work correctly
    inreplace 'scripts/gtest-config', '`dirname $0`', '$bindir'
    system "make install"
  end
end
2016-03-09 16:44:16 -0600 commented question Mac OS X install error: No available formula for gtest

I got rid of the TR1_TUPLE error using system "./configure CPPFLAGS=-DGTEST_USE_OWN_TR1_TUPLE=1”,... in the formula above. However the build for test still fails and but now it does not give any details on what the error is.

2016-03-09 16:44:14 -0600 commented question Mac OS X install error: No available formula for gtest

The above formula as it is, gave some errors relating to md5 being not supported anymore. Replacing md5 with sha256 and updating the key number in front to match that for the current file, allowed brew to download the files, but eventually gave gtest compile errors relating to TR1_TUPLE