2016-01-22 19:56:32 +00:00
|
|
|
#!/bin/sh
|
2019-04-18 17:51:19 +00:00
|
|
|
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
2016-01-22 19:56:32 +00:00
|
|
|
#
|
|
|
|
# Update dependencies.sh file with the latest avaliable versions
|
|
|
|
|
|
|
|
BASEDIR=$(dirname $0)
|
2016-01-25 22:35:04 +00:00
|
|
|
OUTPUT=""
|
2016-01-22 19:56:32 +00:00
|
|
|
|
2019-09-17 03:41:16 +00:00
|
|
|
function log_header()
|
|
|
|
{
|
|
|
|
echo "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved." >> "$OUTPUT"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-01-22 19:56:32 +00:00
|
|
|
function log_variable()
|
|
|
|
{
|
|
|
|
echo "$1=${!1}" >> "$OUTPUT"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TP2_LATEST="/mnt/vol/engshare/fbcode/third-party2"
|
|
|
|
## $1 => lib name
|
|
|
|
## $2 => lib version (if not provided, will try to pick latest)
|
|
|
|
## $3 => platform (if not provided, will try to pick latest gcc)
|
|
|
|
##
|
|
|
|
## get_lib_base will set a variable named ${LIB_NAME}_BASE to the lib location
|
|
|
|
function get_lib_base()
|
|
|
|
{
|
|
|
|
local lib_name=$1
|
|
|
|
local lib_version=$2
|
|
|
|
local lib_platform=$3
|
|
|
|
|
|
|
|
local result="$TP2_LATEST/$lib_name/"
|
|
|
|
|
|
|
|
# Lib Version
|
2016-01-25 22:35:04 +00:00
|
|
|
if [ -z "$lib_version" ] || [ "$lib_version" = "LATEST" ]; then
|
2016-01-22 19:56:32 +00:00
|
|
|
# version is not provided, use latest
|
|
|
|
result=`ls -dr1v $result/*/ | head -n1`
|
|
|
|
else
|
|
|
|
result="$result/$lib_version/"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Lib Platform
|
|
|
|
if [ -z "$lib_platform" ]; then
|
|
|
|
# platform is not provided, use latest gcc
|
|
|
|
result=`ls -dr1v $result/gcc-*[^fb]/ | head -n1`
|
|
|
|
else
|
2017-08-31 22:19:20 +00:00
|
|
|
echo $lib_platform
|
2016-01-22 19:56:32 +00:00
|
|
|
result="$result/$lib_platform/"
|
|
|
|
fi
|
|
|
|
|
2016-01-25 22:35:04 +00:00
|
|
|
result=`ls -1d $result/*/ | head -n1`
|
2016-01-22 19:56:32 +00:00
|
|
|
|
|
|
|
# lib_name => LIB_NAME_BASE
|
|
|
|
local __res_var=${lib_name^^}"_BASE"
|
2016-01-25 22:35:04 +00:00
|
|
|
__res_var=`echo $__res_var | tr - _`
|
2016-01-22 19:56:32 +00:00
|
|
|
# LIB_NAME_BASE=$result
|
|
|
|
eval $__res_var=`readlink -f $result`
|
|
|
|
|
|
|
|
log_variable $__res_var
|
|
|
|
}
|
|
|
|
|
2019-01-28 18:57:57 +00:00
|
|
|
###########################################################
|
|
|
|
# platform007 dependencies #
|
|
|
|
###########################################################
|
|
|
|
|
|
|
|
OUTPUT="$BASEDIR/dependencies_platform007.sh"
|
|
|
|
|
|
|
|
rm -f "$OUTPUT"
|
|
|
|
touch "$OUTPUT"
|
|
|
|
|
|
|
|
echo "Writing dependencies to $OUTPUT"
|
|
|
|
|
|
|
|
# Compilers locations
|
|
|
|
GCC_BASE=`readlink -f $TP2_LATEST/gcc/7.x/centos7-native/*/`
|
|
|
|
CLANG_BASE=`readlink -f $TP2_LATEST/llvm-fb/stable/centos7-native/*/`
|
|
|
|
|
2019-09-17 03:41:16 +00:00
|
|
|
log_header
|
2019-01-28 18:57:57 +00:00
|
|
|
log_variable GCC_BASE
|
|
|
|
log_variable CLANG_BASE
|
|
|
|
|
|
|
|
# Libraries locations
|
|
|
|
get_lib_base libgcc 7.x platform007
|
|
|
|
get_lib_base glibc 2.26 platform007
|
|
|
|
get_lib_base snappy LATEST platform007
|
|
|
|
get_lib_base zlib LATEST platform007
|
|
|
|
get_lib_base bzip2 LATEST platform007
|
|
|
|
get_lib_base lz4 LATEST platform007
|
|
|
|
get_lib_base zstd LATEST platform007
|
|
|
|
get_lib_base gflags LATEST platform007
|
|
|
|
get_lib_base jemalloc LATEST platform007
|
|
|
|
get_lib_base numa LATEST platform007
|
|
|
|
get_lib_base libunwind LATEST platform007
|
|
|
|
get_lib_base tbb LATEST platform007
|
|
|
|
|
|
|
|
get_lib_base kernel-headers fb platform007
|
|
|
|
get_lib_base binutils LATEST centos7-native
|
|
|
|
get_lib_base valgrind LATEST platform007
|
|
|
|
get_lib_base lua 5.3.4 platform007
|
|
|
|
|
|
|
|
git diff $OUTPUT
|
|
|
|
|
2016-01-26 20:13:27 +00:00
|
|
|
###########################################################
|
2017-04-14 17:13:08 +00:00
|
|
|
# 5.x dependencies #
|
2016-01-26 20:13:27 +00:00
|
|
|
###########################################################
|
|
|
|
|
2016-01-25 22:35:04 +00:00
|
|
|
OUTPUT="$BASEDIR/dependencies.sh"
|
|
|
|
|
|
|
|
rm -f "$OUTPUT"
|
|
|
|
touch "$OUTPUT"
|
|
|
|
|
2016-01-22 19:56:32 +00:00
|
|
|
echo "Writing dependencies to $OUTPUT"
|
|
|
|
|
|
|
|
# Compilers locations
|
2018-08-09 23:45:11 +00:00
|
|
|
GCC_BASE=`readlink -f $TP2_LATEST/gcc/5.x/centos7-native/*/`
|
|
|
|
CLANG_BASE=`readlink -f $TP2_LATEST/llvm-fb/stable/centos7-native/*/`
|
2016-01-22 19:56:32 +00:00
|
|
|
|
2019-09-17 03:41:16 +00:00
|
|
|
log_header
|
2016-01-22 19:56:32 +00:00
|
|
|
log_variable GCC_BASE
|
|
|
|
log_variable CLANG_BASE
|
|
|
|
|
|
|
|
# Libraries locations
|
2017-08-31 22:19:20 +00:00
|
|
|
get_lib_base libgcc 5.x gcc-5-glibc-2.23
|
|
|
|
get_lib_base glibc 2.23 gcc-5-glibc-2.23
|
|
|
|
get_lib_base snappy LATEST gcc-5-glibc-2.23
|
|
|
|
get_lib_base zlib LATEST gcc-5-glibc-2.23
|
|
|
|
get_lib_base bzip2 LATEST gcc-5-glibc-2.23
|
|
|
|
get_lib_base lz4 LATEST gcc-5-glibc-2.23
|
|
|
|
get_lib_base zstd LATEST gcc-5-glibc-2.23
|
|
|
|
get_lib_base gflags LATEST gcc-5-glibc-2.23
|
|
|
|
get_lib_base jemalloc LATEST gcc-5-glibc-2.23
|
|
|
|
get_lib_base numa LATEST gcc-5-glibc-2.23
|
|
|
|
get_lib_base libunwind LATEST gcc-5-glibc-2.23
|
|
|
|
get_lib_base tbb LATEST gcc-5-glibc-2.23
|
|
|
|
|
|
|
|
get_lib_base kernel-headers 4.0.9-36_fbk5_2933_gd092e3f gcc-5-glibc-2.23
|
2018-08-09 23:45:11 +00:00
|
|
|
get_lib_base binutils LATEST centos7-native
|
2017-08-31 22:19:20 +00:00
|
|
|
get_lib_base valgrind LATEST gcc-5-glibc-2.23
|
2017-04-14 17:13:08 +00:00
|
|
|
get_lib_base lua 5.2.3 gcc-5-glibc-2.23
|
2016-01-22 19:56:32 +00:00
|
|
|
|
|
|
|
git diff $OUTPUT
|
2016-01-26 20:13:27 +00:00
|
|
|
|
|
|
|
###########################################################
|
|
|
|
# 4.8.1 dependencies #
|
|
|
|
###########################################################
|
|
|
|
|
|
|
|
OUTPUT="$BASEDIR/dependencies_4.8.1.sh"
|
|
|
|
|
|
|
|
rm -f "$OUTPUT"
|
|
|
|
touch "$OUTPUT"
|
|
|
|
|
|
|
|
echo "Writing 4.8.1 dependencies to $OUTPUT"
|
|
|
|
|
|
|
|
# Compilers locations
|
2016-06-07 21:22:52 +00:00
|
|
|
GCC_BASE=`readlink -f $TP2_LATEST/gcc/4.8.1/centos6-native/*/`
|
|
|
|
CLANG_BASE=`readlink -f $TP2_LATEST/llvm-fb/stable/centos6-native/*/`
|
2016-01-26 20:13:27 +00:00
|
|
|
|
2019-09-17 03:41:16 +00:00
|
|
|
log_header
|
2016-01-26 20:13:27 +00:00
|
|
|
log_variable GCC_BASE
|
|
|
|
log_variable CLANG_BASE
|
|
|
|
|
|
|
|
# Libraries locations
|
|
|
|
get_lib_base libgcc 4.8.1 gcc-4.8.1-glibc-2.17
|
|
|
|
get_lib_base glibc 2.17 gcc-4.8.1-glibc-2.17
|
|
|
|
get_lib_base snappy LATEST gcc-4.8.1-glibc-2.17
|
|
|
|
get_lib_base zlib LATEST gcc-4.8.1-glibc-2.17
|
|
|
|
get_lib_base bzip2 LATEST gcc-4.8.1-glibc-2.17
|
|
|
|
get_lib_base lz4 LATEST gcc-4.8.1-glibc-2.17
|
|
|
|
get_lib_base zstd LATEST gcc-4.8.1-glibc-2.17
|
|
|
|
get_lib_base gflags LATEST gcc-4.8.1-glibc-2.17
|
|
|
|
get_lib_base jemalloc LATEST gcc-4.8.1-glibc-2.17
|
|
|
|
get_lib_base numa LATEST gcc-4.8.1-glibc-2.17
|
|
|
|
get_lib_base libunwind LATEST gcc-4.8.1-glibc-2.17
|
2016-08-18 17:44:29 +00:00
|
|
|
get_lib_base tbb 4.0_update2 gcc-4.8.1-glibc-2.17
|
2016-01-26 20:13:27 +00:00
|
|
|
|
|
|
|
get_lib_base kernel-headers LATEST gcc-4.8.1-glibc-2.17
|
|
|
|
get_lib_base binutils LATEST centos6-native
|
|
|
|
get_lib_base valgrind 3.8.1 gcc-4.8.1-glibc-2.17
|
2016-11-16 23:27:02 +00:00
|
|
|
get_lib_base lua 5.2.3 centos6-native
|
2016-01-26 20:13:27 +00:00
|
|
|
|
|
|
|
git diff $OUTPUT
|