in reply to Tk installation fails on Windows 10 with strawberry perl

I created this ticket with the solution.

Tested on Windows 10 with Strawberry 5.32

--- encGlue.c.org 2020-09-01 17:34:14.514068300 +0200 +++ encGlue.c 2020-09-01 17:42:48.710327700 +0200 @@ -39,6 +39,9 @@ #define NEED_PUSHSTACK_HACK #endif +#undef MAX +#define MAX(a,b) ((a)>(b)?(a):(b)) + /* ------------------------------------------------------------------ +-------- */ /* UTF8-ness routines /* ------------------------------------------------------------------ +-------- */

So, start cmd and:

C:> cd \Strawberry\cpan\build\Tk-804.035.0 C:\Strawberry\cpan\build\Tk-804.035.0> vim encGlue.c -- make the above change C:\Strawberry\cpan\build\Tk-804.035.0> gmake C:\Strawberry\cpan\build\Tk-804.035.0> gmake test C:\Strawberry\cpan\build\Tk-804.035.0> gmake install

Update 2020-09-08: This fix is queued for the next release of Tk.


Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^2: Tk installation fails on Windows 10 with strawberry perl
by RichardStamper (Initiate) on Sep 30, 2020 at 14:44 UTC

    I can confirm that that code edit was sufficient for to get Tk-804.035 to install OK for me.

    Many thanks!
Re^2: Tk installation fails on Windows 10 with strawberry perl
by Dirk80 (Pilgrim) on Sep 02, 2020 at 08:31 UTC

    Thank you very much. The problem with MAX is solved now. But unfortunately I have more undefined references.

    Here the output of my log:

    C:/Strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x8 +6_64-w64-mingw32/bin/ld.exe: encGlue.o:encGlue.c:(.text+0x45f): undef +ined reference to `Perl_to_utf8_lower' C:/Strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x8 +6_64-w64-mingw32/bin/ld.exe: encGlue.o:encGlue.c:(.text+0x4bf): undef +ined reference to `Perl_to_utf8_upper' C:/Strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x8 +6_64-w64-mingw32/bin/ld.exe: encGlue.o:encGlue.c:(.text+0x98): undefi +ned reference to `Perl_is_uni_alpha' C:/Strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x8 +6_64-w64-mingw32/bin/ld.exe: encGlue.o:encGlue.c:(.text+0xb8): undefi +ned reference to `Perl_is_uni_alnum' C:/Strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x8 +6_64-w64-mingw32/bin/ld.exe: encGlue.o:encGlue.c:(.text+0xd8): undefi +ned reference to `Perl_is_uni_space' C:/Strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x8 +6_64-w64-mingw32/bin/ld.exe: encGlue.o:encGlue.c:(.text+0xf8): undefi +ned reference to `Perl_is_uni_upper' collect2.exe: error: ld returned 1 exit status gmake: *** [Makefile:617: blib\arch\auto\Tk\Tk.xs.dll] Error 1 SREZIC/Tk-804.034.tar.gz C:\STRAWB~1\c\bin\gmake.exe -- NOT OK Stopping: 'install' failed for 'Tk'. Failed during this command: SREZIC/Tk-804.034.tar.gz : make NO

    Do you have any idea what could be the problem here?

      Your notes show you are installing an old version, Tk-804.034. See rt://125665. When installing check the open tickets, closed tickets impacting the version you are trying to work wth, changes etc. Metacpan makes this straightforward. Tk.

      I see. I have to use Tk-804.035 instead of Tk-804.034 to get rid of these errors.

Re^2: Tk installation fails on Windows 10 with strawberry perl
by djibel (Novice) on Jan 26, 2021 at 13:49 UTC
    Thank you for your message that's help me on Strawberry 5.32.0.1. Best Regards !
Re^2: Tk installation fails on Windows 10 with strawberry perl
by ateague (Monk) on Nov 07, 2020 at 16:39 UTC
    Thank you for the patch!
Re^2: Tk installation fails on Windows 10 with strawberry perl
by Anonymous Monk on Jan 15, 2021 at 05:51 UTC
    Confirmed that this fix still works as of 15 Jan 2021