Discussion:
Packages won't run on Tcl/Tk 9.0
(too old to reply)
Luc
2024-09-28 05:49:15 UTC
Permalink
I successfully compiled Tcl and Tk 8.6.15 and 9.0.

No problem whatsoever with 8.6.15 so far.

Tcl/Tk 9.0 runs a couple of simpler applications but chokes on a
more complex one:

--------------------
cannot find symbol "tkdnd_Init": /opt/tcltk9/lib/tkdnd2.6/libtkdnd2.6.so:
undefined symbol: _tkdnd_Init while executing
"load $dir/$PKG_LIB_FILE $PACKAGE_NAME"
(procedure "tkdnd::initialise" line 92)
invoked from within
"tkdnd::initialise {/opt/tcltk9/lib/tkdnd2.6} libtkdnd2.6.so tkdnd"
("package ifneeded tkdnd 2.6" script)
invoked from within
"package require tkdnd"
(file "v.tcl" line 4)
Compilation failed.
--------------------

Yes, my version of tkdnd is quite old. I'm not even using it yet.
I haven't written the code. But it is package required for the sake
of the future.

So I fetched a newer version. Tck/Tk 9.0 doesn't like it either:

--------------------
interpreter uses an incompatible stubs mechanism
while executing
"load $dir/$PKG_LIB_FILE [string totitle $PACKAGE_NAME 0 0]"
(procedure "tkdnd::initialise" line 94)
invoked from within
"tkdnd::initialise {/opt/tcltk9/lib/tkdnd2.9.4} libtkdnd2.9.4.so tkdnd"
("package ifneeded tkdnd 2.9.4" script)
invoked from within
"package require tkdnd"
(file "v.tcl" line 4)
Compilation failed.
--------------------

What is going on now? Well, I commented out the tkdnd line and found
that I have a similar problem with snack:

--------------------
interpreter uses an incompatible stubs mechanism
while executing
"load /usr/lib/tcltk/snack2.2/libsound.so"
("package ifneeded sound 2.2" script)
invoked from within
"package require sound"
(file "v.tcl" line 6)
Compilation failed.
--------------------

Is it too old too? Comment it out:

--------------------
interpreter uses an incompatible stubs mechanism
while executing
"load [file join $::vfs::self libvfs1.4.2.so]"
(file "/usr/lib/tcltk/x86_64-linux-gnu/vfs1.4.2/vfs.tcl" line 24)
invoked from within
"source /usr/lib/tcltk/x86_64-linux-gnu/vfs1.4.2/vfs.tcl"
("package ifneeded vfs 1.4.2" script)
invoked from within
"package require vfs"
(file "v.tcl" line 8)
Compilation failed.
--------------------

Removing references to vfs, I run into a variable that is no longer
recognized. OK, I will investigate that one on my own.

What about the packages? Why do they fail?
Note: I am running all this on Debian 9.

I wonder if this is related:
https://core.tcl-lang.org/tk/info/437d5d47664539497a827310263ad691e85f6ca829eb0cf77ad97edf55220b70
--
Luc
Ashok
2024-09-28 17:46:57 UTC
Permalink
Sounds like Tcl 9 / Tcl 8 builds mixed up. My guess is the Tcl 9 build
is picking up either Tcl 8 headers or stubs from somewhere or those
packages have not been updated for Tcl 9. Extensions that use the
standard TEA system for builds (and have been updated for Tcl 9) should
have a tcl9 prefix in the shared library name. Your output does not
reflect that which is suspicious unless those extensions do not use TEA.

Where did you get the tclvfs from?

Can you post your configure line?

