add centos 5.6 build instead of ubuntu.
This commit is contained in:
parent
6a64ea6171
commit
0b923f0f9a
6
Makefile
6
Makefile
@ -554,7 +554,11 @@ rocksdbjavastatic: libz.a libbz2.a libsnappy.a
|
||||
|
||||
|
||||
rocksdbjavastaticrelease: rocksdbjavastatic
|
||||
cd java/crossbuild && vagrant destroy -f && vagrant up
|
||||
cd java/crossbuild && vagrant destroy -f
|
||||
vagrant up linux32
|
||||
vagrant halt linux32
|
||||
vagrant up linux64
|
||||
vagrant halt linux64
|
||||
cd java;jar -cf $(ROCKSDB_JAR_ALL) org/rocksdb/*.class org/rocksdb/util/*.class HISTORY*.md librocksdbjni-*.so librocksdbjni-*.jnilib
|
||||
|
||||
rocksdbjava:
|
||||
|
7
java/crossbuild/Vagrantfile
vendored
7
java/crossbuild/Vagrantfile
vendored
@ -7,13 +7,11 @@ VAGRANTFILE_API_VERSION = "2"
|
||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
|
||||
config.vm.define "linux32" do |linux32|
|
||||
linux32.vm.box = "ubuntu/trusty32"
|
||||
linux32.vm.provision :shell, path: "build-linux.sh"
|
||||
linux32.vm.box = "hansode/centos-5.6-i386"
|
||||
end
|
||||
|
||||
config.vm.define "linux64" do |linux64|
|
||||
linux64.vm.box = "ubuntu/trusty64"
|
||||
linux64.vm.provision :shell, path: "build-linux.sh"
|
||||
linux64.vm.box = "hansode/centos-5.6-x86_64"
|
||||
end
|
||||
|
||||
config.vm.provider "virtualbox" do |v|
|
||||
@ -21,6 +19,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
v.cpus = 4
|
||||
end
|
||||
|
||||
config.vm.provision :shell, path: "build-linux-centos.sh"
|
||||
config.vm.synced_folder "../", "/rocksdb-build"
|
||||
config.vm.synced_folder "../..", "/rocksdb", type: "rsync"
|
||||
end
|
||||
|
23
java/crossbuild/build-linux-centos.sh
Executable file
23
java/crossbuild/build-linux-centos.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
# install all required packages for rocksdb that are available through yum
|
||||
ARCH=$(uname -i)
|
||||
sudo yum -y install java-1.6.0-openjdk-devel.$ARCH zlib zlib-devel bzip2 bzip2-devel
|
||||
|
||||
# install gcc/g++ 4.7 via CERN (http://linux.web.cern.ch/linux/devtoolset/)
|
||||
sudo wget -O /etc/yum.repos.d/slc5-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc5-devtoolset.repo
|
||||
sudo wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-cern http://ftp.mirrorservice.org/sites/ftp.scientificlinux.org/linux/scientific/51/i386/RPM-GPG-KEYs/RPM-GPG-KEY-cern
|
||||
sudo yum -y install devtoolset-1.1
|
||||
wget http://gflags.googlecode.com/files/gflags-1.6.tar.gz
|
||||
tar xvfz gflags-1.6.tar.gz; cd gflags-1.6; scl enable devtoolset-1.1 ./configure; scl enable devtoolset-1.1 make; sudo make install
|
||||
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.6.0
|
||||
|
||||
# build rocksdb
|
||||
cd /rocksdb
|
||||
scl enable devtoolset-1.1 'make jclean clean'
|
||||
scl enable devtoolset-1.1 'make -j 4 rocksdbjavastatic'
|
||||
cp /rocksdb/java/librocksdbjni-* /rocksdb-build
|
||||
cp /rocksdb/java/rocksdbjni-* /rocksdb-build
|
||||
|
Loading…
Reference in New Issue
Block a user