Discussion:
tcltls v1.7.23 and Tcl 9
(too old to reply)
Alan Grunwald
2024-09-29 12:33:45 UTC
Permalink
I have encountered a problem with the above extension under tcl9.0.0

After downloading
https://www.tcl3d.org/bawt/download/Preview/Tcl9/tcltls-1.7.23.7z, as
advertised on the "Porting extensions to Tcl 9" page on the wiki,
configuring using the line

./configure --prefix=/opt/tcl9.0.0 --with-tcl=/opt/tcl9.0.0/lib

building and installing, I cannot load the extension:

% package require tls
version conflict for package "tcl": have 9.0.0, need 8.4

The same error also occurs if I do

% load /opt/tcl9.0.0/lib/tcltls1.7.23/tcltls.so Tls

so I assume a problem in the .so file. I've had a quick look through the
sources, but I have no confidence that I can find the appropriate change.

Please can someone help?
Alan Grunwald
2024-09-29 13:24:04 UTC
Permalink
Post by Alan Grunwald
I have encountered a problem with the above extension under tcl9.0.0
After downloading
https://www.tcl3d.org/bawt/download/Preview/Tcl9/tcltls-1.7.23.7z, as
advertised on the "Porting extensions to Tcl 9" page on the wiki,
configuring using the line
./configure --prefix=/opt/tcl9.0.0 --with-tcl=/opt/tcl9.0.0/lib
    % package require tls
    version conflict for package "tcl": have 9.0.0, need 8.4
The same error also occurs if I do
    % load /opt/tcl9.0.0/lib/tcltls1.7.23/tcltls.so Tls
so I assume a problem in the .so file. I've had a quick look through the
sources, but I have no confidence that I can find the appropriate change.
Please can someone help?
Maybe I should have more confidence...

I changed line 1809 of tls.c from

Tcl_InitStubs(interp, "Tcl", "8.4", 0)

to

Tcl_InitStubs(interp, "Tcl", "8.4", 0) || Tcl_InitStubs(interp,
"Tcl", "9", 0)

and the package now loads ok. Once I've ploughed through several more
porting issues in my own code, I'll have an idea of whether the modified
tls works.
Paul Obermeier
2024-09-29 16:19:59 UTC
Permalink
Post by Alan Grunwald
Post by Alan Grunwald
I have encountered a problem with the above extension under tcl9.0.0
After downloading https://www.tcl3d.org/bawt/download/Preview/Tcl9/tcltls-1.7.23.7z, as advertised on the "Porting extensions to Tcl 9" page on the wiki, configuring using the line
./configure --prefix=/opt/tcl9.0.0 --with-tcl=/opt/tcl9.0.0/lib
     % package require tls
     version conflict for package "tcl": have 9.0.0, need 8.4
The same error also occurs if I do
     % load /opt/tcl9.0.0/lib/tcltls1.7.23/tcltls.so Tls
so I assume a problem in the .so file. I've had a quick look through the sources, but I have no confidence that I can find the appropriate change.
Please can someone help?
Maybe I should have more confidence...
I changed line 1809 of tls.c from
    Tcl_InitStubs(interp, "Tcl", "8.4", 0)
to
    Tcl_InitStubs(interp, "Tcl", "8.4", 0) || Tcl_InitStubs(interp, "Tcl", "9", 0)
and the package now loads ok. Once I've ploughed through several more porting issues in my own code, I'll have an idea of whether the modified tls works.
As long as I was testing with Tcl9 beta versions, the "8.4" in Tcl_InitStubs or Tk_InitStubs worked.
Since using official Tcl9 this does not work anymore, so I switched to use "8.4-" as is done with "package require" calls.

I forgot to update the preview page with the changed packages.
Will do today or tomorrow.

Paul
Paul Obermeier
2024-09-29 17:29:24 UTC
Permalink
Post by Paul Obermeier
Post by Alan Grunwald
Post by Alan Grunwald
I have encountered a problem with the above extension under tcl9.0.0
After downloading https://www.tcl3d.org/bawt/download/Preview/Tcl9/tcltls-1.7.23.7z, as advertised on the "Porting extensions to Tcl 9" page on the wiki, configuring using the line
./configure --prefix=/opt/tcl9.0.0 --with-tcl=/opt/tcl9.0.0/lib
     % package require tls
     version conflict for package "tcl": have 9.0.0, need 8.4