/Ashok
Post by Luc
I successfully compiled Tcl and Tk 8.6.15 and 9.0.
No problem whatsoever with 8.6.15 so far.
Tcl/Tk 9.0 runs a couple of simpler applications but chokes on a
--------------------
undefined symbol: _tkdnd_Init while executing
"load $dir/$PKG_LIB_FILE $PACKAGE_NAME"
(procedure "tkdnd::initialise" line 92)
invoked from within
"tkdnd::initialise {/opt/tcltk9/lib/tkdnd2.6} libtkdnd2.6.so tkdnd"
("package ifneeded tkdnd 2.6" script)
invoked from within
"package require tkdnd"
(file "v.tcl" line 4)
Compilation failed.
--------------------
Yes, my version of tkdnd is quite old. I'm not even using it yet.
I haven't written the code. But it is package required for the sake
of the future.
--------------------
interpreter uses an incompatible stubs mechanism
while executing
"load $dir/$PKG_LIB_FILE [string totitle $PACKAGE_NAME 0 0]"
(procedure "tkdnd::initialise" line 94)
invoked from within
"tkdnd::initialise {/opt/tcltk9/lib/tkdnd2.9.4} libtkdnd2.9.4.so tkdnd"
("package ifneeded tkdnd 2.9.4" script)
invoked from within
"package require tkdnd"
(file "v.tcl" line 4)
Compilation failed.
--------------------
What is going on now? Well, I commented out the tkdnd line and found
--------------------
interpreter uses an incompatible stubs mechanism
while executing
"load /usr/lib/tcltk/snack2.2/libsound.so"
("package ifneeded sound 2.2" script)
invoked from within
"package require sound"
(file "v.tcl" line 6)
Compilation failed.
--------------------
--------------------
interpreter uses an incompatible stubs mechanism
while executing
"load [file join $::vfs::self libvfs1.4.2.so]"
(file "/usr/lib/tcltk/x86_64-linux-gnu/vfs1.4.2/vfs.tcl" line 24)
invoked from within
"source /usr/lib/tcltk/x86_64-linux-gnu/vfs1.4.2/vfs.tcl"
("package ifneeded vfs 1.4.2" script)
invoked from within
"package require vfs"
(file "v.tcl" line 8)
Compilation failed.
--------------------
Removing references to vfs, I run into a variable that is no longer
recognized. OK, I will investigate that one on my own.
What about the packages? Why do they fail?
Note: I am running all this on Debian 9.
https://core.tcl-lang.org/tk/info/437d5d47664539497a827310263ad691e85f6ca829eb0cf77ad97edf55220b70
Luc
2024-09-28 20:51:39 UTC
Permalink
Post by Ashok
Sounds like Tcl 9 / Tcl 8 builds mixed up. My guess is the Tcl 9 build
is picking up either Tcl 8 headers or stubs from somewhere or those
packages have not been updated for Tcl 9. Extensions that use the
standard TEA system for builds (and have been updated for Tcl 9) should
have a tcl9 prefix in the shared library name. Your output does not
reflect that which is suspicious unless those extensions do not use TEA.
Where did you get the tclvfs from?
Can you post your configure line?
/Ashok
Now I see that I didn't add tclvfs to the 9.0 installation directory
so it's trying to use the tclvfs of my "official" 8.6.6 installation.

Where is this "configure line"?
--
Luc
Ashok
2024-09-29 09:59:50 UTC
Permalink
The configure line is what you ran to generate the makefiles. That
assumes those extensions are built using autotools as is standard for
Tcl extensions using TEA.

Otherwise, post the steps (command line) you used to build those
extensions. It appears you are getting 8.x and 9.x headers crossed up.
Post by Luc
Post by Ashok
Sounds like Tcl 9 / Tcl 8 builds mixed up. My guess is the Tcl 9 build
is picking up either Tcl 8 headers or stubs from somewhere or those
packages have not been updated for Tcl 9. Extensions that use the
standard TEA system for builds (and have been updated for Tcl 9) should
have a tcl9 prefix in the shared library name. Your output does not
reflect that which is suspicious unless those extensions do not use TEA.
Where did you get the tclvfs from?
Can you post your configure line?
/Ashok
Now I see that I didn't add tclvfs to the 9.0 installation directory
so it's trying to use the tclvfs of my "official" 8.6.6 installation.
Where is this "configure line"?
Luc
2024-09-29 13:05:34 UTC
Permalink
Post by Ashok
The configure line is what you ran to generate the makefiles. That
assumes those extensions are built using autotools as is standard for
Tcl extensions using TEA.
Otherwise, post the steps (command line) you used to build those
extensions. It appears you are getting 8.x and 9.x headers crossed up.
Ah OK.

Tcl:
$ ./configure --disable-symbols --enable-shared --enable-64bit --prefix /opt/tcltk9
Tk:
$ ./configure --disable-symbols --enable-shared --enable-64bit --enable-xft --prefix /opt/tcltk9 --with-tcl=/home/build/tcl9/unix


Please note that I didn't build any of the packages. They are pre-built binaries
that I downloaded.
--
Luc
Christian Gollwitzer
2024-09-29 20:10:47 UTC
Permalink
Post by Luc
Please note that I didn't build any of the packages. They are pre-built binaries
that I downloaded.
This doesn't work. Unless the packages have been recompiled for Tcl 9,
you can't load them.

Christian
Ashok
2024-09-30 06:48:05 UTC
Permalink
Post by Luc
Post by Ashok
The configure line is what you ran to generate the makefiles. That
assumes those extensions are built using autotools as is standard for
Tcl extensions using TEA.
Otherwise, post the steps (command line) you used to build those
extensions. It appears you are getting 8.x and 9.x headers crossed up.
Ah OK.
$ ./configure --disable-symbols --enable-shared --enable-64bit --prefix /opt/tcltk9
$ ./configure --disable-symbols --enable-shared --enable-64bit --enable-xft --prefix /opt/tcltk9 --with-tcl=/home/build/tcl9/unix
Please note that I didn't build any of the packages. They are pre-built binaries
that I downloaded.
I was asking about the configure for the packages. As Christian said,
extensions built for 8.x will not work with 9.0

Loading...