Skip to content

Commit

Permalink
Only install glibc on Linux if version < 2.18
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Cooke committed Apr 29, 2020
1 parent 043ff33 commit 38fa7bf
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion scripts/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,24 @@ def install_homebrew(build_dir):
init_homebrew(brew_bin_dir)
return os.path.join(brew_bin_dir, 'brew') # brew binary

def get_glibc_version():
try:
return tuple(int(v) for v in check_output(['ldd', '--version']).decode("utf-8").strip().split('\n')[0].split()[-1].split('.'))
except:
return True

def is_old_glibc():
return get_glibc_version() < (2, 18)

def get_required_dependencies():
compiled, recompile = ['cmake'], []
if is_osx():
compiled.append(latest_llvm)
else:
compiled.append(latest_gcc)
compiled += ['binutils', 'glibc']
compiled += ['binutils']
if is_old_glibc():
compiled.append('glibc')
compiled += ['boost', 'gmp']
if is_osx():
compiled += ['htslib']
Expand Down

0 comments on commit 38fa7bf

Please sign in to comment.