Revision f0e8731b72c254da2843d64d27dc7c419bef4bd0 authored by Tongliang Liao on 11 May 2020, 17:26:18 UTC, committed by Facebook GitHub Bot on 11 May 2020, 17:28:49 UTC
Summary:
Related to some discussion in https://github.com/facebook/rocksdb/issues/6179
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6771

Reviewed By: zhichao-cao

Differential Revision: D21340117

fbshipit-source-id: a1af0ba4865bb13c8c817851d6f6c4056191b3fe
1 parent 3a1c29d
Raw File
docker-build-linux-centos.sh
#!/usr/bin/env bash
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

set -e
#set -x

# just in-case this is run outside Docker
mkdir -p /rocksdb-local-build

rm -rf /rocksdb-local-build/*
cp -r /rocksdb-host/* /rocksdb-local-build
cd /rocksdb-local-build

# Use scl devtoolset if available
if hash scl 2>/dev/null; then
	if scl --list | grep -q 'devtoolset-7'; then
		# CentOS 7+
		scl enable devtoolset-7 'make clean-not-downloaded'
		scl enable devtoolset-7 'PORTABLE=1 make -j2 rocksdbjavastatic'
	elif scl --list | grep -q 'devtoolset-2'; then
		# CentOS 5 or 6
		scl enable devtoolset-2 'make clean-not-downloaded'
		scl enable devtoolset-2 'PORTABLE=1 make -j2 rocksdbjavastatic'
	else
		echo "Could not find devtoolset"
		exit 1;
	fi
else
	make clean-not-downloaded
        PORTABLE=1 make -j2 rocksdbjavastatic
fi

cp java/target/librocksdbjni-linux*.so java/target/rocksdbjni-*-linux*.jar /rocksdb-java-target

back to top