bug#47000: git libtool compiler flag handling busted on HP-UX

Pavel Raiskup <[email protected]>
Newsgroups gmane.comp.gnu.libtool.bugs
Organization Red Hat, Inc.
Message-ID <6253318.K2JlShyGXD@raiskup>
Version: 2.4.6.47-fc77

On Monday, October 25, 2021 10:45:05 PM CET Nick Bowler wrote:
> Hi Pavel,
> 
> On 2021-10-24, Pavel Raiskup <[email protected]> wrote:
> > On Monday, March 8, 2021 5:13:23 AM CEST Nick Bowler wrote:
> >> On HP-UX 11.11, with libtool 2.4.6,
> [...]
> >> On investigation, it appears this problem occurs because the func_quote
> >> function in libtool attempts to split on backslashes by setting IFS='\'
> >> but this procedure appears ineffective on the HP-UX shell.  For example:
> >>
> >> % IFS='\'
> >> % hello='foo\bar\baz'
> >> % printf '%s\n' "$hello" $hello
> >> foo\bar\baz
> >> foo\bar\baz
> >
> > Thank you for the report!  And sorry for the delay.
> >
> > Would you mind testing 'make check' from this PR on the affected system?
> >
> >     https://github.com/gnulib-modules/bootstrap/pull/25
> 
> As the Makefile uses the GNU-specific $(shell ...) construction,
> "make check" does not work out of the box on HP-UX.  I worked around
> the problem by running
> 
>   % make abs_aux_dir=$PWD/build-aux abs_srcdir=$PWD/tests check
> 
> > I hope I fixed there the problem with IFS='\' (even though it is just a poor
> > fallback to the slower SED variant, anyone is welcome to provide better
> > solution).
> >
> > Perhaps there are other problems so it would be nice to see the testsuite
> > results.
> 
> The output (attached, gzipped) is not entirely obvious to me but I
> assume this means everything passed?  As a point of comparison, without
> your changes there are many errors reported.
> 
> For the record, the empty field bug described in the change log (which
> is observed with heirloom-sh and presumably also Solaris 10 /bin/sh)
> regarding empty fields does not appear to be a problem on HP-UX 11:

I tried to update the commit message(s) a but.  And I believe this is fixed now
(merged to libtool):
https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=fc7779d7d8edfec83ce74c39f197ae2f1225873a

Thank you for testing!
Pavel

>   % var='a::b'; IFS=':'; set dummy $var
>   % printf '%s\n' "$#" "$2" "$3" "$4"
>   4
>   a
> 
>   b
> 
> Thanks,
>   Nick
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.