http://qs1969.pair.com?node_id=1061137

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

Hi Perlmonks

I am interested in installing Tk module in perl version ActivePerl-5.10.1.2007-MSWin32x86-291969.msi. I have tried but failed. Then I have tried to follow the steps as given in the post #981436=perlquestion

Re: Unable to install Tk module by Anonymous Monk on Jul 12, 2012 at 16:46 UTC The problem is, in all that stuff you posted, there is not a single re +levant error message Do cpanp -i Tk and if that fails, cpanp -z Tk then make realclean t +hen post the output of perl Makefile.PL && make

When I tried cpanp -i Tk in cmd and pressed enter, I got the following results in cmd:

Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\Supriyo>cpanp -i Tk It looks like you don't have a C compiler and make utility installed. + Trying to install dmake and the MinGW gcc compiler using the Perl Package Man +ager. This may take a a few minutes... Downloading MinGW-5.1.4.1...redirect Downloading MinGW-5.1.4.1...failed 401 Authorization Required ppm.bat install failed: 401 Authorization Required It looks like the installation of dmake and MinGW has failed. You wil +l not be able to run Makefile commands or compile C extension code. Please che +ck your internet connection and your proxy settings! Installing Tk (804.031) [ERROR] You do not have 'make' in your path -- 'CPANPLUS::Dist::MM' no +t availabl e Please check your config entry for 'make' [ERROR] Format 'CPANPLUS::Dist::MM' is not available [ERROR] Unable to create a new distribution object for 'Tk' -- cannot +continue [ERROR] IPC::Run version '0.55' is required on MSWin32 in order to cap +ture buffe rs. The logfile generated may not contain any useful data, until it is + installed *** Install log written to: C:\Users\Supriyo\AppData\Roaming\.cpanplus\install-logs\Tk-804.031-1 +383558874. log Error installing 'Tk' Problem installing one or more modules C:\Users\Supriyo>

Then I tried to install Tk module in cmd by typing the following codes:

cpanp -z Tk

then make

realclean

then post the output of

perl Makefile.PL && make

I have got the following lines in cmd. I am not sure whether Tk has been installed or not.

