From: Matthew Watkins Date: Wed, 21 Dec 2022 14:57:08 +0000 (+0000) Subject: Fix: Add missing sctp.h header file to sonarqube cmake/build X-Git-Tag: v0.83.3~2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?p=releng%2Fglobal-jjb.git;a=commitdiff_plain;h=5c69133bfea3ca1b895219b509b9c1353e122c4c Fix: Add missing sctp.h header file to sonarqube cmake/build Addresses a cmake/build failure due to a missing header file. Adds the required platform-specific package dependency to the relevant script. Issue-ID: RELENG-4551 Signed-off-by: MatthewWatkins Change-Id: Icfef14917bf4dbc0dd4c506b44648e9ccae78131 --- diff --git a/releasenotes/notes/fix-missing-sctp-header-36d78588c6d1a644.yaml b/releasenotes/notes/fix-missing-sctp-header-36d78588c6d1a644.yaml new file mode 100644 index 00000000..a27561e1 --- /dev/null +++ b/releasenotes/notes/fix-missing-sctp-header-36d78588c6d1a644.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + Address missing sctp.h header file during sonarqube cmake/build 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:-}"