diff --git a/CHANGELOG-AIX.md b/CHANGELOG-AIX.md index 70db30a37253..bcd812e30d95 100644 --- a/CHANGELOG-AIX.md +++ b/CHANGELOG-AIX.md @@ -11,6 +11,7 @@ - Agent and trace-agent wrappers now append the caller's `LIBPATH` to the agent's own library search path, so operator-set paths (e.g. custom driver directories) are visible to the agent at runtime +- `pip install` for C extensions (e.g. `ibm_db` for the DB2 check) no longer requires GCC 8 specifically; the embedded Python now records the compiler as `gcc` so any GCC version in the customer's PATH is used - Agent and trace-agent wrappers include the `ibm_db` clidriver path (`embedded/lib/python3.13/site-packages/clidriver/lib`) in LIBPATH so the `ibm_db2` check can load `libdb2` at runtime after `pip install ibm_db` - Bundle `pymqi` in the package so the `ibm_mq` and `ibm_ace` checks work out of the box (no manual `pip install` required); IBM MQ Client 9.1+ must be installed on the target host at runtime - Go checks: bundle `conf.yaml.example` and `conf.yaml.default` from integrations-core for all Go checks that have them, supplementing the agent-repo config (agent-repo takes precedence on filename conflicts) diff --git a/packaging/aix/lib/env.sh b/packaging/aix/lib/env.sh index 4aa09f63d74d..f91d07bcd2f0 100644 --- a/packaging/aix/lib/env.sh +++ b/packaging/aix/lib/env.sh @@ -71,8 +71,23 @@ if [ ! -x /opt/freeware/bin/gcc-8 ]; then printf 'ERROR: gcc-8 not found. Install it with: yum install -y gcc8 gcc8-c++\n' >&2 exit 1 fi -CC=/opt/freeware/bin/gcc-8 -CXX=/opt/freeware/bin/g++-8 + +# Create private gcc/g++ symlinks pointing to gcc-8 in $BUILD_DIR/bin and +# prepend that directory to PATH. This lets us set CC=gcc (the generic name) +# so Python records 'gcc' in _sysconfigdata_, not '/opt/freeware/bin/gcc-8'. +# Customers can then build C extensions (e.g. ibm_db) with any gcc version in +# their PATH, not just gcc-8 specifically. +# /opt/freeware/bin/gcc already exists on the build host but points to gcc-13; +# using a private directory avoids clobbering that symlink. +mkdir -p "$BUILD_DIR/bin" +ln -sf /opt/freeware/bin/gcc-8 "$BUILD_DIR/bin/gcc" +ln -sf /opt/freeware/bin/g++-8 "$BUILD_DIR/bin/g++" +# $BUILD_DIR/bin is prepended to PATH in the Go toolchain section below, +# after that section establishes /opt/go/bin and /opt/freeware/bin, so our +# directory wins the gcc/g++ name lookup. + +CC=gcc +CXX=g++ NM="/usr/bin/nm -X64" ARFLAGS="-X64 -cru" OBJECT_MODE=64 @@ -97,7 +112,7 @@ export CFLAGS CXXFLAGS LDFLAGS CPPFLAGS # ── PATH and Go toolchain ───────────────────────────────────────────────────── -PATH=/opt/go/bin:/opt/freeware/bin:/usr/sbin:/usr/bin:/bin:$PATH +PATH=$BUILD_DIR/bin:/opt/go/bin:/opt/freeware/bin:/usr/sbin:/usr/bin:/bin:$PATH GOPATH=/home/gopath GOROOT=/opt/go CGO_ENABLED=1