This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libtool hates twiddling


Robert Boehne wrote:
> 
> 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.

It's more than that - any metachar in the path to $CC will also
break.  Certainly GCC itself doesn't have these limitations,
and indeed libtool works with '~' in paths otherwise - it's only
the tag inference bits that fail.

Incidentally, I pruned out part of my original message - Apple's
general build process for OS X uses pathnames with '~' in them,
in a way that can't be changed without blowing our schedule,
so this is actually a showstopper for us using the latest GCC
on OS X.

Stan

> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]