From efc12b837d7ef4ddfb6d819bc61bb1c4280703e3 Mon Sep 17 00:00:00 2001 From: Bimal Jha Date: Mon, 10 Aug 2026 11:53:48 -0600 Subject: [PATCH 1/5] update clidriver for linux wheel to v12.1.x --- .github/workflows/bld_wheels_and_upload.yml | 8 ++++++-- README.md | 8 ++++---- setup.py | 6 +----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/bld_wheels_and_upload.yml b/.github/workflows/bld_wheels_and_upload.yml index 1406ff31..53372c8f 100644 --- a/.github/workflows/bld_wheels_and_upload.yml +++ b/.github/workflows/bld_wheels_and_upload.yml @@ -70,8 +70,12 @@ jobs: uses: pypa/cibuildwheel@v3.4.1 env: CIBW_ARCHS_LINUX: "x86_64 i686" - CIBW_MANYLINUX_I686_IMAGE: manylinux2014 - CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 + # clidriver v12.1 needs glibc >= 2.34 and CPUs supporting the x86_64-v2 + # instruction set (see https://github.com/pypa/manylinux/issues/1725), + # so manylinux2014 (glibc 2.17) can no longer be used here. + CIBW_MANYLINUX_I686_IMAGE: manylinux_2_34 + CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_34 + CIBW_ENVIRONMENT_LINUX: "CLIDRIVER_VERSION=v12.1.0" CIBW_SKIP: "cp38-* *t-* *-musllinux_* *-*linux_{aarch64,ppc64le}" CIBW_REPAIR_WHEEL_COMMAND_LINUX: auditwheel repair diff --git a/README.md b/README.md index 3b2fbc8b..fc6b3a29 100644 --- a/README.md +++ b/README.md @@ -60,12 +60,12 @@ If you face problems due to missing python header files while installing the dri If you have installed `DB2_RTC*` i.e. **DB2 Runtime Client** and want `ibm_db` to use it instead of clidriver, please read [this comment](https://github.com/ibmdb/python-ibmdb/issues/1023#issuecomment-3062805368) and take action. -- clidriver v12.1 on Linux uses x86_64_v2 instruction set which is not supported by cibuildwheel and wheel image creation [fails](https://github.com/pypa/manylinux/issues/1725) using v12.1 clidriver. So, default version of clidriver on Linux platform is v11.5.9 only. +- clidriver v12.1 on Linux requires glibc >= 2.34 and a CPU supporting the x86_64-v2 instruction set (e.g. Ubuntu 21.10+, RHEL 9+, Debian 12+, Fedora 35+ on hardware from 2009 onwards). Official Linux wheels on PyPI are now built with v12.1 clidriver using the `manylinux_2_34` image (see [pypa/manylinux#1725](https://github.com/pypa/manylinux/issues/1725) for background). -- You can force installation of ibm_db on Linux with clidriver v12.1 using below commands: +- If your system does not meet the glibc/CPU requirement above, install ibm_db from source with the older v11.5.9 clidriver instead: ``` -export CLIDRIVER_VERSION=v12.1.0 +export CLIDRIVER_VERSION=v11.5.9 pip install ibm_db --no-binary :all: --no-cache-dir ``` @@ -477,7 +477,7 @@ conn = ibm_db.connect(connStr,'','') - For MacOSx64(Intel processor) and Linuxx64, **db2connect license of version 11.5** is required. -- clidriver v12.1 on Linux uses x86_64_v2 instruction set which is not supported by `cibuildwheel` and wheel image creation [fails](https://github.com/pypa/manylinux/issues/1725) using v12.1 clidriver. So, default version of clidriver on Linux platform is v11.5.9 only. +- clidriver v12.1 on Linux requires glibc >= 2.34 and a CPU supporting the x86_64-v2 instruction set (see [pypa/manylinux#1725](https://github.com/pypa/manylinux/issues/1725) for background). Official Linux wheels on PyPI are built with v12.1 clidriver using the `manylinux_2_34` image. - For activating server side license, you can purchase either `Db2 Connect Unlimited Edition for System z®` or `Db2 Connect Unlimited Edition for System i®` license from IBM. diff --git a/setup.py b/setup.py index ce4bbd14..b685f173 100644 --- a/setup.py +++ b/setup.py @@ -288,13 +288,9 @@ def print_exception( e, url): prebuildIbmdbPYD = True # Get version of clidriver for autodownload from environment variable CLIDRIVER_VERSION -# Default version is v12.1.0 for non-linux platform. +# Default version is v12.1.0 for all platforms, including linux. clidriver_version = os.getenv("CLIDRIVER_VERSION", "v12.1.0") -# Default version is v11.5.9 for linux. clidriver v12.1.0 for linux uses x86_64_V2 instruction set which is not supported by cibuildwheel -if ('linux' == sys.platform): - clidriver_version = os.getenv("CLIDRIVER_VERSION", "v11.5.9") - if ((ibm_db_home == '') and (ibm_db_dir == '') and (ibm_db_lib == '')): if('win32' not in sys.platform): sys.stdout.write("Detected platform = " + sys.platform + ", uname = " + os.uname()[4] + "\n") From b0288fadda407fb8a6dabb3e4d2ddc77fbcab3f5 Mon Sep 17 00:00:00 2001 From: Bimal Jha Date: Mon, 10 Aug 2026 11:58:19 -0600 Subject: [PATCH 2/5] run workflow for all branches --- .github/workflows/bld_wheels_and_upload.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bld_wheels_and_upload.yml b/.github/workflows/bld_wheels_and_upload.yml index 53372c8f..47600234 100644 --- a/.github/workflows/bld_wheels_and_upload.yml +++ b/.github/workflows/bld_wheels_and_upload.yml @@ -5,7 +5,7 @@ on: pull_request: push: branches: - - master + - * # Sequence of patterns matched against refs/tags tags: - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 From 3951c740e48e7d79850c901d0d588a8c1a245fc5 Mon Sep 17 00:00:00 2001 From: Bimal Jha Date: Mon, 10 Aug 2026 12:01:04 -0600 Subject: [PATCH 3/5] fix syntax errro in workflow file --- .github/workflows/bld_wheels_and_upload.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bld_wheels_and_upload.yml b/.github/workflows/bld_wheels_and_upload.yml index 47600234..6f1c6edb 100644 --- a/.github/workflows/bld_wheels_and_upload.yml +++ b/.github/workflows/bld_wheels_and_upload.yml @@ -5,7 +5,7 @@ on: pull_request: push: branches: - - * + - '*' # Sequence of patterns matched against refs/tags tags: - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 From a6be350280ae7a4be0dff5baa2b4ddec7782b35f Mon Sep 17 00:00:00 2001 From: Bimal Jha Date: Mon, 10 Aug 2026 13:24:59 -0600 Subject: [PATCH 4/5] fix compilation issue with gcc14 --- ibm_db.c | 1 + setup.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ibm_db.c b/ibm_db.c index c9363119..52d164c7 100644 --- a/ibm_db.c +++ b/ibm_db.c @@ -28,6 +28,7 @@ #include #include "ibm_db.h" #include +#include #ifdef _WIN32 #include #else diff --git a/setup.py b/setup.py index b685f173..363c4766 100644 --- a/setup.py +++ b/setup.py @@ -288,8 +288,7 @@ def print_exception( e, url): prebuildIbmdbPYD = True # Get version of clidriver for autodownload from environment variable CLIDRIVER_VERSION -# Default version is v12.1.0 for all platforms, including linux. -clidriver_version = os.getenv("CLIDRIVER_VERSION", "v12.1.0") +clidriver_version = os.getenv("CLIDRIVER_VERSION", "") if ((ibm_db_home == '') and (ibm_db_dir == '') and (ibm_db_lib == '')): if('win32' not in sys.platform): @@ -379,7 +378,8 @@ def print_exception( e, url): ibm_db_lib_runtime = os.path.join('$ORIGIN', 'clidriver', 'lib') ibm_db_dir = 'clidriver' ibm_db_lib = os.path.join(ibm_db_dir, 'lib') - clidriver_version = clidriver_version + "/" + if(clidriver_version and not clidriver_version.endswith("/")): + clidriver_version = clidriver_version + "/" if not os.path.isdir('clidriver'): if 'IBM_DB_INSTALLER_URL' in os.environ: From bf6ca7271a63d24499933d433404588a88a17931 Mon Sep 17 00:00:00 2001 From: Bimal Jha Date: Mon, 10 Aug 2026 13:34:51 -0600 Subject: [PATCH 5/5] fix repair wheel error for linux --- .github/workflows/bld_wheels_and_upload.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bld_wheels_and_upload.yml b/.github/workflows/bld_wheels_and_upload.yml index 6f1c6edb..b72f9936 100644 --- a/.github/workflows/bld_wheels_and_upload.yml +++ b/.github/workflows/bld_wheels_and_upload.yml @@ -75,10 +75,10 @@ jobs: # so manylinux2014 (glibc 2.17) can no longer be used here. CIBW_MANYLINUX_I686_IMAGE: manylinux_2_34 CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_34 - CIBW_ENVIRONMENT_LINUX: "CLIDRIVER_VERSION=v12.1.0" CIBW_SKIP: "cp38-* *t-* *-musllinux_* *-*linux_{aarch64,ppc64le}" CIBW_REPAIR_WHEEL_COMMAND_LINUX: auditwheel repair + --disable-isa-ext-check --exclude libdb2.so.1 --exclude libDB2xml4c.so.58 --exclude libm.so.6