From e51f55d7ae7bab9483df6fd4448df4237ab740f6 Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Mon, 18 Nov 2013 20:18:45 -0800 Subject: [PATCH] Use gcc4.7.1 on CentOS 5.2 Summary: For some reason, snappy on CentOS 5.2 when compiled with gcc 4.8.1 segfaults on strcmp. (!?) Add an if to compile with gcc4.7.1 if you're compiling on CentOS 5.2. Please update your devservers to CentOS 6. Test Plan: make clean; make check on both my devserver (CentOS 6) and dhruba's (CentOS 5.2) Reviewers: dhruba, kailiu Reviewed By: dhruba CC: leveldb Differential Revision: https://reviews.facebook.net/D14169 --- build_tools/build_detect_platform | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build_tools/build_detect_platform b/build_tools/build_detect_platform index 073953dd4..ef446bf7e 100755 --- a/build_tools/build_detect_platform +++ b/build_tools/build_detect_platform @@ -46,7 +46,13 @@ COMMON_FLAGS="-DROCKSDB_PLATFORM_POSIX" if [ -d /mnt/gvfs/third-party -a -z "$CXX" ]; then FBCODE_BUILD="true" if [ -z "$USE_CLANG" ]; then - source $PWD/build_tools/fbcode.gcc481.sh + CENTOS_VERSION=`rpm -q --qf "%{VERSION}" \ + $(rpm -q --whatprovides redhat-release)` + if [ "$CENTOS_VERSION" = "6" ]; then + source $PWD/build_tools/fbcode.gcc481.sh + else + source $PWD/build_tools/fbcode.gcc471.sh + fi else source $PWD/build_tools/fbcode.clang31.sh fi