Extracting ximage.c Extracting xutil.c Finding dependencies for ClientWin.c Finding dependencies for Lang_f.c Finding dependencies for Xlib_f.c Finding dependencies for XrmOption.c Finding dependencies for exWinHandle.c Finding dependencies for imgBMP.c Finding dependencies for imgInit.c Finding dependencies for imgInt_f.c Finding dependencies for imgObj.c Finding dependencies for imgUtil.c Finding dependencies for imgWindow.c Finding dependencies for imgXBM.c Finding dependencies for imgXPM.c Finding dependencies for ptkCanvGrid.c Finding dependencies for ptkCanvGroup.c Finding dependencies for stbDItem.c Finding dependencies for stbDashCustom.c Finding dependencies for stbDiStyle.c Finding dependencies for strGlue.c Finding dependencies for strcasecmp.c Finding dependencies for strdup.c Finding dependencies for strtoul.c Finding dependencies for stubs.c Finding dependencies for tclAsync.c Finding dependencies for tclDecls_f.c Finding dependencies for tclEvent.c Finding dependencies for tclHash.c Finding dependencies for tclNotify.c Finding dependencies for tclPreserve.c Finding dependencies for tclTimer.c Finding dependencies for tclWinNotify.c Finding dependencies for tclWinTime.c Finding dependencies for tixCompat.c Finding dependencies for tixDItem.c Finding dependencies for tixDiITxt.c Finding dependencies for tixDiImg.c Finding dependencies for tixDiStyle.c Finding dependencies for tixDiText.c Finding dependencies for tixDiWin.c Finding dependencies for tixError.c Finding dependencies for tixForm.c Finding dependencies for tixFormMisc.c Finding dependencies for tixGrData.c Finding dependencies for tixGrFmt.c Finding dependencies for tixGrRC.c Finding dependencies for tixGrSel.c Finding dependencies for tixGrSort.c Finding dependencies for tixGrUtl.c Finding dependencies for tixGrid.c Finding dependencies for tixHLCol.c Finding dependencies for tixHLHdr.c Finding dependencies for tixHLInd.c Finding dependencies for tixHList.c Finding dependencies for tixImgCmp.c Finding dependencies for tixImgXpm.c Finding dependencies for tixImgXpm_f.c Finding dependencies for tixInputO.c Finding dependencies for tixInt_f.c Finding dependencies for tixList.c Finding dependencies for tixNBFrame.c Finding dependencies for tixScroll.c Finding dependencies for tixSmpLs.c Finding dependencies for tixTList.c Finding dependencies for tixUtils.c Finding dependencies for tixVars.c Finding dependencies for tixWinDraw.c Finding dependencies for tixWinXpm.c Finding dependencies for tix_f.c Finding dependencies for tk3d.c Finding dependencies for tkAtom.c Finding dependencies for tkBind.c Finding dependencies for tkBitmap.c Finding dependencies for tkButton.c Finding dependencies for tkCanvArc.c Finding dependencies for tkCanvBmap.c Finding dependencies for tkCanvImg.c Finding dependencies for tkCanvLine.c Finding dependencies for tkCanvPoly.c Finding dependencies for tkCanvPs.c Finding dependencies for tkCanvText.c Finding dependencies for tkCanvUtil.c Finding dependencies for tkCanvWind.c Finding dependencies for tkCanvas.c Finding dependencies for tkClipboard.c Finding dependencies for tkCmds.c Finding dependencies for tkColor.c Finding dependencies for tkConfig.c Finding dependencies for tkCursor.c Finding dependencies for tkDecls_f.c Finding dependencies for tkEntry.c Finding dependencies for tkError.c Finding dependencies for tkEvent.c Finding dependencies for tkEvent_f.c Finding dependencies for tkFileFilter.c Finding dependencies for tkFocus.c Finding dependencies for tkFont.c Finding dependencies for tkFrame.c Finding dependencies for tkGC.c Finding dependencies for tkGeometry.c Finding dependencies for tkGet.c Finding dependencies for tkGrab.c Finding dependencies for tkGrid.c Finding dependencies for tkImage.c Finding dependencies for tkImgBmap.c Finding dependencies for tkImgGIF.c Finding dependencies for tkImgPPM.c Finding dependencies for tkImgPhoto.c Finding dependencies for tkImgPhoto_f.c Finding dependencies for tkImgUtil.c Finding dependencies for tkIntDecls_f.c Finding dependencies for tkIntPlatDecls_f.c Finding dependencies for tkIntXlibDecls_f.c Finding dependencies for tkInt_f.c Finding dependencies for tkListbox.c Finding dependencies for tkMacWinMenu.c Finding dependencies for tkMenu.c Finding dependencies for tkMenuDraw.c Finding dependencies for tkMenubutton.c Finding dependencies for tkMessage.c Finding dependencies for tkObj.c Finding dependencies for tkOldConfig.c Finding dependencies for tkOption.c Finding dependencies for tkOption_f.c Finding dependencies for tkPack.c Finding dependencies for tkPanedWindow.c Finding dependencies for tkPlace.c Finding dependencies for tkPlatDecls_f.c Finding dependencies for tkPointer.c Finding dependencies for tkProperty.c Finding dependencies for tkRectOval.c Finding dependencies for tkScale.c Finding dependencies for tkScrollbar.c Finding dependencies for tkSelect.c Finding dependencies for tkSquare.c Finding dependencies for tkStubImg.c Finding dependencies for tkStyle.c Finding dependencies for tkText.c Finding dependencies for tkTextBTree.c Finding dependencies for tkTextDisp.c Finding dependencies for tkTextImage.c Finding dependencies for tkTextIndex.c Finding dependencies for tkTextMark.c Finding dependencies for tkTextTag.c Finding dependencies for tkTextWind.c Finding dependencies for tkTrig.c Finding dependencies for tkUndo.c Finding dependencies for tkUnixMenubu.c Finding dependencies for tkUnixScale.c Finding dependencies for tkUtil.c Finding dependencies for tkVisual.c Finding dependencies for tkWin3d.c Finding dependencies for tkWinButton.c Finding dependencies for tkWinClipboard.c Finding dependencies for tkWinColor.c Finding dependencies for tkWinConfig.c Finding dependencies for tkWinCursor.c Finding dependencies for tkWinDialog.c Finding dependencies for tkWinDraw.c Finding dependencies for tkWinEmbed.c Finding dependencies for tkWinFont.c Finding dependencies for tkWinImage.c Finding dependencies for tkWinInit.c Finding dependencies for tkWinKey.c Finding dependencies for tkWinMenu.c Finding dependencies for tkWinPixmap.c Finding dependencies for tkWinPointer.c Finding dependencies for tkWinRegion.c Finding dependencies for tkWinScrlbr.c Finding dependencies for tkWinSend.c Finding dependencies for tkWinTest.c Finding dependencies for tkWinWindow.c Finding dependencies for tkWinWm.c Finding dependencies for tkWinX.c trailing: ( _WIN32_IE) && !defined(__MINGW64_VERSION_MAJOR) at C:/User +s/Supriyo/ AppData/Roaming/.cpanplus/5.10.1/build/Tk-804.031/Tk/MakeDepend.pm lin +e 104, <tk WinX.c> line 27. Finding dependencies for tkWindow.c Finding dependencies for tk_f.c Finding dependencies for xcolors.c Finding dependencies for xdraw.c Finding dependencies for xgc.c Finding dependencies for ximage.c Finding dependencies for xutil.c Writing Makefile for Tk::pTk Writing Makefile for Tk::pod Checking if your kit is complete... Looks good Writing Makefile for Tk::demos Finding dependencies for X.xs Writing Makefile for Tk::X Finding dependencies for Xlib.xs Writing Makefile for Tk::Xlib Writing Makefile for Tk::Tixish Finding dependencies for Pixmap.xs Writing Makefile for Tk::Pixmap Finding dependencies for TixGrid.xs Writing Makefile for Tk::TixGrid Writing Makefile for Tk::TextList Finding dependencies for Text.xs Writing Makefile for Tk::Text Finding dependencies for TList.xs Writing Makefile for Tk::TList Finding dependencies for Scrollbar.xs Writing Makefile for Tk::Scrollbar Finding dependencies for Scale.xs Writing Makefile for Tk::Scale 'pkg-config' is not recognized as an internal or external command, operable program or batch file. 'pkg-config libpng' failed, continue with fallback values for cflags a +nd libs... Test Compile/Run config/has_png.c 'cl' is not recognized as an internal or external command, operable program or batch file. Building libpng.lib Note (probably harmless): No library found for -lm Note (probably harmless): No library found for oldnames.lib Note (probably harmless): No library found for kernel32.lib Note (probably harmless): No library found for user32.lib Note (probably harmless): No library found for gdi32.lib Note (probably harmless): No library found for winspool.lib Note (probably harmless): No library found for comdlg32.lib Note (probably harmless): No library found for advapi32.lib Note (probably harmless): No library found for shell32.lib Note (probably harmless): No library found for ole32.lib Note (probably harmless): No library found for oleaut32.lib Note (probably harmless): No library found for netapi32.lib Note (probably harmless): No library found for uuid.lib Note (probably harmless): No library found for ws2_32.lib Note (probably harmless): No library found for mpr.lib Note (probably harmless): No library found for winmm.lib Note (probably harmless): No library found for version.lib Note (probably harmless): No library found for odbc32.lib Note (probably harmless): No library found for odbccp32.lib Note (probably harmless): No library found for comctl32.lib Note (probably harmless): No library found for msvcrt.lib Assuming cl is visual C of some kind Assuming cl is visual C of some kind Finding dependencies for PNG.xs Finding dependencies for imgPNG.c Writing Makefile for Tk::PNG Finding dependencies for NBFrame.xs Writing Makefile for Tk::NBFrame Finding dependencies for Menubutton.xs Writing Makefile for Tk::Menubutton Finding dependencies for Listbox.xs Writing Makefile for Tk::Listbox Test Compile/Run config/has_jpeg.c 'cl' is not recognized as an internal or external command, operable program or batch file. Building jpeg/libjpeg.lib Assuming cl is visual C of some kind Finding dependencies for JPEG.xs Finding dependencies for imgJPEG.c Writing Makefile for Tk::JPEG Finding dependencies for IO.xs Writing Makefile for Tk::IO Finding dependencies for HList.xs Writing Makefile for Tk::HList Finding dependencies for Event.xs Finding dependencies for eventWin32Dll.c Finding dependencies for pTkCallback.c Finding dependencies for tclAsync.c Finding dependencies for tclEvent.c Finding dependencies for tclNotify.c Finding dependencies for tclPlatEvent.c Finding dependencies for tclPlatNotfy.c Finding dependencies for tclPlatTime.c Finding dependencies for tclTimer.c Writing Makefile for Tk::Event Finding dependencies for Entry.xs Writing Makefile for Tk::Entry Finding dependencies for Win32Site.xs Writing Makefile for Tk::DragDrop::Win32Site Writing Makefile for Tk::DragDrop Finding dependencies for Compound.xs Writing Makefile for Tk::Compound Finding dependencies for Canvas.xs Writing Makefile for Tk::Canvas Finding dependencies for Tk.xs Finding dependencies for chnGlue.c Finding dependencies for encGlue.c Finding dependencies for evtGlue.c Finding dependencies for objGlue.c Finding dependencies for tixGlue.c Finding dependencies for tkGlue.c Finding dependencies for tkGlue_f.c Finding dependencies for tkWin32Dll.c Tests in PNG Tests in JPEG Tests in Event Writing Makefile for Tk 'make' is not recognized as an internal or external command, operable program or batch file. C:\Users\Supriyo\AppData\Roaming\.cpanplus\5.10.1\build\Tk-804.031>

