MXS-1757: Never link avro against snappy

The Avro libraries appear to sometimes overwrite the CMake
variables. Patching out the code that looks for the libraries should
prevent the library from ever being linked against the snappy libraries.
This commit is contained in:
Markus Mäkelä 2019-02-11 03:38:55 +02:00
parent aea64aede2
commit 38069bb32d
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -199,8 +199,9 @@ avro_dir=`echo "$avro_filename" | sed "s/.tar.gz//"`
tar -axf $avro_filename
mkdir $avro_dir/build
pushd $avro_dir/build
# The -DSNAPPY_FOUND=N is used to prevent the library from linking against libsnappy (MaxScale doesn't link against it)
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC -DSNAPPY_FOUND=N
# Make sure the library isn't linked against snappy
sed -i 's/find_package(Snappy)//' ../lang/c/CMakeLists.txt
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC
make
sudo make install
popd