The same error also occurs if I do
     % load /opt/tcl9.0.0/lib/tcltls1.7.23/tcltls.so Tls
so I assume a problem in the .so file. I've had a quick look through the sources, but I have no confidence that I can find the appropriate change.
Please can someone help?
Maybe I should have more confidence...
I changed line 1809 of tls.c from
     Tcl_InitStubs(interp, "Tcl", "8.4", 0)
to
     Tcl_InitStubs(interp, "Tcl", "8.4", 0) || Tcl_InitStubs(interp, "Tcl", "9", 0)
and the package now loads ok. Once I've ploughed through several more porting issues in my own code, I'll have an idea of whether the modified tls works.
As long as I was testing with Tcl9 beta versions, the "8.4" in Tcl_InitStubs or Tk_InitStubs worked.
Since using official Tcl9 this does not work anymore, so I switched to use "8.4-" as is done with "package require" calls.
I forgot to update the preview page with the changed packages.
Will do today or tomorrow.
Paul
Updated relevant packages at the BAWT preview page.
Note, that version 1.7.23 is based upon 1.7.22, which is 4 years old.
You might also check the current trunk of tcltls at https://core.tcl-lang.org/tcltls

Paul
Alan Grunwald
2024-09-29 20:47:05 UTC
Permalink
Post by Paul Obermeier
Post by Paul Obermeier
Post by Alan Grunwald
Post by Alan Grunwald
I have encountered a problem with the above extension under tcl9.0.0
After downloading
https://www.tcl3d.org/bawt/download/Preview/Tcl9/tcltls-1.7.23.7z,
as advertised on the "Porting extensions to Tcl 9" page on the wiki,
configuring using the line
./configure --prefix=/opt/tcl9.0.0 --with-tcl=/opt/tcl9.0.0/lib
     % package require tls
     version conflict for package "tcl": have 9.0.0, need 8.4
The same error also occurs if I do
     % load /opt/tcl9.0.0/lib/tcltls1.7.23/tcltls.so Tls
so I assume a problem in the .so file. I've had a quick look through
the sources, but I have no confidence that I can find the
appropriate change.
Please can someone help?
Maybe I should have more confidence...
I changed line 1809 of tls.c from
     Tcl_InitStubs(interp, "Tcl", "8.4", 0)
to
     Tcl_InitStubs(interp, "Tcl", "8.4", 0) || Tcl_InitStubs(interp, "Tcl", "9", 0)
and the package now loads ok. Once I've ploughed through several more
porting issues in my own code, I'll have an idea of whether the
modified tls works.
As long as I was testing with Tcl9 beta versions, the "8.4" in
Tcl_InitStubs or Tk_InitStubs worked.
Since using official Tcl9 this does not work anymore, so I switched to
use "8.4-" as is done with "package require" calls.
I forgot to update the preview page with the changed packages.
Will do today or tomorrow.
Paul
Updated relevant packages at the BAWT preview page.
Note, that version 1.7.23 is based upon 1.7.22, which is 4 years old.
You might also check the current trunk of tcltls at
https://core.tcl-lang.org/tcltls
Paul
Thanks Paul. The package seems to work ok with the change I made above,
your suggestion sounds tidier but on the basis of leaving well alone,
I'll stick with what I've got at present.
Emiliano
2024-09-30 12:49:09 UTC
Permalink
On Sun, 29 Sep 2024 13:33:45 +0100
Post by Alan Grunwald
I have encountered a problem with the above extension under tcl9.0.0
After downloading
https://www.tcl3d.org/bawt/download/Preview/Tcl9/tcltls-1.7.23.7z, as
advertised on the "Porting extensions to Tcl 9" page on the wiki,
configuring using the line
./configure --prefix=/opt/tcl9.0.0 --with-tcl=/opt/tcl9.0.0/lib
% package require tls
version conflict for package "tcl": have 9.0.0, need 8.4
The same error also occurs if I do
% load /opt/tcl9.0.0/lib/tcltls1.7.23/tcltls.so Tls
so I assume a problem in the .so file. I've had a quick look through the
sources, but I have no confidence that I can find the appropriate change.
Please can someone help?
The work is being done in the tls-1.8 branch. If you don't want to mess
with fossil, you can download a snapshot from

https://core.tcl-lang.org/tcltls/download?r=tls-1.8

Note that it needs a version of OpenSSL newer than 1.X
--
Emiliano
Loading...