Skip to content
Tcl Source Code View Ticket
Login

View Ticket

pkgIndex.tcl doesn't get created with static Tcl build

Closed / Fixed2883850fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 17 years ago
Descriptionplain2009-10-22 11:39:33
In [Tk Bug #2875562] Andres Garcia Garcia (fandom) added the following comment:

> But, could please check whether 'package require registry' works for you?
> In my case, pkgIndex.tcl doesn't get created for the extension while it is
> when compiling with shared libraries.
nijtmansplain2009-10-22 18:40:52
Confirmed. Probably a problem in Tcl 8.5 as well.
fandomplain2009-10-27 16:44:02
The same problem happens with dde.

Since I don't use the extension myself, I only noticed it when trying to compile an 8.6 TclKitLite
nijtmansplain2009-11-19 07:05:09
Fixed in HEAD
dgpplain2009-11-19 10:49:58
The unix/tcltest executable now fails to compile:

/home/dgp/cvs/tcl/unix/tclAppInit.c: In function ‘Tcl_AppInit’:
/home/dgp/cvs/tcl/unix/tclAppInit.c:126: error: ‘Tcltest_SafeInit’ undeclared (first use in this function)
/home/dgp/cvs/tcl/unix/tclAppInit.c:126: error: (Each undeclared identifier is reported only once
/home/dgp/cvs/tcl/unix/tclAppInit.c:126: error: for each function it appears in.)
make: *** [tclTestInit.o] Error 1
nijtmansplain2009-11-19 17:34:30
File Added - 351618: tcl.patch
nijtmansplain2009-11-19 17:36:33
Yes, I forgot to update my files before synchronising, as a result unix/tclAppInit.c and win/tclAppInit.c are screwed up now.

Unfortunately, I'm behind a firewall now, which doesn't let me
check in the fix, but I attached the fix to this Issue. Please, someone
who can do it, fix it (trivially), otherwise I will do it tohight.

See attached patch.

Regards,
         Jan Nijtmans ;-(
nijtmansplain2009-11-19 17:40:58
Remark: The advantage of this change is that the Tcltest package now
contains all (binary) code needed to run the test suite. There is no need
to split it up in "procbodytest"/"objtest"/"threadtest" or whatever.
dgpplain2009-11-19 23:37:23
With the ability to build restored, we can
find the failing tests created by this change:

==== safe-10.1 testing statics loading FAILED
==== Contents of test case:

    set i [safe::interpCreate]
    list  [catch {interp eval $i {load {} Tcltest}} msg]  $msg  [safe::interpDelete $i];

---- Result was:
1 {can't read "msg": no such variable} {}
---- Result should have been (exact matching):
1 {can't use package in a safe interpreter: no Tcltest_SafeInit procedure} {}
==== safe-10.1 FAILED



==== safe-10.4 testing nested statics loading / -nestedloadok FAILED
==== Contents of test case:

    set i [safe::interpCreate -nestedloadok]
    list  [catch {interp eval $i {interp create x; load {} Tcltest x}} msg]  $msg  [safe::interpDelete $i];

---- Result was:
1 {can't read "msg": no such variable} {}
---- Result should have been (exact matching):
1 {can't use package in a safe interpreter: no Tcltest_SafeInit procedure} {}
==== safe-10.4 FAILED
dgpplain2009-11-20 05:28:42
Aha!  I didn't catch on to what you were doing.

[load]able Tcltest?  Very nice....
nijtmansplain2009-11-20 07:28:36
Well, safe-10.1 and safe-10.4 fixed now, Everything should be fine.
dgpplain2009-11-20 10:01:34
perhaps not the place to continue the topic,
but if Tcltest is becoming [load]able, I'm
interested how far we can push that...

[package require]-able?

bundled as a tcl/pkgs/subdir ?

Installed?
nijtmansplain2009-11-20 15:37:26
allow_comments - 1

>package require]-able?
>bundled as a tcl/pkgs/subdir ?
>Installed?

Sure, that's all possible, but still I would answer NO
to all of those. Tcltest should take the role of an
internal package which sole purpose is for local
testing, so it is part of the test suite.

Anyway, closing now
dgpplain2009-11-21 04:38:50
ok, but if it's a [load]able part of the
test suite, then at least we could do
away with the tcltest executable, and
its outdated "big wish" format.
Log in (anonymous is fine) to add a comment.

Attachments: