Subject: Re: bug#73620: libtool-2.5.3 broken on CentOS and Alma Linux

From: Bruno Haible <[email-masked]>
Date: Wed, 09 Oct 2024 23:04:05 +0200

Sergey Poznyakoff wrote:
> Ileana is absolutely right: the reason for this behavior is that some
> paths are excluded from compile_rpath in func_mode_link.  The original
> idea was to prevent paths from outside of the source tree from appearing
> before ones lying beneath it.  However, simply omitting such paths was
> not right, they should be reordered instead.  The attached patch fixes
> this.  With it, both bug_71489.at in libtool, and all tests in gettext
> pass.

Thanks. I confirm that with this patch, all gettext tests pass. The xgettext
wrapper script (attached) now has the complete relink command:

with libtool-2.5.3:
relink_command="(... -Wl,-rpath -Wl,/home/bruno/inst-x86_64-64/lib)"
with your new patch added:
relink_command="(... -Wl,-rpath -Wl,/home/bruno/gettext-2024-10-02/build-64/libtextstyle/lib/.libs -Wl,-rpath -Wl,/home/bruno/inst-x86_64-64/lib)"

Ileana Dumitrescu wrote:
> The relink command seems to be set by fast_install=yes:

Indeed, there is a difference here.

On Ubuntu 22.04:

$ grep fast_install ./gettext-runtime/libasprintf/config.status ./gettext-runtime/intl/config.status ./gettext-runtime/config.status ./libtextstyle/config.status ./gettext-tools/config.status
./gettext-runtime/libasprintf/config.status:enable_fast_install='needless'
./gettext-runtime/libasprintf/config.status:fast_install=$enable_fast_install
./gettext-runtime/intl/config.status:enable_fast_install='needless'
./gettext-runtime/intl/config.status:fast_install=$enable_fast_install
./gettext-runtime/config.status:enable_fast_install='needless'
./gettext-runtime/config.status:fast_install=$enable_fast_install
./libtextstyle/config.status:enable_fast_install='needless'
./libtextstyle/config.status:fast_install=$enable_fast_install
./gettext-tools/config.status:enable_fast_install='needless'
./gettext-tools/config.status:fast_install=$enable_fast_install

On Alma Linux 9:

$ grep fast_install ./gettext-runtime/libasprintf/config.status ./gettext-runtime/intl/config.status ./gettext-runtime/config.status ./libtextstyle/config.status ./gettext-tools/config.status
./gettext-runtime/libasprintf/config.status:enable_fast_install='yes'
./gettext-runtime/libasprintf/config.status:fast_install=$enable_fast_install
./gettext-runtime/intl/config.status:enable_fast_install='yes'
./gettext-runtime/intl/config.status:fast_install=$enable_fast_install
./gettext-runtime/config.status:enable_fast_install='yes'
./gettext-runtime/config.status:fast_install=$enable_fast_install
./libtextstyle/config.status:enable_fast_install='yes'
./libtextstyle/config.status:fast_install=$enable_fast_install
./gettext-tools/config.status:enable_fast_install='yes'
./gettext-tools/config.status:fast_install=$enable_fast_install

Where does this difference come from?
hardcode_action is 'immediate' in both cases.
inherit_rpath is 'no' in both cases.
shlibpath_overrides_runpath is 'yes' on Ubuntu, 'no' on Alma Linux.
Apparently the difference comes from the configure test marked with a comment
"Some binutils ld are patched to set DT_RUNPATH"

Bruno