Hi,
My problem is a simple one : I'm trying to wrap a personnal application into an executable for linux (windows will come next :)). As I'm new to TclDevKit and tclapp usage, I thought I had problems to understand how to use tclapp, but after 5 days I begin to think there is perhaps a bug .. or a problem in my TclDevKit and ActiveTcl installations.
I try many things and here is the log of a simple tclapp test, where every package is taken from http://teapot.activestate.com.
Tcl Dev Kit TclApp
| Copyright (C) 2001-2008 ActiveState Software Inc. All rights reserved.
| Standard license for Michael Magoga .
|
| Embedding license information into wrap result as comments.
|
Command line:
/usr/local/TclDevKit/bin/tclapp -compile -prefix teapot:base-tk/8.4.19.2.287821/linux-glibc2.3-ix86 -compilefor 8.4 -out /home/michael/tclapp-out -architecture linux-glibc2.3-ix86 -pkgref BWidget -pkgref Itcl -pkgref Itk -pkgref Iwidgets -pkgref Tk -pkgref base64 -pkgref blowfish -pkgref math::interpolate -pkgref struct -pkgref tablelist -pkgref tar -pkgref zlib /home/michael/tmp/Distrib_temp/Nt_STM/bin/Nt_STM.tcl -startup lib/application/bin/Nt_STM.tcl
Wrapping ...
Expanding...
Following only profile dependencies
Accepting missing dependencies
Accepting version changes made by fuzzy searchP package Itcl 3.4 linux-glibc2.3-ix86 ...
P package Itcl 3.4 tcl ...
P package Tk 8.4 linux-glibc2.3-ix86 ...
P package Tk 8.4 tcl ...
P package zlib 1.0 linux-glibc2.3-ix86 ...Issues...
Packages ...
tbcload 1.7 linux-glibc2.2-ix86 @ R http://teapot.activestate.com
tbcload 1.7 linux-glibc2.3-ix86 @ R http://teapot.activestate.com
BWidget 1.8 tcl @ R http://teapot.activestate.com
Itcl 3.4 linux-glibc2.2-ix86 @ R http://teapot.activestate.com
P Itcl 3.4 linux-glibc2.3-ix86 @
P Itcl 3.4 tcl @
Itk 3.4 linux-glibc2.2-ix86 @ R http://teapot.activestate.com
Itk 3.4 linux-glibc2.3-ix86 @ R http://teapot.activestate.com
Iwidgets 4.0.2 tcl @ R http://teapot.activestate.com
P Tk 8.4 linux-glibc2.3-ix86 @
P Tk 8.4 tcl @
base64 2.4 tcl @ R http://teapot.activestate.com
blowfish 1.0.4 tcl @ R http://teapot.activestate.com
math::interpolate 1.0.2 tcl @ R http://teapot.activestate.com
struct 2.1 tcl @ R http://teapot.activestate.com
tablelist 4.10 tcl @ R http://teapot.activestate.com
tar 0.4 tcl @ R http://teapot.activestate.com
P zlib 1.0 linux-glibc2.3-ix86 @Removing temporary prefix file /home/michael/tmp/TCLAPPTMP12493/tclapp_temppyeJtYAa6cW
Inserting TEApot metadata
Nothing to inserttar 0.4 (tcl)
base64 2.4 (tcl)
tbcload 1.7 (linux-glibc2.3-ix86)
No meta data to cut
Itcl 3.4 (linux-glibc2.2-ix86)
Cutting out the meta data
math::interpolate 1.0.2 (tcl)
struct 2.1 (tcl)
Itk 3.4 (linux-glibc2.3-ix86)
Cutting out the meta data
tbcload 1.7 (linux-glibc2.2-ix86)
No meta data to cut
Iwidgets 4.0.2 (tcl)
Cutting out the meta data
BWidget 1.8 (tcl)
Cutting out the meta data
Itk 3.4 (linux-glibc2.2-ix86)
Cutting out the meta data
tablelist 4.10 (tcl)
blowfish 1.0.4 (tcl)
Extending the list of provided packagesF* 7KiB /opt/TclDevKit-5.0/bin/tdkbase/lib/P-tcl/platform1.0.3/implementation.tcl
F* 911KiB /home/michael/tmp/Distrib_temp/Nt_STM/bin/Nt_STM.tcl
Running defered bytecode compilation
Using external compiler /opt/TclDevKit-5.0/bin/tclcompiler84
For Tcl 8.4
TclApp based on Tcl 8.5.5Generated /home/michael/tclapp-out
Done| Embedded license information into wrap result as comments.
| Standard license for Michael Magoga .
And when I launch the tclapp-out executable, I obtain :
/home/michael/tclapp-out/lib/platform.tcl: The TclPro ByteCode Loader is not available or does not support the correct version -- can't find package tbcload 1.6
while executing
"source [file join $starkit::topdir lib platform.tcl]"
(file "/home/michael/tclapp-out/main.tcl" line 19)
This occurs even with a really simple application with no packages :(.
Hello Michael.
Thank you for this report. May I ask you to add this as a bug to ActiveState's bug tracker ?
Right now it seems to be a problem in TclApp.
When you look at the log you pasted note how it double-wraps tbcload, for glibc2.2 and glibc2.3. I believe that the wrapped application simply tries to use the wrong of the two wrapped binaries (for your platform), and that makes tbcload fail.
One thing to try would be to not compile the application, dropping the dependency on tbcload. This should get you farther. I do not expect a full success as I noted that 'ITk' is double-wrapped for 2.2/2.3 as well.
This is definitely something I would like to track in our bugsystem. It will also allow us to attach more data to the report.
This has been fixed and the fix verified by Michael.
Fixed may be too strong a claim... should the fix have been in TclDevKit5.0.1.288034-win32-ix86-threaded.exe downloaded on 2008/11/27? With that version installed, I'm seeing issues that seem related:
With an uncompiled package:
error reading package index file /home/paul/transfer/sklnx64.exe/lib/package21.0a1/pkgIndex.tcl: can't find package XOTcl <- repeated many times
boo was called with args: what a crock! <- and then it worked :)
With a compiled package:
tclapp_app1_cmp_linux/lib/package11.0a1/version.tcl: The TclPro ByteCode Loader is not available or does not support the correct version -- can't find package tbcload 1.6 <- repeated many times
Segmentation fault <- and then it didn't work :(
Simple testcases are available for both if you want them.
Thanks,
Paul