Status: resolved
Severity:
failure
Category: Critcl
Created: 2007-08-16
Updated: 2008-01-09
I found several problems with Critcl 2.0. The first is that it does not support long filenames containing spaces on Windows. The second is that critcl::failed depends on $v::libsrc, which is never declared. The patch (based on http://www.equi4.com/pub/sk/critcl2.kit) is following:
diff -druN critcl.orig/Config critcl/Config
--- critcl.orig/Config Sat Mar 31 21:46:47 2007
+++ critcl/Config Thu Aug 16 13:02:48 2007
@@ -50,7 +50,7 @@
debug_memory -DTCL_MEM_DEBUG
debug_symbols -g
object .o
-output -o $outfile
+output -o [list $outfile]
link_debug
link_release
link_preload --unresolved-symbols=ignore-in-shared-libs
@@ -166,7 +166,7 @@
ix86-win32-cl object .obj
ix86-win32-cl debug_symbols -W3 -Od -Z7 -GZ -MDd -D_DEBUG
ix86-win32-cl optimize -W3 -O2 -Op -Gs -MD -DNDEBUG
-ix86-win32-cl output -Fo$outfile
+ix86-win32-cl output [list -Fo$outfile]
ix86-win32-cl ldoutput -dll -out:
ix86-win32-cl link_debug -debug:full -debugtype:cv
ix86-win32-cl link_release -release -opt:ref -opt:icf,3
diff -druN critcl.orig/critcl.tcl critcl/critcl.tcl
--- critcl.orig/critcl.tcl Thu Mar 29 11:27:33 2007
+++ critcl/critcl.tcl Thu Aug 16 13:04:44 2007
@@ -133,6 +133,8 @@
link_preload
}
+ variable libsrc ""
+
}
# keep config options in a namespace
@@ -483,7 +485,7 @@
variable run
set cmdline "$c::compile $v::cflags $c::threadflags $c::tclstubs $copts"
set outfile $obj
- append cmdline " [subst $c::output] $src"
+ append cmdline " [subst $c::output] [list $src]"
if {$v::options(language) != ""} {
# Allow the compiler to determine the type of file
# otherwise it will try to compile the libs
@@ -738,8 +740,8 @@
if {[llength $v::preload]} {
append cmdline " $c::link_preload"
}
- append cmdline " $libfile "
- append cmdline [join $v::objs]
+ append cmdline " [list $libfile] "
+ append cmdline $v::objs
append cmdline " $libs $v::ldflags"
set outfile $target
append cmdline " $c::strip [subst $c::output]"
@@ -763,7 +765,7 @@
set src [file join $v::cache preload.c]
set obj [file join $v::cache preload.o]
compile $src $src $copts $lfd $obj
- set cmdline "$c::link $obj $c::strip [subst $c::output]"
+ set cmdline "$c::link [list $obj] $c::strip [subst $c::output]"
puts $lfd "\n$cmdline"
interp transfer {} $lfd $run
if {[catch {
@@ -897,7 +899,7 @@
set hdrs [append v::code($file,hdrs) ""] ;# make sure it exists
set cmdline "$c::compile $v::cflags $copts $hdrs"
set outfile $pref$c::object
- append cmdline " [subst $c::output] [file normalize $src]"
+ append cmdline " [subst $c::output] [list [file normalize $src]]"
if {[catch {interp eval $run exec $cmdline} err]} {
set result 0
} else {
- 2007-08-16 Alexey Borzenkov
I hope this time it will be properly formatted:
diff -druN critcl.orig/Config critcl/Config --- critcl.orig/Config Sat Mar 31 21:46:47 2007 +++ critcl/Config Thu Aug 16 13:02:48 2007 @@ -50,7 +50,7 @@ debug_memory -DTCL_MEM_DEBUG debug_symbols -g object .o -output -o $outfile +output -o [list $outfile] link_debug link_release link_preload --unresolved-symbols=ignore-in-shared-libs @@ -166,7 +166,7 @@ ix86-win32-cl object .obj ix86-win32-cl debug_symbols -W3 -Od -Z7 -GZ -MDd -D_DEBUG ix86-win32-cl optimize -W3 -O2 -Op -Gs -MD -DNDEBUG -ix86-win32-cl output -Fo$outfile +ix86-win32-cl output [list -Fo$outfile] ix86-win32-cl ldoutput -dll -out: ix86-win32-cl link_debug -debug:full -debugtype:cv ix86-win32-cl link_release -release -opt:ref -opt:icf,3 diff -druN critcl.orig/critcl.tcl critcl/critcl.tcl --- critcl.orig/critcl.tcl Thu Mar 29 11:27:33 2007
- 2007-11-18 jcw
(Changed: stat desc)
- 2008-01-09 stevel
fixed in SVN, also protect whitespace in ldargs too
