From 65d0d212d4ee067db13d943e2fa2e22d8c5cc0d6 Mon Sep 17 00:00:00 2001 From: shivansh-ibm Date: Sun, 9 Aug 2026 21:18:53 -0700 Subject: [PATCH 1/3] Added build script for libclang==18.1.1 for UBI 10.1 --- l/libclang/build_info.json | 9 +++-- l/libclang/libclang_ubi_10.1.sh | 69 +++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 l/libclang/libclang_ubi_10.1.sh diff --git a/l/libclang/build_info.json b/l/libclang/build_info.json index edf91aa106..5e0f9a2173 100644 --- a/l/libclang/build_info.json +++ b/l/libclang/build_info.json @@ -1,5 +1,5 @@ { - "maintainer": "vinodk99", + "maintainer": "shivansh-ibm", "package_name": "libclang", "github_url": "https://github.com/sighingnow/libclang.git", "version": "llvm-18.1.1", @@ -11,6 +11,9 @@ "use_non_root_user": false, "wheel_build" : true, "*": { - "build_script": "libclang_ubi_9.3.sh" + "build_script": [ + "libclang_ubi_9.3.sh", + "libclang_ubi_10.1.sh" + ] } -} \ No newline at end of file +} diff --git a/l/libclang/libclang_ubi_10.1.sh b/l/libclang/libclang_ubi_10.1.sh new file mode 100644 index 0000000000..9cc3775a4a --- /dev/null +++ b/l/libclang/libclang_ubi_10.1.sh @@ -0,0 +1,69 @@ +#!/bin/bash -e +# ----------------------------------------------------------------------------- +# +# Package : libclang +# Version : llvm-18.1.1 +# Source repo : https://github.com/sighingnow/libclang.git +# Tested on : UBI:10.1 +# Language : Python +# Ci-Check : True +# Script License : Apache License, Version 2 or later +# Maintainer : Shivansh Sharma +# +# Disclaimer : This script has been tested in root mode on given +# ========== platform using the mentioned version of the package. +# It may not work as expected with newer versions of the +# package and/or distribution. In such case, please +# contact "Maintainer" of this script. +# +# --------------------------------------------------------------------------- + +# Variables +PACKAGE_NAME=libclang +PACKAGE_VERSION=${1:-llvm-18.1.1} +PACKAGE_URL=https://github.com/sighingnow/libclang.git +PACKAGE_DIR=libclang +CURRENT_DIR="${PWD}" + +# Install necessary system dependencies +yum install -y git gcc-toolset-15-gcc gcc-toolset-15-gcc-c++ gcc-toolset-15-gcc-gfortran make wget llvm-devel clang-devel openssl-devel bzip2-devel libffi-devel zlib-devel python3.12-devel python3.12-pip cmake clang + +source /opt/rh/gcc-toolset-15/enable +export PATH=/opt/rh/gcc-toolset-15/root/usr/bin:$PATH +export LD_LIBRARY_PATH=/opt/rh/gcc-toolset-15/root/usr/lib64:$LD_LIBRARY_PATH + +# Clone the repository +git clone $PACKAGE_URL +cd $PACKAGE_NAME +git checkout $PACKAGE_VERSION + +# Check if Rust is installed +if ! command -v rustc &> /dev/null; then + echo "Rust not found. Installing Rust..." + curl https://sh.rustup.rs -sSf | sh -s -- -y + source "$HOME/.cargo/env" +else + echo "Rust is already installed." +fi + +# Install additional Python dependencies +python3.12 -m pip install pytest setuptools tox wheel + +# Install the package +if ! python3.12 -m pip install . ; then + echo "------------------$PACKAGE_NAME:Install_fails-------------------------------------" + echo "$PACKAGE_URL $PACKAGE_NAME" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_Fails" + exit 1 +fi + +# Building wheel with script itself as the wheel need to create with ppc64le arch. +if ! python3.12 setup.py bdist_wheel --plat-name manylinux2014_ppc64le --dist-dir="$CURRENT_DIR"; then + echo "------------------$PACKAGE_NAME: Wheel Build Failed ---------------------" + exit 2 +else + echo "------------------$PACKAGE_NAME: Wheel Build Success -------------------------" + exit 0 +fi + +# No tests to run for this package From e8f8f0a982e0021bdd916c15ac8b9a01a5145ee5 Mon Sep 17 00:00:00 2001 From: shivansh-ibm Date: Wed, 2 Sep 2026 12:31:20 +0530 Subject: [PATCH 2/3] Update and rename libclang_ubi_10.1.sh to libclang_ubi_10.2.sh --- ...clang_ubi_10.1.sh => libclang_ubi_10.2.sh} | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) rename l/libclang/{libclang_ubi_10.1.sh => libclang_ubi_10.2.sh} (73%) diff --git a/l/libclang/libclang_ubi_10.1.sh b/l/libclang/libclang_ubi_10.2.sh similarity index 73% rename from l/libclang/libclang_ubi_10.1.sh rename to l/libclang/libclang_ubi_10.2.sh index 9cc3775a4a..73df653c35 100644 --- a/l/libclang/libclang_ubi_10.1.sh +++ b/l/libclang/libclang_ubi_10.2.sh @@ -4,7 +4,7 @@ # Package : libclang # Version : llvm-18.1.1 # Source repo : https://github.com/sighingnow/libclang.git -# Tested on : UBI:10.1 +# Tested on : UBI:10.2 # Language : Python # Ci-Check : True # Script License : Apache License, Version 2 or later @@ -26,11 +26,21 @@ PACKAGE_DIR=libclang CURRENT_DIR="${PWD}" # Install necessary system dependencies -yum install -y git gcc-toolset-15-gcc gcc-toolset-15-gcc-c++ gcc-toolset-15-gcc-gfortran make wget llvm-devel clang-devel openssl-devel bzip2-devel libffi-devel zlib-devel python3.12-devel python3.12-pip cmake clang +yum install -y git gcc-toolset-15-gcc gcc-toolset-15-gcc-c++ gcc-toolset-15 make wget llvm-devel clang-devel openssl-devel bzip2-devel libffi-devel zlib-devel python3.14-devel python3.14-pip cmake clang + +# Setup GCC Toolset 15 for UBI 10 +if [[ -f /opt/rh/gcc-toolset-15/enable ]]; then + source /opt/rh/gcc-toolset-15/enable +elif [[ -d /opt/rh/gcc-toolset-15/root/usr/bin ]]; then + export PATH="/opt/rh/gcc-toolset-15/root/usr/bin:$PATH" + export LD_LIBRARY_PATH="/opt/rh/gcc-toolset-15/root/usr/lib64:$LD_LIBRARY_PATH" +else + echo "ERROR: gcc-toolset-15 not found" + exit 1 +fi + +echo "Using gcc: $(gcc --version | head -1)" -source /opt/rh/gcc-toolset-15/enable -export PATH=/opt/rh/gcc-toolset-15/root/usr/bin:$PATH -export LD_LIBRARY_PATH=/opt/rh/gcc-toolset-15/root/usr/lib64:$LD_LIBRARY_PATH # Clone the repository git clone $PACKAGE_URL @@ -47,10 +57,10 @@ else fi # Install additional Python dependencies -python3.12 -m pip install pytest setuptools tox wheel +python3.14 -m pip install pytest setuptools tox wheel # Install the package -if ! python3.12 -m pip install . ; then +if ! python3.14 -m pip install . ; then echo "------------------$PACKAGE_NAME:Install_fails-------------------------------------" echo "$PACKAGE_URL $PACKAGE_NAME" echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_Fails" @@ -58,7 +68,7 @@ if ! python3.12 -m pip install . ; then fi # Building wheel with script itself as the wheel need to create with ppc64le arch. -if ! python3.12 setup.py bdist_wheel --plat-name manylinux2014_ppc64le --dist-dir="$CURRENT_DIR"; then +if ! python3.14 setup.py bdist_wheel --plat-name manylinux2014_ppc64le --dist-dir="$CURRENT_DIR"; then echo "------------------$PACKAGE_NAME: Wheel Build Failed ---------------------" exit 2 else From 8f6f880f002613077e2ee3666182d96b6c3b974f Mon Sep 17 00:00:00 2001 From: shivansh-ibm Date: Wed, 2 Sep 2026 12:31:36 +0530 Subject: [PATCH 3/3] Update build_info.json --- l/libclang/build_info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l/libclang/build_info.json b/l/libclang/build_info.json index 5e0f9a2173..c047a71857 100644 --- a/l/libclang/build_info.json +++ b/l/libclang/build_info.json @@ -13,7 +13,7 @@ "*": { "build_script": [ "libclang_ubi_9.3.sh", - "libclang_ubi_10.1.sh" + "libclang_ubi_10.2.sh" ] } }