diff options
| author | Sean Ogden | 2013-02-16 15:07:42 -0500 |
|---|---|---|
| committer | Adam Vandenberg | 2013-02-23 10:38:23 -0800 |
| commit | bf8c5ca74e714fa523af2a52c08352c8c8c64d60 (patch) | |
| tree | 681282f443b81459a50c457f1fc3830b8806475e /Library/Formula | |
| parent | 02e1eafbefd5a2dcb528f9a2c1cd7fabf4477c5b (diff) | |
| download | homebrew-bf8c5ca74e714fa523af2a52c08352c8c8c64d60.tar.bz2 | |
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 <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/leveldb.rb | 24 |
1 files changed, 24 insertions, 0 deletions
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 <<EOF +- int main() {} +-EOF +- if [ "$?" = 0 ]; then +- PLATFORM_LIBS="$PLATFORM_LIBS -ltcmalloc" +- fi + fi + + PLATFORM_CCFLAGS="$PLATFORM_CCFLAGS $COMMON_FLAGS" |
