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 build failures #27

Open
rwmjones opened this issue Oct 16, 2024 · 5 comments · May be fixed by #28
Open

Tcl 9 build failures #27

rwmjones opened this issue Oct 16, 2024 · 5 comments · May be fixed by #28

Comments

@rwmjones
Copy link

Tcl 9 was released recently. labltk has some problems compiling:

cltkEvent.c: In function ‘camltk_tk_mainloop’:
cltkEvent.c:34:5: error: implicit declaration of function ‘Tk_CreateTimerHandler’; did you mean ‘Tcl_CreateTimerHandler’? [-Wimplicit-function-declaration]
   34 |     Tk_CreateTimerHandler(100, invoke_pending_caml_signals, NULL);
      |     ^~~~~~~~~~~~~~~~~~~~~
      |     Tcl_CreateTimerHandler
cltkEvent.c: At top level:
cltkEvent.c:42:3: error: ‘TK_DONT_WAIT’ undeclared here (not in a function); did you mean ‘TCL_DONT_WAIT’?
   42 |   TK_DONT_WAIT, TK_X_EVENTS, TK_FILE_EVENTS, TK_TIMER_EVENTS, TK_IDLE_EVENTS,
      |   ^~~~~~~~~~~~
      |   TCL_DONT_WAIT
cltkEvent.c:42:17: error: ‘TK_X_EVENTS’ undeclared here (not in a function)
   42 |   TK_DONT_WAIT, TK_X_EVENTS, TK_FILE_EVENTS, TK_TIMER_EVENTS, TK_IDLE_EVENTS,
      |                 ^~~~~~~~~~~
cltkEvent.c:42:30: error: ‘TK_FILE_EVENTS’ undeclared here (not in a function); did you mean ‘TCL_FILE_EVENTS’?
   42 |   TK_DONT_WAIT, TK_X_EVENTS, TK_FILE_EVENTS, TK_TIMER_EVENTS, TK_IDLE_EVENTS,
      |                              ^~~~~~~~~~~~~~
      |                              TCL_FILE_EVENTS
cltkEvent.c:42:46: error: ‘TK_TIMER_EVENTS’ undeclared here (not in a function); did you mean ‘TCL_TIMER_EVENTS’?
   42 |   TK_DONT_WAIT, TK_X_EVENTS, TK_FILE_EVENTS, TK_TIMER_EVENTS, TK_IDLE_EVENTS,
      |                                              ^~~~~~~~~~~~~~~
      |                                              TCL_TIMER_EVENTS
cltkEvent.c:42:63: error: ‘TK_IDLE_EVENTS’ undeclared here (not in a function); did you mean ‘TCL_IDLE_EVENTS’?
   42 |   TK_DONT_WAIT, TK_X_EVENTS, TK_FILE_EVENTS, TK_TIMER_EVENTS, TK_IDLE_EVENTS,
      |                                                               ^~~~~~~~~~~~~~
      |                                                               TCL_IDLE_EVENTS
cltkEvent.c:43:3: error: ‘TK_ALL_EVENTS’ undeclared here (not in a function); did you mean ‘TCL_ALL_EVENTS’?
   43 |   TK_ALL_EVENTS
      |   ^~~~~~~~~~~~~
      |   TCL_ALL_EVENTS
cltkEvent.c: In function ‘camltk_dooneevent’:
cltkEvent.c:52:9: error: implicit declaration of function ‘Tk_DoOneEvent’; did you mean ‘Tcl_DoOneEvent’? [-Wimplicit-function-declaration]
   52 |   ret = Tk_DoOneEvent(caml_convert_flag_list(flags, event_flag_table));
      |         ^~~~~~~~~~~~~
      |         Tcl_DoOneEvent
make[1]: *** [Makefile:89: cltkEvent.o] Error 1

(and maybe more, but the build stops at this point)

@rwmjones
Copy link
Author

So there are several things going on at once. Firstly ./configure doesn't know about Tcl/Tk 9.0, which is trivial to fix.

Secondly the Tk library is now called libtcl9tk9.0.so. The ./configure script has no idea how to search for this so it fails. Honestly it would be much better if you weren't using a shonky homebrew configure script and just used autotools or some other regular build system. In that case you could juse use:

PKG_CHECK_MODULES([TCL], [tcl])
PKG_CHECK_MODULES([TK], [tk])

and that would be all you need to detect Tcl & Tk on every platform.

Thirdly, Tk_CreateTimerHandler does seem to have disappeared completely and I've no idea what replaces it.

@rwmjones
Copy link
Author

@yarda
Copy link

yarda commented Oct 16, 2024

Thirdly, Tk_CreateTimerHandler does seem to have disappeared completely and I've no idea what replaces it.

If I am not mistaken Tk_CreateTimerHandler is now Tcl_CreateTimerHandler.

@rwmjones rwmjones linked a pull request Oct 16, 2024 that will close this issue
@rwmjones
Copy link
Author

Fedora (downstream) bug: https://bugzilla.redhat.com/show_bug.cgi?id=2337740

@garrigue
Copy link
Owner

Sorry, the fix will definitely be in the next release of labltk, ASAP.
Unfortunately, the semester is not yet finished here...

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

Successfully merging a pull request may close this issue.

3 participants