in reply to Re: Tk install failing
in thread Tk install failing

Thank you very much, kind Monk{hv}. I have progressed, if after long delay on my part (my apologies; I was a bit daunted). The problem was in trying to compile in JPEG/jpeg/configure, lines 625-26, which was as follows:

625 #include "confdefs.h" 626 main(){return(0);}

Running that snippet with same invocation as in the error message, the crux was that it wanted s/main/int main/

I changed the snippet to 'int main', backed up to the main Tk directory, ran perl Makefile.PL there, and progressed to another error, in compiling Xlib_f.c, as follows:

Xlib.t:334:14: error: initialization of ‘KeySym (*)(Display *, unsigne +d int, int)’ {aka ‘long unsigned int (*)(Display *, unsigned int, i +nt)’} from incompatible pointer type ‘KeySym (*)(Display *, KeyCode, + int)’ {aka ‘long unsigned int (*)(Display *, unsigned char, int)’} +[-Wincompatible-pointer-types]

If your Monkness could vouchsafe another bit of wisdom about this, I would be most thankful.

Replies are listed 'Best First'.
Re^3: Tk install failing
by hv (Prior) on Jun 22, 2024 at 02:07 UTC

    You're getting rather beyond my knowledge here, I'm afraid - at this point you may be better off opening an issue in the bug tracker (probably requires a login). (If you do so, I recommend cross-linking with this thread.)

    My X11 headers have this in /usr/include/X11/Xlib.h:

    _X_DEPRECATED extern KeySym XKeycodeToKeysym( Display* /* display */, #if NeedWidePrototypes unsigned int /* keycode */, #else KeyCode /* keycode */, #endif int /* index */ );

    It seems that Xlib.t encapsulates a signature assuming the "NeedWidePrototypes" variant, but the way perlTk is including your X11 headers they are providing the alternative variant. I think that you if you invoke make with -DNeedWidePrototypes=1 it may get you further; but it is unclear to me why this is going wrong in the first place.

      Thanks again, your esteemed Monkness. I filed a bug report. URL: https://rt.cpan.org/Ticket/Display.html?id=154121

      I referenced this thread.

        I filed a bug report. URL: https://rt.cpan.org/Ticket/Display.html?id=154121

        In my experience, Tk issues tend to remain unaddressed for an unacceptably long time - so don't expect a quick resolution to the problem in response to your bug report.

        Did you get anywhere with hv's suggestion of specifying -DNeedWidePrototypes=1 ?
        There's Xlib stuff in at least 2 separate source directories, so which directory are you in when that reported error arises ? (If we could see a few lines from before-and-after the error it might help us to provide better guidance.)

        Cheers,
        Rob