From 1e9c8d42a01e6b1e5f6fbae6c295a37358d42e35 Mon Sep 17 00:00:00 2001 From: Adam Retter Date: Thu, 10 Oct 2019 17:20:01 -0700 Subject: [PATCH] Fix the rocksjava release Vagrant build on CentOS (#5901) Summary: Closes https://github.com/facebook/rocksdb/issues/5873 Pull Request resolved: https://github.com/facebook/rocksdb/pull/5901 Differential Revision: D17869585 fbshipit-source-id: 559472486f1d3ac80c0c7df6c421c4b612b9b7f9 --- java/crossbuild/Vagrantfile | 4 ++-- java/crossbuild/build-linux-centos.sh | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/java/crossbuild/Vagrantfile b/java/crossbuild/Vagrantfile index 4a32177488..48ab03f808 100644 --- a/java/crossbuild/Vagrantfile +++ b/java/crossbuild/Vagrantfile @@ -7,11 +7,11 @@ VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define "linux32" do |linux32| - linux32.vm.box = "hansode/centos-6.7-i386" + linux32.vm.box = "bento/centos-6.10-i386" end config.vm.define "linux64" do |linux64| - linux64.vm.box = "hansode/centos-6.7-x86_64" + linux64.vm.box = "bento/centos-6.10" end config.vm.provider "virtualbox" do |v| diff --git a/java/crossbuild/build-linux-centos.sh b/java/crossbuild/build-linux-centos.sh index a9b5e0a927..f7090856d0 100755 --- a/java/crossbuild/build-linux-centos.sh +++ b/java/crossbuild/build-linux-centos.sh @@ -10,7 +10,11 @@ sudo rm -f /etc/yum/vars/releasever sudo yum -y install epel-release # install all required packages for rocksdb that are available through yum -sudo yum -y install openssl java-1.7.0-openjdk-devel zlib-devel bzip2-devel lz4-devel snappy-devel libzstd-devel jemalloc-devel +sudo yum -y install openssl java-1.7.0-openjdk-devel zlib-devel bzip2-devel lz4-devel snappy-devel libzstd-devel jemalloc-devel cmake3 + +# set up cmake3 as cmake binary +sudo alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake 10 --slave /usr/local/bin/ctest ctest /usr/bin/ctest --slave /usr/local/bin/cpack cpack /usr/bin/cpack --slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake +sudo alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 --slave /usr/local/bin/ctest ctest /usr/bin/ctest3 --slave /usr/local/bin/cpack cpack /usr/bin/cpack3 --slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 # install gcc/g++ 4.8.2 from tru/devtools-2 sudo wget -O /etc/yum.repos.d/devtools-2.repo https://people.centos.org/tru/devtools-2/devtools-2.repo @@ -24,6 +28,8 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib # set java home so we can build rocksdb jars export JAVA_HOME=/usr/lib/jvm/java-1.7.0 +export PATH=$JAVA_HOME:/usr/local/bin:$PATH + # build rocksdb cd /rocksdb scl enable devtoolset-2 'make jclean clean'