Skip to content

configure --with-glibc-be-dir override is silently ignored #173

Description

@SamHerts

Bug:

The --with-glibc-be-dir=DIR configure option is documented as the supported method for specifying a non-standard back-end glibc path on heterogeneous clusters.

The option is silently ignored at configure time due to an argument-processing ordering bug.

Detection block:

Spindle/configure.common.ac

Lines 374 to 379 in ba9bbcc

if test "x$GLIBC_BE_DIR" = "x"; then
# Get glibc location on front-end
CAT=`which cat`
LIBC_FILE=`ldd $CAT | grep libc | awk -F ' ' '{print $3}'`
GLIBC_BE_DIR=`dirname $LIBC_FILE`
fi

But argument parsing happens 40 lines later and GLIBC_BE_DIR is already set, so the assignment GLIBC_BE_DIR=${withval} has no effect

Spindle/configure.common.ac

Lines 416 to 418 in ba9bbcc

AC_ARG_WITH(glibc-be-dir,
[AS_HELP_STRING([--with-glibc-be-dir=DIR],[If glibc on compute nodes is installed in a non-standard location, then DIR is the directory containing libc.so.6])],
[GLIBC_BE_DIR=${withval}])

Steps to recreate:

cd containers/spindle-serial-ubuntu
docker compose build
docker compose up -d
docker exec spindlenode grep 'GLIBC_BE_DIR' /home/spindleuser/Spindle-build/src/client/Makefile
GLIBC_BE_DIR = /lib/aarch64-linux-gnu

Reconfigure with glibc being set to a false path:

docker exec spindlenode bash -c '
    cd ~/Spindle-build
    ../../Spindle/configure \
      --prefix=~/Spindle-inst \
      --enable-sec-munge \
      --with-rm=serial \
      --with-localstorage=/tmp \
      --with-glibc-be-dir=/definitely/not/real \
    2>&1 | grep -i glibc
  '
docker exec spindlenode grep 'GLIBC_BE_DIR' /home/spindleuser/Spindle-build/src/client/Makefile
GLIBC_BE_DIR = /lib/aarch64-linux-gnu

Fix:

Move AC_ARG_WITH(glibc-be-dir, ...) before the detection block so the if test "x$GLIBC_BE_DIR" = "x" guard correctly short-circuits when a user provides an explicit path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions