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

Hi everyone

Just tried to install the Gtk2 module from cpan (as was recommended to me by my tut),
but the weird long thing wouldn't install (can't figure out what's the problem).
Whenever I've encountered this kind of problem b4 I just forgot about the module, and seeked alternatives but I was told this is the best (from some reason).

Anyway if someone can tell me what's the problem and/or how to solve it, it would help a looooot.

Here is everything the appeared on my terminal (note I was asked to install another module in mid-process):

Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\Administrator>cpan Gtk2 CPAN: CPAN::SQLite loaded ok (v0.199) Database was generated on Sun, 22 May 2011 21:59:36 GMT Running install for module 'Gtk2' CPAN: YAML loaded ok (v0.71) Running make for F/FL/FLORA/Gtk2-1.223.tar.gz CPAN: Digest::SHA loaded ok (v5.48) CPAN: Compress::Zlib loaded ok (v2.024) Checksum for C:\strawberry\cpan\sources\authors\id\F\FL\FLORA\Gtk2-1.2 +23.tar.gz ok CPAN: Archive::Tar loaded ok (v1.54) CPAN: File::Temp loaded ok (v0.22) CPAN: Module::CoreList loaded ok (v2.25) ---- Unsatisfied dependencies detected during ---- ---- FLORA/Gtk2-1.223.tar.gz ---- Pango [build_requires] Glib [build_requires] Cairo [build_requires] ExtUtils::PkgConfig [build_requires] Running make test Make had some problems, won't test Delayed until after prerequisites Running make install Make had some problems, won't install Delayed until after prerequisites Running install for module 'Pango' Running make for T/TS/TSCH/Pango-1.221.tar.gz Checksum for C:\strawberry\cpan\sources\authors\id\T\TS\TSCH\Pango-1.2 +21.tar.gz ok ---- Unsatisfied dependencies detected during ---- ---- TSCH/Pango-1.221.tar.gz ---- Glib [build_requires] Cairo [build_requires] ExtUtils::PkgConfig [build_requires] Running make test Make had some problems, won't test Delayed until after prerequisites Running make install Make had some problems, won't install Delayed until after prerequisites Running install for module 'Glib' Running make for T/TS/TSCH/Glib-1.223.tar.gz Checksum for C:\strawberry\cpan\sources\authors\id\T\TS\TSCH\Glib-1.22 +3.tar.gz o k ---- Unsatisfied dependencies detected during ---- ---- TSCH/Glib-1.223.tar.gz ---- ExtUtils::PkgConfig [build_requires] Running make test Make had some problems, won't test Delayed until after prerequisites Running make install Make had some problems, won't install Delayed until after prerequisites Running install for module 'ExtUtils::PkgConfig' Running make for T/TS/TSCH/ExtUtils-PkgConfig-1.12.tar.gz Checksum for C:\strawberry\cpan\sources\authors\id\T\TS\TSCH\ExtUtils- +PkgConfig- 1.12.tar.gz ok CPAN.pm: Going to build T/TS/TSCH/ExtUtils-PkgConfig-1.12.tar.gz 'pkg-config' is not recognized as an internal or external command, operable program or batch file. *** *** ExtUtils::PkgConfig requires the pkg-config utility, but it doesn' +t *** seem to be in your PATH. Is it correctly installed? *** PATH=D:\Program Files\Autodesk\Maya8.5\bin;C:\Program Files\PC Co +nnectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\ +Program Fi les\ATI Technologies\ATI.ACE\;C:\Program Files\QuickTime\QTSystem\;C:\ +strawberry \c\bin;C:\strawberry\perl\bin;C:\Program Files\Git\cmd *** No 'Makefile' created TSCH/ExtUtils-PkgConfig-1.12.tar.gz C:\strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK Running make test Make had some problems, won't test Running make install Make had some problems, won't install Running make for T/TS/TSCH/Glib-1.223.tar.gz Warning: Prerequisite 'ExtUtils::PkgConfig => 1.00' for 'TSCH/Glib-1.2 +23.tar.gz' failed when processing 'TSCH/ExtUtils-PkgConfig-1.12.tar.gz' with 'wr +itemakefil e => NO -- No 'Makefile' created '. Continuing, but chances to succeed are limited. CPAN: Time::HiRes loaded ok (v1.9719) CPAN.pm: Going to build T/TS/TSCH/Glib-1.223.tar.gz Can't locate ExtUtils/PkgConfig.pm in @INC (@INC contains: C:/strawber +ry/perl/li b C:/strawberry/perl/site/lib C:\strawberry\perl\vendor\lib .) at (eva +l 12) line 1. BEGIN failed--compilation aborted at (eval 12) line 1. Checking if your kit is complete... Looks good MakeMaker FATAL: prerequisites not found. ExtUtils::PkgConfig not installed Please install these modules first and rerun 'perl Makefile.PL'. Warning: No success on command[C:\strawberry\perl\bin\perl.exe Makefil +e.PL] TSCH/Glib-1.223.tar.gz C:\strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK Running make test Make had some problems, won't test Running make install Make had some problems, won't install Running install for module 'Cairo' Running make for T/TS/TSCH/Cairo-1.062.tar.gz Checksum for C:\strawberry\cpan\sources\authors\id\T\TS\TSCH\Cairo-1.0 +62.tar.gz ok ---- Unsatisfied dependencies detected during ---- ---- TSCH/Cairo-1.062.tar.gz ---- ExtUtils::PkgConfig [build_requires] Running make test Make had some problems, won't test Delayed until after prerequisites Running make install Make had some problems, won't install Delayed until after prerequisites Running install for module 'ExtUtils::PkgConfig' Running make for T/TS/TSCH/ExtUtils-PkgConfig-1.12.tar.gz Has already been unwrapped into directory C:\strawberry\cpan\build\E +xtUtils-Pk gConfig-1.12-iBd2tz No 'Makefile' created , won't make Running make test Make had some problems, won't test Running make install Make had some problems, won't install Running make for T/TS/TSCH/Cairo-1.062.tar.gz Warning: Prerequisite 'ExtUtils::PkgConfig => 1' for 'TSCH/Cairo-1.062 +.tar.gz' f ailed when processing 'TSCH/ExtUtils-PkgConfig-1.12.tar.gz' with 'writ +emakefile => NO -- No 'Makefile' created '. Continuing, but chances to succeed are limited. CPAN.pm: Going to build T/TS/TSCH/Cairo-1.062.tar.gz This module requires ExtUtils::PkgConfig to install itself. Install ExtUtils::PkgConfig from CPAN? [n] y Database was generated on Sun, 22 May 2011 21:59:36 GMT Running install for module 'ExtUtils::PkgConfig' Running make for T/TS/TSCH/ExtUtils-PkgConfig-1.12.tar.gz Checksum for C:\strawberry\cpan\sources\authors\id\T\TS\TSCH\ExtUtils- +PkgConfig- 1.12.tar.gz ok CPAN.pm: Going to build T/TS/TSCH/ExtUtils-PkgConfig-1.12.tar.gz 'pkg-config' is not recognized as an internal or external command, operable program or batch file. *** *** ExtUtils::PkgConfig requires the pkg-config utility, but it doesn' +t *** seem to be in your PATH. Is it correctly installed? *** PATH=D:\Program Files\Autodesk\Maya8.5\bin;C:\Program Files\PC Co +nnectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\ +Program Fi les\ATI Technologies\ATI.ACE\;C:\Program Files\QuickTime\QTSystem\;C:\ +strawberry \c\bin;C:\strawberry\perl\bin;C:\Program Files\Git\cmd *** No 'Makefile' created TSCH/ExtUtils-PkgConfig-1.12.tar.gz C:\strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK Running make test Make had some problems, won't test Running make install Make had some problems, won't install Can't locate ExtUtils/PkgConfig.pm in @INC (@INC contains: C:\strawber +ry\perl\li b C:\strawberry\perl\site\lib C:\strawberry\perl\vendor\lib C:\strawbe +rry\cpan\b uild\Cairo-1.062-7dJ8ZU) at (eval 111) line 1. BEGIN failed--compilation aborted at (eval 111) line 1. Warning: No success on command[C:\strawberry\perl\bin\perl.exe Makefil +e.PL] TSCH/Cairo-1.062.tar.gz C:\strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK Running make test Make had some problems, won't test Running make install Make had some problems, won't install Running install for module 'ExtUtils::PkgConfig' Running make for T/TS/TSCH/ExtUtils-PkgConfig-1.12.tar.gz Has already been unwrapped into directory C:\strawberry\cpan\build\E +xtUtils-Pk gConfig-1.12-iBd2tz No 'Makefile' created , won't make Running make test Make had some problems, won't test Running make install Make had some problems, won't install Running make for T/TS/TSCH/Pango-1.221.tar.gz Warning: Prerequisite 'Glib => 1.220' for 'TSCH/Pango-1.221.tar.gz' fa +iled when processing 'TSCH/Glib-1.223.tar.gz' with 'writemakefile => NO 'C:\stra +wberry\per l\bin\perl.exe Makefile.PL' returned status 512'. Continuing, but chan +ces to suc ceed are limited. Warning: Prerequisite 'Cairo => 1.000' for 'TSCH/Pango-1.221.tar.gz' f +ailed when processing 'TSCH/Cairo-1.062.tar.gz' with 'writemakefile => NO 'C:\st +rawberry\p erl\bin\perl.exe Makefile.PL' returned status 512'. Continuing, but ch +ances to s ucceed are limited. Warning: Prerequisite 'ExtUtils::PkgConfig => 1.030' for 'TSCH/Pango-1 +.221.tar.g z' failed when processing 'TSCH/ExtUtils-PkgConfig-1.12.tar.gz' with ' +writemakef ile => NO -- No 'Makefile' created '. Continuing, but chances to succeed are limited. CPAN.pm: Going to build T/TS/TSCH/Pango-1.221.tar.gz Pre-requisites not found: Can't locate ExtUtils/PkgConfig.pm in @INC (@INC contains: C:/strawber +ry/perl/li b C:/strawberry/perl/site/lib C:\strawberry\perl\vendor\lib .) at (eva +l 18) line 1. BEGIN failed--compilation aborted at (eval 18) line 1. Please install them manually. No 'Makefile' created TSCH/Pango-1.221.tar.gz C:\strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK Running make test Make had some problems, won't test Running make install Make had some problems, won't install Running install for module 'Glib' Running make for T/TS/TSCH/Glib-1.223.tar.gz Has already been unwrapped into directory C:\strawberry\cpan\build\G +lib-1.223- H8Kwi7 'C:\strawberry\perl\bin\perl.exe Makefile.PL' returned status 512, w +on't make Running make test Make had some problems, won't test Running make install Make had some problems, won't install Running install for module 'Cairo' Running make for T/TS/TSCH/Cairo-1.062.tar.gz Has already been unwrapped into directory C:\strawberry\cpan\build\C +airo-1.062 -7dJ8ZU 'C:\strawberry\perl\bin\perl.exe Makefile.PL' returned status 512, w +on't make Running make test Make had some problems, won't test Running make install Make had some problems, won't install Running install for module 'ExtUtils::PkgConfig' Running make for T/TS/TSCH/ExtUtils-PkgConfig-1.12.tar.gz Has already been unwrapped into directory C:\strawberry\cpan\build\E +xtUtils-Pk gConfig-1.12-iBd2tz No 'Makefile' created , won't make Running make test Make had some problems, won't test Running make install Make had some problems, won't install Running make for F/FL/FLORA/Gtk2-1.223.tar.gz Warning: Prerequisite 'Pango => 1.220' for 'FLORA/Gtk2-1.223.tar.gz' f +ailed when processing 'TSCH/Pango-1.221.tar.gz' with 'writemakefile => NO -- No +'Makefile' created '. Continuing, but chances to succeed are limited. Warning: Prerequisite 'Glib => 1.220' for 'FLORA/Gtk2-1.223.tar.gz' fa +iled when processing 'TSCH/Glib-1.223.tar.gz' with 'writemakefile => NO 'C:\stra +wberry\per l\bin\perl.exe Makefile.PL' returned status 512'. Continuing, but chan +ces to suc ceed are limited. Warning: Prerequisite 'Cairo => 1.000' for 'FLORA/Gtk2-1.223.tar.gz' f +ailed when processing 'TSCH/Cairo-1.062.tar.gz' with 'writemakefile => NO 'C:\st +rawberry\p erl\bin\perl.exe Makefile.PL' returned status 512'. Continuing, but ch +ances to s ucceed are limited. Warning: Prerequisite 'ExtUtils::PkgConfig => 1.030' for 'FLORA/Gtk2-1 +.223.tar.g z' failed when processing 'TSCH/ExtUtils-PkgConfig-1.12.tar.gz' with ' +writemakef ile => NO -- No 'Makefile' created '. Continuing, but chances to succeed are limited. CPAN.pm: Going to build F/FL/FLORA/Gtk2-1.223.tar.gz Can't locate ExtUtils/PkgConfig.pm in @INC (@INC contains: C:/strawber +ry/perl/li b C:/strawberry/perl/site/lib C:\strawberry\perl\vendor\lib .) at (eva +l 18) line 1. BEGIN failed--compilation aborted at (eval 18) line 1. Checking if your kit is complete... Looks good MakeMaker FATAL: prerequisites not found. ExtUtils::PkgConfig not installed Glib not installed Pango not installed Please install these modules first and rerun 'perl Makefile.PL'. Warning: No success on command[C:\strawberry\perl\bin\perl.exe Makefil +e.PL] FLORA/Gtk2-1.223.tar.gz C:\strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK Running make test Make had some problems, won't test Running make install Make had some problems, won't install C:\Documents and Settings\Administrator>

Thx

Replies are listed 'Best First'.
Re: can't install the Gtk2 module from cpan
by syphilis (Archbishop) on May 23, 2011 at 07:13 UTC
    If you want to build Gtk2, you need to install the Gtk+ binaries - see, eg http://www.gtk.org/download-windows.html.

    Make sure you include the pkg-config binary, as it's needed to build ExtUtils-PkgConfig. The failure to build ExtUtils-PkgConfig is the first thing that's killing your attempt, afaict ... once you've got that out of the way you can start working through the other problems that arise on Windows.

    Not sure if you have the ppm utility, nor could I see what version of perl you're running, but there are ppm packages for Gtk2 for perl's 5.8, 5.10, 5.12 and 64-bit 5.12 available here. (I see other links in this thread suggesting they might be available elsewhere, too.) I should have ppm packages there for both 32-bit and 64-bit perl-5.14 by about this time next week.

    Cheers,
    Rob
        Gnome2 has, as pre-requisites, Gnome2-Canvas and Gnome2-VFS. I can build the former, but not the latter. Until I can get that sorted, there'll be no Gnome2 binaries (from me, at least).

        Cheers,
        Rob
Re: can't install the Gtk2 module from cpan
by Khen1950fx (Canon) on May 23, 2011 at 05:38 UTC
    Here's what I use when I need a fresh install of Gtk2:
    #!/usr/bin/perl use strict; use warnings; use CPAN; CPAN::Shell->install( "Test::Harness", "Test::More", "Test::Number::Delta", "File::Spec", "Pod::Man", "Pod::Simple", "Text::Wrap", "Pod::Escapes", "ExtUtils::MakeMaker", "ExtUtils::PkgConfig", "ExtUtils::Depends", "Cairo", "Glib", "Pango", "Gtk2");
      that won't install libglib,libgtk2,pkg-config.exe...
Re: can't install the Gtk2 module from cpan
by zentara (Cardinal) on May 23, 2011 at 15:25 UTC
Re: can't install the Gtk2 module from cpan
by Anonymous Monk on May 22, 2011 at 23:38 UTC