From: Changcheng Liu Date: Fri, 26 Oct 2018 06:32:09 +0000 (+0800) Subject: install-deps.sh: correct gcc version info as major.minor.patch X-Git-Tag: v13.2.7~139^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=86c48443ca5b71e5aeb4c69cb0fe97f57be8282f;p=ceph.git install-deps.sh: correct gcc version info as major.minor.patch On ubuntu 18.04, "gcc -dumpversion" output "7", it result in that below check will return false: dpkg --compare-versions 7 ge 7.0 Then, this script will install other gcc. Actully, the full gcc version "gcc -dumpfullversion" output is "7.3.0", than below check will turn true: dpkg --compare-version 7.3.0 ge 7.0 So, there's no need to install other gcc. In case of hitting error on ubuntu16.04, use below parameter: gcc -dumpfullversion -dumpversion Signed-off-by: Changcheng Liu (cherry picked from commit ab7344e61755b357c558aef3630e1479d5dcc7b3) --- diff --git a/install-deps.sh b/install-deps.sh index 7d0d49e932fb..21634d75c6c2 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -32,7 +32,7 @@ function munge_ceph_spec_in { function ensure_decent_gcc_on_ubuntu { # point gcc to the one offered by g++-7 if the used one is not # new enough - local old=$(gcc -dumpversion) + local old=$(gcc -dumpfullversion -dumpversion) local new=$1 local codename=$2 if dpkg --compare-versions $old ge 7.0; then