rocksdb/java/crossbuild/docker-build-linux-centos.sh
Adam Retter 4048762cbe Updated the CentOS 6 Docker build for RocksJava to a newer GCC toolchain (#4756)
Summary:
Uses a newer build toolchain but the same old GLIBC when building releases of RocksJava for Linux x64 in the Docker Container.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4756

Differential Revision: D13383575

Pulled By: sagar0

fbshipit-source-id: 27c58814876e434d5fa61395e6664cfc5f6830b1
2018-12-07 14:37:26 -08:00

29 lines
743 B
Bash
Executable file

#!/usr/bin/env bash
set -e
#set -x
rm -rf /rocksdb-local
cp -r /rocksdb-host /rocksdb-local
cd /rocksdb-local
# Use scl devtoolset if available (i.e. CentOS <7)
if hash scl 2>/dev/null; then
if scl --list | grep -q 'devtoolset-7'; then
scl enable devtoolset-7 'make jclean clean'
scl enable devtoolset-7 'PORTABLE=1 make -j6 rocksdbjavastatic'
elif scl --list | grep -q 'devtoolset-2'; then
scl enable devtoolset-2 'make jclean clean'
scl enable devtoolset-2 'PORTABLE=1 make -j6 rocksdbjavastatic'
else
echo "Could not find devtoolset"
exit 1;
fi
else
make jclean clean
PORTABLE=1 make -j6 rocksdbjavastatic
fi
cp java/target/librocksdbjni-linux*.so java/target/rocksdbjni-*-linux*.jar /rocksdb-host/java/target