ports/66434: building vim WITH_TCL=1 breaks when parsing TCL_DEFS (causes 'cannot use -c with multiple files...' error)

Michael Edenfield kutulu at kutulu.org
Mon May 10 01:10:21 UTC 2004


>Number:         66434
>Category:       ports
>Synopsis:       building vim WITH_TCL=1 breaks when parsing TCL_DEFS (causes 'cannot use -c with multiple files...' error)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 09 18:10:19 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Michael Edenfield
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
>Environment:
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

>Description:

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:

source /usr/local/lib/tcl8.4/tclConfig.sh
echo $TCL_DEFS | tr ' ' '\012' | sed -e '/^-[^D]/d' -e '/-D[^_]/d' -e 's/-D_/ -D_/' | tr -d '\ 012'

>How-To-Repeat:

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.

>Fix:

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'`
+ 	    break
+ 	  fi
+ 	done
--- vim.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list