From d7c868b0624518134147ee98877c0f41d531c56f Mon Sep 17 00:00:00 2001 From: Peter Dillinger Date: Mon, 7 Feb 2022 19:34:39 -0800 Subject: [PATCH] Work around snappy linker issue with newer compilers (#9517) Summary: After https://github.com/facebook/rocksdb/issues/9481, we are using newer default compiler for build-format-compatible CircleCI nightly job, which fails on building 2.2.fb.branch branch because it tries to use a pre-compiled libsnappy.a that is checked into the repo (!). This works around that by setting SNAPPY_LDFLAGS=-lsnappy, which is only understood by such old versions. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9517 Test Plan: Run check_format_compatible.sh on Ubuntu 20 AWS machine, watch nightly run Reviewed By: hx235 Differential Revision: D34055561 Pulled By: pdillinger fbshipit-source-id: 45f9d428dd082f026773bfa8d9dd4dad66fc9378 --- tools/check_format_compatible.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/check_format_compatible.sh b/tools/check_format_compatible.sh index 81448697f..6320610d8 100755 --- a/tools/check_format_compatible.sh +++ b/tools/check_format_compatible.sh @@ -45,6 +45,10 @@ else fi git fetch $tmp_origin +# Used in building some ancient RocksDB versions where by default it tries to +# use a precompiled libsnappy.a checked in to the repo. +export SNAPPY_LDFLAGS=-lsnappy + cleanup() { echo "== Cleaning up" git reset --hard || true -- GitLab