Skip to content

Commit 127333a

Browse files
committed
debug: Add runtime checks for excluded system libraries in build_package.sh and enforce source build for Python in install_deps.sh to ensure GLIBC compatibility
1 parent 567ce30 commit 127333a

File tree

2 files changed

+41
-3
lines changed

2 files changed

+41
-3
lines changed

.github/packaging/project/build_package.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,35 @@ function build_packages(){
6161
fi
6262
echo "=== Binary size and type ==="
6363
ls -lh "$GIT_DIR/build/bin/asadm" || echo "Could not get binary size info"
64+
65+
echo "=== Verifying excluded system libraries are NOT bundled ==="
66+
# Check for one-file mode
67+
if [ -f "$GIT_DIR/build/bin/asadm" ] && [ ! -d "$GIT_DIR/build/bin/asadm" ]; then
68+
echo "One-file mode detected - checking bundled libraries via extraction test"
69+
# For one-file mode, we can't easily check without extracting, so we'll test at runtime
70+
echo "Will verify at runtime that system libraries are used"
71+
# Check for one-dir mode
72+
elif [ -d "$GIT_DIR/build/bin/asadm" ]; then
73+
echo "One-dir mode detected - checking _internal directory for excluded libraries"
74+
INTERNAL_DIR="$GIT_DIR/build/bin/asadm/_internal"
75+
if [ -d "$INTERNAL_DIR" ]; then
76+
echo "Checking for libgcc_s.so.1..."
77+
if find "$INTERNAL_DIR" -name "libgcc_s.so.1" 2>/dev/null | grep -q "libgcc_s"; then
78+
echo "WARNING: libgcc_s.so.1 found in bundle (may cause glibc issues)"
79+
find "$INTERNAL_DIR" -name "libgcc_s.so.1" -exec ls -la {} \;
80+
else
81+
echo "✓ libgcc_s.so.1 NOT found in bundle (good)"
82+
fi
83+
echo "Checking for other excluded system libraries..."
84+
for lib in libc.so.6 libm.so.6 libpthread.so.0 libdl.so.2 librt.so.1; do
85+
if find "$INTERNAL_DIR" -name "$lib" 2>/dev/null | grep -q "$lib"; then
86+
echo "WARNING: $lib found in bundle"
87+
else
88+
echo "$lib NOT found in bundle (good)"
89+
fi
90+
done
91+
fi
92+
fi
6493
else
6594
echo "Binary not found at expected location"
6695
find "$GIT_DIR/build" -name "asadm" -exec ls -la {} \;

.github/packaging/project/install_deps.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,18 @@ function install_deps_el9() {
208208
echo "Available GLIBC versions in system:"
209209
find /lib* /usr/lib* -name "libc.so.*" -exec strings {} \; 2>/dev/null | grep "GLIBC_" | sort -V | uniq | tail -10
210210

211-
echo "=== Installing Python with asdf (will show if it downloads pre-compiled vs compiles) ==="
212-
# First, try normal installation to see what happens
213-
asdf install python 3.10.18
211+
echo "=== Installing Python with asdf (FORCING BUILD FROM SOURCE for glibc 2.34 compatibility) ==="
212+
# Force building Python from source instead of downloading pre-built binary
213+
# This ensures all libraries (especially libgcc_s.so.1) are compatible with el9's glibc 2.34
214+
export PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations"
215+
export ASDF_PYTHON_BUILD_VERBOSE=1
216+
# Force build from source by clearing any cached prebuilt versions
217+
rm -rf /root/.asdf/installs/python/3.10.18 || true
218+
rm -rf /tmp/python-build.* || true
219+
# Prevent asdf-python from using prebuilt binaries
220+
export ASDF_PYTHON_PATCH_URL=""
221+
export PYTHON_BUILD_SKIP_MIRROR=1
222+
asdf install python 3.10.18 --verbose
214223

215224
echo "=== POST asdf install: Checking Python GLIBC dependencies ==="
216225
echo "Python binary dependencies:"

0 commit comments

Comments
 (0)