I have cheked that Tk-804.031 folder exists in C drive and tried to run the following script 5.pl

#!/usr/bin/perl use warnings; use strict; use Tk; my $main = new MainWindow; $main->Label(-text => 'Hello World!' )->pack; $main->Button(-text => 'Quit', -command => sub{exit} )->pack; MainLoop; exit;

But I am getting the following results in cmd:

Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\Supriyo>cd desktop C:\Users\Supriyo\Desktop>5.pl Can't locate Tk.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/li +b .) at C: \Users\Supriyo\Desktop\5.pl line 4. BEGIN failed--compilation aborted at C:\Users\Supriyo\Desktop\5.pl lin +e 4. C:\Users\Supriyo\Desktop>

I request the PerlMonks to provide suggestions so that I can install Tk and run the script 5.pl successfully.

Replies are listed 'Best First'.
Re: How can I install Tk perl module in 32-bit operating system and Windows7 ?
by marto (Cardinal) on Nov 04, 2013 at 15:20 UTC

    I suggest you read the errors and warnings:

    "It looks like the installation of dmake and MinGW has failed. You will not be able to run Makefile commands or compile C extension code. Please check your internet connection and your proxy settings!"

    Using a search engine ActiveState PPM Availability and the 401 error:

    "All versions of Perl 5.8 and 5.10 required Business Edition licensing in 2010. ActivePerl 5.8 builds older than build 829, and ActivePerl 5.10 builds older than 1008 must use the manual download process described in this FAQ: http://community.activestate.com/node/8128"

    Or use a modern version of AS Perl, or switch to Strawberry which comes with the build tools installed as standard.

    Update: for clarity, Tk has not been installed.

Re: How can I install Tk perl module in 32-bit operating system and Windows7 ?
by dasgar (Priest) on Nov 04, 2013 at 15:37 UTC
Re: How can I install Tk perl module in 32-bit operating system and Windows7 ?
by jellisii2 (Hermit) on Nov 04, 2013 at 17:15 UTC
    Since you're using ActiveState's perl, might I suggest that you consider using Tkx, since IIRC it's installed already? A good beginner's guide to it can be found at http://www.tkdocs.com

      This is excelent advice unless the OP already knows Tk and/or wishes to use existing Tk applications which ran under older versions of ActiveState perl.

      Does anyone know of tutorials for converting Tk apllications to Tkx?

      Bill

        Does anyone know of tutorials for converting Tk apllications to Tkx?

        See Tcl::pTk

        Whatever joy Tk might have brought you, Tkx is sure to take away

        Converting one to the other is madness