[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libtool-1.5.2 fails when there's a ~ in CC
From: |
Geoff Keating |
Subject: |
libtool-1.5.2 fails when there's a ~ in CC |
Date: |
Tue, 3 Feb 2004 17:07:23 -0800 |
libtool-1.5.2 fails in --mode=compile when there's a ~ in CC.
To reproduce:
$ cd /Volumes/Data/build/ # or any other convenient directory
$ mkdir libtool
$ cd libtool
$ tar zxf ~/co/libtool-1.5.2.tar.gz
$ mkdir a~dir
$ ln -s /usr/bin/gcc a~dir/gcc
$ cd libtool-1.5.2
$ CC=/Volumes/Data/build/libtool/a~dir/gcc ./configure && make
Results:
...
config.status: executing depfiles commands
chmod +x libtoolize
Making all in libltdl
make all-am
/bin/sh ./libtool --mode=compile /Volumes/Data/build/libtool/a~dir/gcc
-DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c -o ltdl.lo ltdl.c
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
make[2]: *** [ltdl.lo] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
This also happens when you do:
CC="gcc -I/Volumes/Data/build/libtool/a~dir/" ./configure && make
and probably (I haven't checked) happens with -Wc.
It looks to me like the problem is that $base_compile becomes quoted,
as the options are read, by code like this:
case $lastarg in
# Double-quote args containing other shell metacharacters.
# Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately.
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
lastarg="\"$lastarg\""
;;
esac
and CC is set by:
CC="gcc -I/Volumes/Data/build/libtool/a~dir/"
which will lead to the quotes not actually being in the value of CC,
causing the test under this comment:
# Infer tagged configuration to use if any are available and
# if one wasn't chosen via the "--tag" command line option.
# Only attempt this if the compiler in the base compile
# command doesn't match the default compiler.
to fail. I guess you either want to make sure that $CC is quoted like
$base_compile, or remove one layer of quotes from $base_compile before
comparing it.
A final note: I haven't tried with other possible metacharacters. I'm
sure that having '*' in CC would be lots of fun. I only really care
about ~, though.
--
Geoff Keating <address@hidden>
smime.p7s
Description: S/MIME cryptographic signature
- libtool-1.5.2 fails when there's a ~ in CC,
Geoff Keating <=