From bf8c5ca74e714fa523af2a52c08352c8c8c64d60 Mon Sep 17 00:00:00 2001 From: Sean Ogden Date: Sat, 16 Feb 2013 15:07:42 -0500 Subject: leveldb: do not link tcmalloc tcmalloc comes in google-perftools. Programs dynamically linking the leveldb library will segfault during link because of tcmalloc. Make check does not pass if google-perftools is installed first. This patch removes the test for tcmalloc and uses the default system malloc instead. Closes #17892. Signed-off-by: Adam Vandenberg --- Library/Formula/leveldb.rb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'Library/Formula') diff --git a/Library/Formula/leveldb.rb b/Library/Formula/leveldb.rb index 4a9cb8263..64cc61c5e 100644 --- a/Library/Formula/leveldb.rb +++ b/Library/Formula/leveldb.rb @@ -7,6 +7,12 @@ class Leveldb < Formula depends_on 'snappy' => :build + # tcmalloc causes segfault during linking on OSX + # https://code.google.com/p/leveldb/issues/detail?id=131 + def patches + DATA + end + def install system "make" system "make leveldbutil" @@ -18,3 +24,21 @@ class Leveldb < Formula lib.install_symlink lib/'libleveldb.1.9.dylib' => 'libleveldb.1.dylib' end end + +__END__ +--- a/build_detect_platform 2013-01-07 16:07:29.000000000 -0500 ++++ b/build_detect_platform 2013-02-16 14:28:06.000000000 -0500 +@@ -178,13 +178,6 @@ + PLATFORM_LIBS="$PLATFORM_LIBS -lsnappy" + fi + +- # Test whether tcmalloc is available +- $CXX $CXXFLAGS -x c++ - -o /dev/null -ltcmalloc 2>/dev/null <