Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tcl 9.0 support #728

Open
opoplawski opened this issue Oct 17, 2024 · 4 comments
Open

Tcl 9.0 support #728

opoplawski opened this issue Oct 17, 2024 · 4 comments

Comments

@opoplawski
Copy link
Contributor

Describe the bug
Fedora is looking into updating Tcl/Tk to 9.0 in Rawhide. Builds are being tested here:
https://copr.fedorainfracloud.org/coprs/jskarvad/TclTK9.0.0/package/Lmod/

Lmod is failing with:

if [ -d ./pkgs/tcl2lua ]; then                             \
           /usr/bin/make -C ./pkgs/tcl2lua  LUA_INC=-I/usr/include       \
        TCL_INCLUDE=-I/usr/include/ TCL_LIBS=            \
                LIB=/builddir/build/BUILD/Lmod-8.7.51-build/BUILDROOT/usr/share/lmod/8.7.51/lib LIBS=-ltcl  CC="gcc"                \
                SHARE=/builddir/build/BUILD/Lmod-8.7.51-build/BUILDROOT/usr/share/lmod/8.7.51/libexec MODE_R=0644                \
                install;                                                   \
        fi
make[1]: Entering directory '/builddir/build/BUILD/Lmod-8.7.51-build/Lmod-8.7.51/pkgs/tcl2lua'
gcc -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  -DLUA_COMPAT_MODULE -fPIC -I/usr/include -I/usr/include/   -c -o tcl2lua.o tcl2lua.c
tcl2lua.c:21:90: error: expected ‘;’, ‘,’ or ‘)’ before ‘objv’
   21 | int setResultsObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
      |                                                                                          ^~~~
tcl2lua.c: In function ‘Tcl_AppInit’:
tcl2lua.c:54:45: error: ‘setResultsObjCmd’ undeclared (first use in this function)
   54 |   Tcl_CreateObjCommand(interp,"setResults", setResultsObjCmd, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
      |                                             ^~~~~~~~~~~~~~~~
tcl2lua.c:54:45: note: each undeclared identifier is reported only once for each function it appears in
tcl2lua.c: In function ‘runTCLprog’:
tcl2lua.c:73:7: warning: unused variable ‘status’ [-Wunused-variable]
   73 |   int status = 1;
      |       ^~~~~~
make[1]: *** [<builtin>: tcl2lua.o] Error 1

To Reproduce
Attempt to build Lmod with Tcl 9.0

@rtmclay
Copy link
Member

rtmclay commented Oct 22, 2024

I am interested to know what tclsh is called on rawhide. I installed the tcl 9.0 source and it built an executable called tclsh9.0. Is that what rawhide is doing?

@opoplawski
Copy link
Contributor Author

I would install the tcl rpm from the COPR - https://copr.fedorainfracloud.org/coprs/jskarvad/TclTK9.0.0/.

@rtmclay
Copy link
Member

rtmclay commented Oct 24, 2024

I looked at the tcl rpm and found that it was making the tclsh executable to be both tclsh and tclsh9.0. That is what Lmod will support.

Note that this branch IS728-tcl9 removes support for fast TCL interpreter. This means that Lmod is making system calls to run the TCL interpreter. Support for the fast TCL interpreter will be added for TCL 9+ at a later time.

Please test the IS728-tcl9 branch to see if it works for you.

@opoplawski
Copy link
Contributor Author

It appears to build fine and basic functionality seems okay. It also still builds with the older tclsh. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants