



The Tcl base kits included with ActiveTcl 4.0 are not running on the lastest Ubuntu 7.10 release.
Normally if you just execute the base kit base-tcl-linux-ix86, the Tcl interpeter will start up.
However, after upgading to Ubuntu 7.10, the program just exits imediately. Any programs built using tclapp exhibit the same behavior.
# uname -a Linux Ubuntu-POD1 2.6.22-14-generic #1 SMP Sun Oct 14 23:05:12 GMT 2007 i686 GNU/Linux
The TDK and ActiveTcl are separate products, so I want to ask a few questions to understand better. Did these work before the Ubuntu 7.10 update? If so, what were you using?
Was ActiveTcl installed post-Ubuntu 7.10 update? Does the non-basekit Tcl work properly (eg. /opt/ActiveTcl/bin/tclsh)? Do any of the TDK apps function (these are themselves basekits)?
We have been running an older version of TDK (2.6) to create an executable that has been running on several different versions of Ubuntu. This was working in the last Ubuntu release (7.04). After installing Ubuntu 7.10, the same binary will no longer run.
http://www.ubuntu.com/getubuntu/releasenotes
I upgraded to the latest release of TDK to see if the issue still exists. I also downloaded ActiveTcl to get the latest base kit. The problem seems to lie in the statically linked base kits ( i.e. base-tcl-linux-ix86). Other dynamic binaries such as tclsh are working, but the base kit can not be run.
I don't have TDK actually installed on the Ubuntu machine so I am unable to verifify if the TDK apps work. I did install ActiveTcl to double check that tclsh is working and the static basekits are not.
In searching for any related info, I did come across one account of a program not working on ubuntu because of upx. The program needed to be unpacked first using 'upx -d'. This does not work on base-tcl-linux-ix86 since upx does not recognize the file as a upx executable.
First, on Linux we do upx compress the basekit runtime. That 'upx -d' is not recognizing it as such is likely because of the virtual filesystem attached at the end.
If you have the 'sdx' application (a utility to manipulate starkits and starpacks), then you can
% sdx mksplit basekit
# you now have basekit.head and basekit.tail. The head is the upx
# compressed tcl interpreter, the tail the virtual filesystem
% upx -d basekit.head
% cat basekit.head basekit.tail > basekit
The result is a non-upx compressed basekit.
I followed the steps above to decompress the basekit and now things are working on Ubuntu 7.10. It seems the original upx compressed basekits do not work by default on Ubuntu 7.10. I tried turning off AppArmor by running
# /etc/init.d/apparmor stop
But the results where the same for the upx compressed basekits.
Thanks for your help.
Are you by chance using AppArmor ?
The release notes mention
'Ubuntu 7.10 introduces an additional security layer called AppArmor'
and this may very well break upx-compressed executables.
We are updating our upx version which had change notes about improving some SELinux-related issues. Hopefully that addresses the core problem.
We have confirmed that the older version of upx that we were using for basekit compression was causing the problem. We are working on fully updated builds that use the latest upx which has been verified to run on 7.10GG.
Updated ActiveTcl and TDK releases to fix problems on Ubuntu 7.10GG have been issued.
ActiveTcl8.4.16.1
ActiveTcl8.5.0.0b10
TDK4.0.3
This release is Linux only. All other OS releases remain at the previous version number.
I am unable to re-install TclDevKit 3.2 on Ubuntu 7.10 operating system.
When I enter "sh install.sh", the command exits and no GUI pops up.
It turns out that install.sh uses tdkbase.
When I try to invoke tdkbase directly, it just exists.
The upx decompression fix noted about for 4.0.1 should work for 3.2 as well. Otherwise we have already published 4.0.3 with this issue fixed for all users.
I am using TclApp 4 to wrap an application that uses tcom.
Following is the error:
| Tcl Dev Kit TclApp
| Copyright (C) 2001-2008 ActiveState Software Inc. All rights reserved.
| Standard license for Raghunath Menon .
|
| Embedding license information into wrap result as comments.
|
Command line:
C:/TclDevKit/bin/tclapp.exe -icon 'C:\Apps\PST\SFE_Rel_v1\sh71.ico' -compile -compilefor 8.4 -prefix C:/Tcl/bin/base-tk-thread-win32-ix86.exe -verbose -out C:/Apps/PST/SFE_Rel_v1/sfe -noprovided -architecture win32-ix86 -pkgref Iwidgets -pkgref 'Tk 8.0' -pkgref dde -pkgref tcom -relativeto C:/Apps/PST C:/Apps/PST/SFE_Rel_v1/combobox.tcl C:/Apps/PST/SFE_Rel_v1/davinci3.gif C:/Apps/PST/SFE_Rel_v1/davinci4.gif C:/Apps/PST/SFE_Rel_v1/SFE_v1_rel.tcl C:/Apps/PST/SFE_Rel_v1/sh71.ico
Wrapping ...
Expanding...
Following only profile dependencies
Accepting missing dependencies
Accepting version changes made by fuzzy search
P package Tk 8.4 win32-ix86 ...
P package dde 1.2.4 win32-ix86 ...
Issues...
package 'tcom -is package' is not known (Specified, Not recoverable)
Aborting
Done
| Embedded license information into wrap result as comments.
| Standard license for Raghunath Menon .
Not sure why. Any thoughts?
Thanks,
Raghu
First off, I recommend upgrading to 4.0.4 if you do any work with 8.5. Otherwise, I suspect you just have a path problem. In TclApp, open Edit -> Preferences.
Under TAP Search paths, make sure you have C:/Tcl/lib and C:/Tcl/lib/tcl8.4 (assuming a standard ActiveTcl 8.4 install). If you happened to install ActiveTcl after TDK, then TDK is not able to seed these paths appropriately.
Ok, Thanks.
ALso I am using BLT for plotting. Any way I can wrap using TDK when using BLT?
Is there a stubs enabled version I can download?
Thanks.
RGM
The basekits used in TclApp can be either the ones shipped with ActiveTcl or another tclkit, such as dqkit (http://sourceforge.net/project/showfiles.php?group_id=99106&package_id=1...) that includes the BLT extension statically linked in.
An extension need only be compiled with stubs enabled to be used when wrapped, but this isn't a default configuration for BLT. There are patches on the NET to allow this if you chose to go that direction.
Jeff
Jeff,
I got the wrapping to work with dqkit. Thanks !
I wrapped my script minus the DLL's (the DLL's do some math). The wrapped simple app works fine.
Now when I try to load a few DLL's - (these load the BLT vectors. they also call other DLL's to do solve equations..), the wrapped app works fine on the box where it was wrapped ! However when I run it on my laptop, it gives me an error syaing it couldnt find my dll. I even tyried to wrap the DLL's, but still get the same error. Is there a special way to load the DLL's in my tcl script.
I load the DLL's in the following manner:
load my_dll01 SolvePDE
load my_dll02 LoadVec
load my_dll03 ResetVec
Appreciate your help.
Thanks.
Raghu
As with any extension, make sure that your dlls do not have any external dependencies and link against the static Tcl stub library. You can check this on a machine with MSVC installed by using the Dependency Walker. The dlls should only depend on standard Windows system dlls.
The DLL's I am using were indeed created using MSVC 6. I link to tclstub84.lib. Also, the dll's only depend on the std. Windows system dll's.
In the tcl script as shown above should I be using absoulte paths? I am not sure how the load path is defined.
I am puzzled why the executable is able to find the DLL's on my machine where I build, but not on another !
Thanks.
Raghu
Ah, you should not literally use [load mydll.dll Pkg] in your script. The location will be relative to something. If it is relative to your main script when you wrap, you would do:
load [file dirname [info script]]/mydll.dll Pkg
Jeff,
Thanks. That seems to work. In fact I am using the following:
load [file join [file dirname [info nameofexecutable]] mydll.dll] pkg
The above works fine as long as "mydll.dll" and the tcl script are in the same directory. When I moved the DLL's to ./lib, I get an error at runtime saying "cannot find mydll.dll...". BUT, when I added ./lib to path in windows, everyhting works again !
Should I be doing anyhting in the script to define path?
I tried lappend auto_path [file join [file dirname [info nameofexecutable]] lib] but it didnt seem to fix the problem.
Thanks.
Raghu
Forgot to mention that when I moved the DLL's to ./lib my load command does reflect this change to :
load [file join [file dirname [info nameofexecutable]] lib/mydll.dll] pkg
And I also include the dll's in the files to be wrapped