This is an automated email from the ASF dual-hosted git repository. alexey pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 3fc3ffdfffbedb4334f362511be68c02bc31cf95 Author: Grant Henke <[email protected]> AuthorDate: Tue May 19 08:34:14 2020 -0500 [thirdparty] Fix Snappy build to add -fPIC When upgrading Snappy in https://gerrit.cloudera.org/#/c/15927/ I accidentally removed the --with-pic option when converting the build from autoconf to cmake. This caused issues in some build environments such as: 21:34:13 /usr/bin/ld: ../../../../../thirdparty/installed/uninstrumented/lib/libsnappy.a(snappy-sinksource.cc.o): relocation R_X86_64_32S against `_ZTVN6snappy6SourceE' can not be used when making a shared object; recompile with -fPIC 21:34:13 ../../../../../thirdparty/installed/uninstrumented/lib/libsnappy.a: error adding symbols: Bad value 21:34:13 collect2: error: ld returned 1 exit status This patch fixes this by adding back -fPIC to the CFLAGS and CXXFLAGS similar to other cmake builds in thirdparty. Change-Id: I48452275c052c9bf54845604fad2deeb002ae0d0 Reviewed-on: http://gerrit.cloudera.org:8080/15957 Tested-by: Kudu Jenkins Reviewed-by: Alexey Serbin <[email protected]> --- thirdparty/build-definitions.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/thirdparty/build-definitions.sh b/thirdparty/build-definitions.sh index 017fd3d..109ed4f 100644 --- a/thirdparty/build-definitions.sh +++ b/thirdparty/build-definitions.sh @@ -520,7 +520,8 @@ build_snappy() { mkdir -p $SNAPPY_BDIR pushd $SNAPPY_BDIR rm -Rf CMakeCache.txt CMakeFiles/ - CFLAGS="$EXTRA_CFLAGS" \ + CFLAGS="$EXTRA_CFLAGS -fPIC" \ + CXXFLAGS="$EXTRA_CXXFLAGS -fPIC" \ cmake \ -DCMAKE_BUILD_TYPE=release \ -DBUILD_STATIC_LIBS=ON \
