X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fcmake-sonarqube.sh;h=da433b29c0b5542f7b29fdc354cd8e1599da4e3f;hb=5c69133bfea3ca1b895219b509b9c1353e122c4c;hp=d335419d70513342d2ff485f2c35db02e8e22048;hpb=02860f86d24223854948d1d13a91a77496e7bd0f;p=releng%2Fglobal-jjb.git diff --git a/shell/cmake-sonarqube.sh b/shell/cmake-sonarqube.sh index d335419d..da433b29 100644 --- a/shell/cmake-sonarqube.sh +++ b/shell/cmake-sonarqube.sh @@ -15,6 +15,20 @@ echo "---> cmake-sonarqube.sh" set -eux -o pipefail +# Add missing sctp.h header file to prevent cmake/build failure +if (grep Ubuntu /etc/os-release > /dev/null 2>&1); then + echo "Installing libsctp-dev dependency for Ubuntu" + sudo apt-get update + sudo apt-get install -y libsctp-dev +elif (grep RedHat /etc/os-release > /dev/null 2>&1) || \ + (grep CentOS /etc/os-release > /dev/null 2>&1); then + echo "Installing lksctp-tools-devel dependency for CentOS/RedHat" + sudo yum install -y lksctp-tools-devel +else + echo "Unmatched OS/Distribution" + echo "Missing sctp library not installed" +fi + build_dir="${BUILD_DIR:-$WORKSPACE/build}" build_wrap_dir="${BUILD_WRAP_DIR:-$WORKSPACE/bw-output}" cmake_opts="${CMAKE_OPTS:-}"