Skip to content

Commit

Permalink
Merge PR: fix the tcmalloc/jemalloc install script (#2232)
Browse files Browse the repository at this point in the history
* add leaked components

* add dep

* add gcc g++

* remove the verbose

* add the correct version number

* down jemalloc version

* add version

* restore to 5.2.1

* delete useless version function,use specify version

Co-authored-by: KamiD <[email protected]>
  • Loading branch information
giskook and KamiD authored Jun 27, 2022
1 parent 3661e5a commit 3ae1aa1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 29 deletions.
17 changes: 2 additions & 15 deletions libs/malloc/jeinstall.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
#!/bin/sh
#set -e
#set -x
VERSION_NUM=5.3.0
VERSION_NUM=5.2.1
VERSION=jemalloc-$VERSION_NUM

while [ $# -gt 0 ]; do
case "$1" in
--version)
VERSION="$2"
shift
;;
--*)
echo "Illegal option $1"
;;
esac
shift $(( $# > 0 ? 1 : 0 ))
done

command_exists() {
command -v "$@" > /dev/null 2>&1
}
Expand Down Expand Up @@ -51,7 +38,7 @@ get_distribution() {
install_linux() {
$sh_c "rm -rf jemalloc"
$sh_c "git clone https://github.com/jemalloc/jemalloc.git"
$sh_c "cd jemalloc && git checkout ${VERSION}"
$sh_c "cd jemalloc && git checkout ${VERSION_NUM}"
$sh_c "cd jemalloc && ./autogen.sh"
$sh_c "cd jemalloc && ./configure --prefix=/usr --libdir=/usr/lib"
$sh_c "cd jemalloc && make uninstall"
Expand Down
15 changes: 1 addition & 14 deletions libs/malloc/tcinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,6 @@
VERSION_NUM=2.9.1
VERSION=gperftools-$VERSION_NUM

while [ $# -gt 0 ]; do
case "$1" in
--version)
VERSION="$2"
shift
;;
--*)
echo "Illegal option $1"
;;
esac
shift $(( $# > 0 ? 1 : 0 ))
done

command_exists() {
command -v "$@" > /dev/null 2>&1
}
Expand Down Expand Up @@ -92,7 +79,7 @@ do_install() {
# Run setup for each distro accordingly
case "$lsb_dist" in
ubuntu)
pre_reqs="git make autoconf automake libtool gcc-c++"
pre_reqs="git make dh-autoreconf autoconf automake libtool g++ gcc"
$sh_c 'apt-get update -qq >/dev/null'
$sh_c "apt-get install -y -qq $pre_reqs >/dev/null"
install_linux
Expand Down

0 comments on commit 3ae1aa1

Please sign in to comment.