Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Perl5.26 installing Tk module manually

by vinoth.ree (Monsignor)
on May 10, 2021 at 08:04 UTC ( #11132324=perlquestion: print w/replies, xml ) Need Help??

vinoth.ree has asked for the wisdom of the Perl Monks concerning the following question:


I have installed perl 5.26 on windows10 and trying to install Tk module manually, since my application uses Tk module, but getting below error.

C:\Users\VinothG\Desktop\Tk-804.036>perl Makefile.PL Cannot find 'C:\TEMP\ActiveState--------please-run-the-install-script- +-------\lib/CORE/perl.h' have you installed C:\Perl64\bin\perl.exe? Compilation failed in require at Makefile.PL line 37. BEGIN failed--compilation aborted at Makefile.PL line 39.

Could someone help me to fix this error, Am I doing something wrong here?

All is well. I learn by answering your questions...

Replies are listed 'Best First'.
Re: Perl5.26 installing Tk module manually
by marto (Cardinal) on May 10, 2021 at 08:27 UTC

    The install doc recommends reading README-ActiveState.txt, you don't say if you've done this. It has been a long time since I had to install this with AS perl, though Strawberry worked for me without issue.

      Hi marto

      I have installed the Perl 5.28 which incudes Tk modules as builtin module from below URL.

      When I start using the Tk module with perl 5.28 I get below error,

      Event.c: loadable library and perl binaries are mismatched (got handsh +ake key 00000008000004B0, needed 0000000000000000)
      Here is the perl version:
      C:\Users\VinothG>perl -V Summary of my perl5 (revision 5 version 28 subversion 1) configuration +: Platform: osname=MSWin32 osvers=10.0.14393 archname=MSWin32-x64-multi-thread uname='' config_args='undef' hint=recommended useposix=true d_sigaction=undef useithreads=define usemultiplicity=define use64bitint=define use64bitall=undef uselongdouble=undef usemymalloc=n default_inc_excludes_dot=define bincompat5005=undef Compiler: cc='undef' ccflags =' -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_S +CRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SY +S -fwrapv -fno-strict-aliasing -mms-bitfields' optimize='-s -O2' cppflags='-DWIN32' ccversion='' gccversion='4.6.3' gccosandvers='' intsize=4 longsize=4 ptrsize=8 doublesize=8 byteorder=12345678 doublekind=3 d_longlong=define longlongsize=8 d_longdbl=define longdblsize=16 longdblkind=3 ivtype='long long' ivsize=8 nvtype='double' nvsize=8 Off_t='long long' lseeksize=8 alignbytes=8 prototype=define Linker and Libraries: ld='undef' ldflags ='-s -static-libgcc -static-libstdc++ -L"C:\Perl64\lib\COR +E" -L"C:\MinGW\x86_64-w64-mingw32\lib"' libpth=C:\MinGW\x86_64-w64-mingw32\lib libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 +-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -l +mpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdl +g32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_3 +2 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 libc= so=dll useshrplib=true libperl=libperl528.a gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs dlext=dll d_dlsymun=undef ccdlflags=' ' cccdlflags=' ' lddlflags='-mdll -s -static-libgcc -static-libstdc++ -L"C:\Perl64\ +lib\CORE" -L"C:\MinGW\x86_64-w64-mingw32\lib"' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_OP_PARENT PERL_PRESERVE_IVUV USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF USE_SITECUSTOMIZE Locally applied patches: ActivePerl Build 0000 [25391a6d] Built under MSWin32 Compiled at Oct 28 2020 18:24:51

      All is well. I learn by answering your questions...

        Looks like either you're picking something up from another/old installation (check PERL5LIB and PERL_LOCAL_LIB_ROOT) or they made a mistake when building this perl for you. Nobody else can access that URL, you could consider contacting AS support, since you're using their services.

        Interesting. I got an email from AS related to my custom 5.26 build with Tk:

        "Please note, the Platform is in Beta. So if you have any issues with a custom runtime or canít find a package, let us know and we can take a look!

        Happy coding,
        - The ActiveState Team"

        If there are issues, I would take AS up on that offer!
        This custom build stuff is a huge new feature for AS and I am sure that there are some hiccups. That's part of the reason that I am still at v5.24.

        Update: There is some version level where AS said that installing a later version over a previous version was "safe". I don't remember when that was. I would uninstall any AS Perl versions. Then install v5.28 anew and see how that works?

Re: Perl5.26 installing Tk module manually
by BillKSmith (Prior) on May 10, 2021 at 17:34 UTC
    Several years ago, I switched from ActiveState to Strawberry because of the difficulty with installing Tk. I feel that AS's documentation and module management systems do offer an advantage to users with little or no knowledge of UNIX. (Until you need a module that it does not support!) Strawberry Perl is almost indistinguishable from Perl on UNIX. The disadvantage of this is that you may have to look up instructions more often. The advantage is that you can be far more confident that they will work. I recommend that you switch to Strawberry. That is probably the best solution to your immediate Tk problem. It will probably save you from similar problems in the future, without you even being aware of it.
      I have used Active State for quite a number of years. I have never seen any problem installing Tk with the AS ppm tool. If you had a problem, it was probably because you were not using ppm (Perl Package Manager).

      Active State has changed their Perl ecosystem and ppm is no longer available. There are pro's and con's vs Strawberry. I am not sure how this will work out. AS has discontinued perlapp (which made .exe files) and for me, that is of bigger concern as this app was easier to use and better than the freeware versions.

        Thanks for the update on AS. My problem with it started when they replaced Tk with Tkx in PPM. Before that, I considered the GUI interface to PPM to be the greatest advantage of AS.
Re: Perl5.26 installing Tk module manually
by Marshall (Canon) on May 10, 2021 at 23:14 UTC
    I am still running AS 5.24 so I haven't confronted the new procedures yet. On version 5.24, I have ppm and just used it to install the Tk package. That was easy to do.
    With version 5.26, ppm disappears and the world changes!

    The idea is that you create an account on the AS site. You then create a custom build with the packages that you need. AS will build the whole Perl installation for you - takes about 35 minutes. I looked at version 5.28 and Tk is already there. So you could just download and run the v5.28 .exe or the .msi file for that build. I would recommend if you upgrade that you uninstall your 5.26 first. In theory, just running the 5.28 msi on top of your 5.26 installation should "work". However, I would play safe and uninstall 5.26 first.

    I looked at the 5.26 public build and it had Tkx, but not Tk. So I forked the public project and gave that branch a new name. then I added Tk 804.034 and committed the changes. That kicked off the build process. Its running right now, AS says they will email when my .exe and .msi files are ready for my custom named branch - will appear in my account for download.

    So in theory, the custom 5.26 build that AS is making for me will include Tk. I had to manually install one package that was failing in the 5.24 build (I needed a dev version). So I am not inclined right now to upgrade to 5.26 or 5.28 and have to potentially confront an old problem once again.

    So I am sorry that I can not give you a completely tested answer. However, from what I can tell, this new AS build procedure is working (its still running as we speak).

    In the past, there were a set of tools where I could make a config file with all the modules that I had installed on my dev system. Then I give you this config file which you then apply to your base Perl installation and in theory "bingo" you have cloned my AS setup with all the modules that I have. I found some hiccups with that idea in practice. This new procedure is designed among other things to fix those problems. Also under the AS EULA, I couldn't just make a .zip file of my Perl file structure and give it to you. However, my understanding is that for a build that is done this way, I can re-distribute the AS built .msi file.

    I didn't write down all the details of how to create an account, etc. I just clicked around and fumbled through the above procedure. I think this has a lot of promise. Give it a go and tell us how it works for you. In theory, you should get a working version out of this.

    Update: I guess if we are getting nitpicky about this, I haven't told you how to install Tk manually - this is an xy problem. I am telling you do to y instead of x which you asked for.
    Ok, now AS finished their work, I see my Fork named: ActivePerl-5.26tk branch with a file: ActivePerl- I can download that .msi or the .exe version or AS gives a Powershell command to do the installation. I don't know how to build a 32 bit version, but there is probably a way to do that if you need. PS: build took 36 minutes.

      I think this has a lot of promise.

      Are you saying that every time you decide to install a new module, you simply get AS to build a fresh perl distro that includes this module ?
      Having to wait over half an hour every time I want to install a new module is not something that I would describe as having much promise.

      Or do they just update your existing msi that's still sitting on their server, and then have you download that modified msi (which you can then install over the top) ?
      That wouldn't be so bad. It's a bit more wasteful than necessary, but then what isn't wasteful, these days ;-)

      Or something else ?

        Hi Rob!

        No, I am not saying that every new module installation requires a complete Perl rebuild.
        I think you can still do ">cpan install XXX".

        In this thread, I saw a question like: "unable to install Tk".
        AS (Active State) is saying that they can build a custom version that includes
        massive packages like Tk - and that this build process will work.
        If you can select the package(s) in their GUI, the build will succeed, meaning that all dependencies will be resolved.

        I don't think you have to do this for every package. Based upon the feedback so far, it appears that my AS 5.26 custom build with Tk DID WORK.
        That was the OP's question: asked and I think answered, albeit in an xy way!

      Hi Marshall

      I was doing the same, instead of 5.26 I built 5.28 including Tk module, after install 5.28 and when using Tk mode I hit the handshake error, may be I can try your package, could you please share the package link, so I will download and try out?. Thanks in advance.

      All is well. I learn by answering your questions...
        Ok. Here is the URL to an MSI file with Perl 5.26 that includes Tk.

        I think that this is the public build (Oops)

        Uninstall any AS (Active State) builds. Reboot computer. Then run this MSI. Reboot computer.
        Windows LOVES to be rebooted. When I had a sun workstation, we rebooted it once per year during Christmas holidays.
        Make a .pl file:

        use strict; use warnings; use Tk;
        That should do nothing. And if it did nothing, then Tk got loaded. Then further testing can proceed with actual Tk statements.

        I seem to get different URLs from my AS account for the same download each time I do it. I'm not sure why that is. The above URL doesn't seem to be specific to my account on AS, so I think it is safe to post it.

        I don't know what went wrong. But the public 5.28 build already included Tk. The 5.26 public build had Tkx but not Tk.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://11132324]
Approved by marto
Front-paged by Marshall
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2021-06-18 12:47 GMT
Find Nodes?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)

    Results (89 votes). Check out past polls.