ports/66434: building vim WITH_TCL=1 breaks when parsing TCL_DEFS (causes 'cannot use -c with multiple files...' error)
kutulu at kutulu.org
Mon May 10 01:10:21 UTC 2004
>Synopsis: building vim WITH_TCL=1 breaks when parsing TCL_DEFS (causes 'cannot use -c with multiple files...' error)
>Arrival-Date: Sun May 09 18:10:19 PDT 2004
>Originator: Michael Edenfield
>Release: FreeBSD 5.1-CURRENT i386
System: FreeBSD wombat.localnet 5.1-CURRENT FreeBSD 5.1-CURRENT #7: Sun Aug 24 21:35:57 EDT 2003 root at wombat.localnet:/usr/obj/usr/src/sys/ATHLON i386
Building vim WITH_TCL=1 crashes when vim tries to patch the TCL_DEFS output of tclConfig.sh. This is due to Tcl defining -DTCL_WIDE_INT_TYPE=long\ long as part of TCL_DEFS. vim's configure script runs this through "tr ' ' '\012' | sed ... | tr '\012' ' '" to extract just the definitions it cares about, but the extra "long" token is never removed.
The problem can be easily seen by running these two lines, taken from vim's configure script:
echo $TCL_DEFS | tr ' ' '\012' | sed -e '/^-[^D]/d' -e '/-D[^_]/d' -e 's/-D_/ -D_/' | tr -d '\ 012'
Try to build vim WITH_TCL=1. Note that I can only reproduce this on two of my three -CURRENT systems. It appears to depend on the environment and options used to build Tcl, the Tcl version, etc.
The correct fix would probably be to change the configure logic. Instead of deleting those items vim isn't interested it, it should probably explicitly include only those items it wants. In the mean time, the following patch removes any items that result from parsting TCL_DEFS that do not begin with a -, as they clearly cannot be command flags.
--- vim.patch begins here ---
diff -urN vim.orig/files/patch-configure vim/files/patch-configure
--- vim.orig/files/patch-configure Wed Dec 31 19:00:00 1969
+++ vim/files/patch-configure Sun May 9 20:50:02 2004
@@ -0,0 +1,11 @@
+--- auto/configure.orig Sun May 9 20:47:46 2004
++++ auto/configure Sun May 9 20:46:02 2004
+@@ -1931,7 +1931,7 @@
+ echo "$ac_t""$try/tclConfig.sh" 1>&6
+ . $try/tclConfig.sh
+ TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
+- TCL_DEFS=`echo $TCL_DEFS | tr ' ' '\012' | sed -e '/^-[^D]/d' -e '/-D[^_]/d' -e 's/-D_/ -D_/' | tr -d '\012'`
++ TCL_DEFS=`echo $TCL_DEFS | tr ' ' '\012' | sed -e '/^[^-]/d' -e '/^-[^D]/d' -e '/-D[^_]/d' -e 's/-D_/ -D_/' | tr -d '\012'`
--- vim.patch ends here ---
More information about the freebsd-ports-bugs