This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: libtool hates twiddling
- From: Robert Boehne <rboehne at ricardo-us dot com>
- To: Stan Shebs <shebs at apple dot com>
- Cc: Jonathan Wakely <cow at compsoc dot man dot ac dot uk>, libstdc++ at gcc dot gnu dot org, libtool at gnu dot org
- Date: Mon, 14 Jan 2002 10:29:59 -0600
- Subject: Re: libtool hates twiddling
- Organization: Ricardo Software
- References: <3C420F1E.D0803772@apple.com> <20020114105541.A30596@compsoc.man.ac.uk> <3C42F03B.184F21DA@apple.com>
- Reply-to: rboehne at ricardo-us dot com
If I recall correctly, this type of thing is explicitly disallowed
but I'm not sure where (Autoconf? gcc?). The problem is easily
gotten around with --prefix=`echo ~` so it isn't much of a problem.
Robert
Stan Shebs wrote:
>
> Jonathan Wakely wrote:
> >
> > On Sun, Jan 13, 2002 at 02:50:06PM -0800, Stan Shebs wrote:
> >
> > > Making all in libmath
> > > /bin/sh ../libtool --mode=compile /Users/shebs/i/gcc/base/x~1/gcc/xgcc -B/Users/shebs/i/gcc/base/x~1/gcc/ -B/usr/local/powerpc-apple-darwin5.1/bin/ -B/usr/local/powerpc-apple-darwin5.1/lib/ -isystem /usr/local/powerpc-apple-darwin5.1/include -DHAVE_CONFIG_H -I. -I../../../../gcc/libstdc++-v3/libmath -I.. -g -c ../../../../gcc/libstdc++-v3/libmath/signbit.c
> > > libtool: compile: unable to infer tagged configuration
> > > libtool: compile: specify a tag with `--tag'
> > > make[3]: *** [signbit.lo] Error 1
> >
> > I see exactly the same problem on i586-pc-linux-gnu, if I use "--prefix=~"
> > to configure the build.
> >
> > I've never seen it said that --prefix=~ isn't allowed (although I can see
> > that if the arg is never interpreted by the shell it won't get expanded) so
> > is it supposed to work? If not, is there a way to prevent me from using it,
> > or to make it clear why the build has failed?
>
> The problem is that libtool actually tries to do the right thing
> for '~' and other chars in paths, by looking for known metachars
> and enclosing such arguments in "", but the tag inference machinery
> is comparing a $base_compile with quoted arguments to a value of
> CC pasted in by ltconfig that does not have anything quoted. So the
> string search fails.
>
> I've been able to get the build to finish by tweaking the generated
> libtool's CC directly, but it's not yet clear whether it's better to
> fix this by quoting CC sometime before it gets compared to base_compile,
> or to strip the double quotes from base_compile when comparing to CC.
> My guess is the former, but I'd be glad of guidance from experienced
> libtoolers.
>
> Stan