elef has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, I have not had to mess with this stuff for a few years so bear with me... I'm trying to set up perl on my new computer and as usual, I'm getting indecipherable errors. Win11, StrawberryPerl 5.38.2.2. Open a cmd window, type cpan, type Install Tk... eventually I get:
../pTk/mTk/xlib/X11/X.h:182:34: error: expected identifier or '(' befo +re numeric constant 182 | #define ControlMask (1<<2) | ^ gmake[1]: *** [makefile:891: imgBMP.o] Error 1 gmake[1]: Leaving directory 'C:/STRAWB~1/cpan/build/Tk-804.036-1/pTk' gmake: *** [makefile:1638: pTk/libpTk.a] Error 2 SREZIC/Tk-804.036.tar.gz C:\STRAWB~1\c\bin\gmake.exe -- NOT OK Stopping: 'install' failed for 'Tk'. Failed during this command: SREZIC/Tk-804.036.tar.gz : make NO
Halp!

Replies are listed 'Best First'.
Re: Tk install fails
by syphilis (Archbishop) on May 14, 2024 at 23:30 UTC

      Or if one is using cpanm:

      cpanm https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/patched_cpan_modules/Tk-804.036_001.tar.gz
        Thank you for these. I was not looking forward to getting make to work on windows etc. This looks a lot more user friendly.
        Insta-update: cpan . worked! Case closed.

      Was excited to see this had been worked out; cause i had resorted to dimw? perl like a year or so ago to get past something like this; and now having issues with it.

      So went back to Strawberry perl; hit this again; and found this post; but when i run the cpan . ; it ended up failing after a long while. [lots of graphics did display]

      Any ideas; or is there another cut of this patch? [seems like maybe a path issue] I am using strawberry perl latest with portable script bat to setup. Here is the output: [Thanks]

      # Failed test '$mw->pathname works' # at t\widget.t line 49. # got: 'window id "1509036" doesn't exist in this application + at blib\lib\Tk\Widget.pm (autosplit into blib\lib\auto\Tk\Widget\pat +hname.al) line 1581. # ' # expected: '' # Failed test 'Pathname and pathname agree' # at t\widget.t line 50. # got: undef # expected: '.label' t\widget.t ................... 10/19 # Looks like you failed 2 tests o +f 19. t\widget.t ................... Dubious, test returned 2 (wstat 512, 0x +200) Failed 2/19 subtests t\wm-tcl.t ................... ok t\wm-time.t .................. # Start update 2 # . update 0.0199 2 t\wm-time.t .................. 1/? # .label update 0.0238 1 # Start Popup 2 # .toplevel Popup 0.0132 2 # .toplevel.label Popup 0.0149 1 # Start withdraw 0 # Start Popup Again 2 # .toplevel Popup Again 0.00796 2 # .toplevel.label Popup Again 0.00961 1 # Start destroy 0 t\wm-time.t .................. ok t\wm.t ....................... ok t\X.t ........................ ok t\zzHList.t .................. ok t\zzPhoto.t .................. ok t\zzScrolled.t ............... ok t\zzText.t ................... ok t\zzTixGrid.t ................ ok Test Summary Report ------------------- t\after.t (Wstat: 0 Tests: 6 Failed: 0) TODO passed: 1-6 t\listbox.t (Wstat: 0 Tests: 537 Failed: 0) TODO passed: 320-322, 328 t\text.t (Wstat: 0 Tests: 415 Failed: 0) TODO passed: 121 t\widget.t (Wstat: 512 (exited 2) Tests: 19 Failed: 2) Failed tests: 6-7 Non-zero exit status: 2 t\wm-tcl.t (Wstat: 0 Tests: 315 Failed: 0) TODO passed: 68, 181-182 t\zzScrolled.t (Wstat: 0 Tests: 94 Failed: 0) TODO passed: 52, 66, 80, 94 Files=76, Tests=4602, 70 wallclock secs ( 0.64 usr + 0.25 sys = 0.89 + CPU) Result: FAIL Failed 1/76 test programs. 2/4602 subtests failed. gmake: *** [makefile:1461: test_dynamic] Error 255 C:/Users/glen/Downloads/Tk-804.036_001.tar/Tk-804.036_001/. C:\strawberry\c\bin\gmake.exe test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports C:/Users/glen/Downloads/Tk-804.036_001.tar/Tk-804.036_001/. Stopping: 'install' failed for 'C:/Users/glen/Downloads/Tk-804.036_001 +.tar/Tk-804.036_001/.'.
Re: Tk install fails
by marto (Cardinal) on May 14, 2024 at 17:52 UTC