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

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

I referenced this thread.

Replies are listed 'Best First'.
Re^5: Tk install failing
by syphilis (Archbishop) on Jun 25, 2024 at 11:36 UTC
    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
      I most humbly beg your pardons, Monks, for the delay in my reply. I did not think there would be more in this thread after I stated I had filed a bug report, so did not look here for several days. Then I had to get past the hopeless feeling I was out of my depth. Then I did this: in the Makefile in the pTk directory, I changed this line CCCDLFLAGS = -fPIC to this: CCCDLFLAGS = -fPIC -DNeedWidePrototypes=1. (I readily admit I do not know if this was correct perl Monk{hv}'s suggestion.) In the event, however, I got quite a ways further! I am now getting this error in compiling the tkCanvText.c file (with a few preceding lines for context):
      cc -c -I.. -I. -Ibitmaps -fwrapv -fno-strict-aliasing -pipe -fsta +ck-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_ +OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -DVERSION=\"804.036\" -DXS_V +ERSION=\"804.036\" -fPIC -DNeedWidePrototypes=1 "-I/home/giz/perl5/pe +rlbrew/perls/perl-5.40.0/lib/5.40.0/x86_64-linux/CORE" tkCanvPs.c cc -c -I.. -I. -Ibitmaps -fwrapv -fno-strict-aliasing -pipe -fstack +-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OF +FSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -DVERSION=\"804.036\" -DXS_VER +SION=\"804.036\" -fPIC -DNeedWidePrototypes=1 "-I/home/giz/perl5/perl +brew/perls/perl-5.40.0/lib/5.40.0/x86_64-linux/CORE" tkCanvText.c tkCanvText.c: In function ‘GetTextIndex’: tkCanvText.c:1253:40: error: passing argument 2 of ‘TcldeclsVptr->V_Tc +l_GetStringFromObj’ from incompatible pointer type [-Wincompatible-po +inter-types] 1253 | string = Tcl_GetStringFromObj(obj, &length); | ^~~~~~~ | | | size_t * {aka long unsi +gned int *} tkCanvText.c:1253:40: note: expected ‘int *’ but argument is of type ‘ +size_t *’ {aka ‘long unsigned int *’} make[1]: *** [Makefile:865: tkCanvText.o] Error 1 make[1]: Leaving directory '/home/giz/.cpanm/work/1719011242.11417/Tk- +804.036/pTk' make: *** [Makefile:1658: pTk/libpTk.a] Error 2 [giz@daisy Tk-804.036$
      If everybody hasn't lost patience with me and has further suggestions, I should be very appreciative. --Bob
        In pTk/mTk/generic/tkCanvText.c, the declaration of "length" at line 1237 needs to be changed from:
        int length; to: size_t length;
        This change is already in place in the source of Tk-804.036 that I've been using.
        I don't know why that's not the case with the source you are using.

        Cheers,
        Rob