Skip Menu |

This queue is for tickets about the Gtk2 CPAN distribution.

Report information
The Basics
Id: 18676
Status: resolved
Priority: 0/
Queue: Gtk2

People
Owner: Nobody in particular
Requestors: EWILHELM [...] cpan.org
schmorp [...] schmorp.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Gtk2 not installable from CPAN
Date: Wed, 12 Apr 2006 13:47:06 +0200
To: bug-Gtk2 [...] rt.cpan.org
From: Marc Lehmann <schmorp [...] schmorp.de>
Trying to install Gtk2 from CPAN results in "Depends.pm" not being found, without any indication of what the user could do. It seems Gtk2 is missing dependencies on the modules it requires. This used to work in the past, but does no longer. -- The choice of a -----==- _GNU_ ----==-- _ generation Marc Lehmann ---==---(_)__ __ ____ __ pcg@goof.com --==---/ / _ \/ // /\ \/ / http://schmorp.de/ -=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE
On Wed Apr 12 07:47:44 2006, schmorp@schmorp.de wrote: Show quoted text
> Trying to install Gtk2 from CPAN results in "Depends.pm" not being found, > without any indication of what the user could do. > > It seems Gtk2 is missing dependencies on the modules it requires. > > This used to work in the past, but does no longer.
This is weird. The only modules Gtk2's Makefile.PL unconditionally uses are EU::MM, File::Spec, and Cwd. The rest (including EU::Depends) only get used inside an eval. If that eval fails, a fake Makefile is written which contains, among others, EU::Depends as a fatal pre-requisite. This code hasn't actually been touched for more than a year. Any ideas?
Subject: Re: [rt.cpan.org #18676] Gtk2 not installable from CPAN
Date: Fri, 14 Apr 2006 20:53:03 +0200
To: Torsten Schönfeld via RT <bug-Gtk2 [...] rt.cpan.org>
From: Marc Lehmann <schmorp [...] schmorp.de>
On Fri, Apr 14, 2006 at 10:14:45AM -0400, Torsten Schönfeld via RT <bug-Gtk2@rt.cpan.org> wrote: Show quoted text
> > This used to work in the past, but does no longer.
> > This is weird. The only modules Gtk2's Makefile.PL unconditionally uses > are EU::MM, File::Spec, and Cwd. The rest (including EU::Depends) only > get used inside an eval. If that eval fails, a fake Makefile is written > which contains, among others, EU::Depends as a fatal pre-requisite. > This code hasn't actually been touched for more than a year. > > Any ideas?
Just try it out without having EU:Depends and Gtk2 installed: Running make for T/TS/TSCH/Gtk2-1.104.tar.gz Is already unwrapped into directory /root/.cpan/build/Gtk2-1.104 '/localvol/opt/perl/bin/perl Makefile.PL' returned status 512, won't make Running make test Make had some problems, won't test Running make install Make had some problems, won't install Failed during this command: TSCH/Gtk2-1.104.tar.gz : writemakefile NO '/localvol/opt/perl/bin/perl Makefile.PL' returned status 512 I know it did work, but maybe something outside Gtk2 changed, I have no idea. I just got a number of reports that cpan fails, and tried it, and it fails. I am sorry that I can't give more insights right now :( -- The choice of a -----==- _GNU_ ----==-- _ generation Marc Lehmann ---==---(_)__ __ ____ __ pcg@goof.com --==---/ / _ \/ // /\ \/ / http://schmorp.de/ -=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE
On Fri Apr 14 14:53:51 2006, schmorp@schmorp.de wrote: Show quoted text
> Just try it out without having EU:Depends and Gtk2 installed:
I just tried with CPANPLUS.pm. Here's what I got: --8<-- Running [/usr/bin/perl -MCPANPLUS::Internals::Utils::Autoflush Makefile.PL PREFIX=/home/torsten/opt/perl]... Can't locate ExtUtils/Depends.pm in @INC (@INC contains: [...]) at (eval 11) line 1. BEGIN failed--compilation aborted at (eval 11) line 1. Checking if your kit is complete... Looks good MakeMaker FATAL: prerequisites not found (Glib not installed, ExtUtils::Depends not installed, ExtUtils::PkgConfig not installed) Please install these modules first and rerun 'perl Makefile.PL'. [ERROR] Could not run '/usr/bin/perl Makefile.PL': Can't locate ExtUtils/Depends.pm in @INC (@INC contains [...]) at (eval 11) line 1. BEGIN failed--compilation aborted at (eval 11) line 1. Checking if your kit is complete... Looks good MakeMaker FATAL: prerequisites not found (Glib not installed, ExtUtils::Depends not installed, ExtUtils::PkgConfig not installed) Please install these modules first and rerun 'perl Makefile.PL'. -- cannot continue [ERROR] Unable to create a new distribution object for 'Gtk2' -- cannot continue Error installing 'Gtk2' --8<-- I'll readily admit that this isn't exactly user-friendly. But once I installed the mentioned modules manually and re-ran 'install Gtk2', everything worked. Unless we include a mechanism that prompts the user and installs modules automatically if desired, I think the above is as good as we're going to get. Now, it looks like you don't get those messages. Is this a CPAN.pm thing and is there anything we can do about it?
Subject: Re: [rt.cpan.org #18676] Gtk2 not installable from CPAN
Date: Sun, 16 Apr 2006 00:49:03 +0200
To: Torsten Schönfeld via RT <bug-Gtk2 [...] rt.cpan.org>
From: Marc Lehmann <schmorp [...] schmorp.de>
On Sat, Apr 15, 2006 at 04:53:09PM -0400, Torsten Schönfeld via RT <bug-Gtk2@rt.cpan.org> wrote: Show quoted text
> > I just tried with CPANPLUS.pm. Here's what I got: > > Unless we include a mechanism that prompts the user and installs modules > automatically if desired, I think the above is as good as we're going to > get.
Whats so bad about letting CPAN and CPANPLUS do it, like every other module that has dependencies? Why would a new mechanism be required? Show quoted text
> Now, it looks like you don't get those messages. Is this a CPAN.pm > thing and is there anything we can do about it?
I do get similar messages. Its something about the generated Makefile that makes problems. The only thing I know is that it once worked, but I couldn't say wether CPANs depdency tracking changed or the Makefile.PL or something else. Automatic dependency tracking and installation works fine with other modules - "install Net::FCP" will fetch and install Crypt::Twofish, Crypt::Rijndael and so on. I would look into the issue myself if I had enough time, which will certainly happen some unspecified time in the future, so if you don't make progress you can just keep the bug open as reminder and I'll look into it when I have time for that again. -- The choice of a -----==- _GNU_ ----==-- _ generation Marc Lehmann ---==---(_)__ __ ____ __ pcg@goof.com --==---/ / _ \/ // /\ \/ / http://schmorp.de/ -=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE
On Sat Apr 15 18:49:44 2006, schmorp@schmorp.de wrote: Show quoted text
> Whats so bad about letting CPAN and CPANPLUS do it, like every other > module that has dependencies? Why would a new mechanism be required?
Well, the problem that's been haunting us for ages is that we need those dependencies to generate a correct Makefile. Gtk2 needs EU::Depends, EU::PkgConfig, and Glib at Makefile.PL time. But the only way to tell CPAN/CPANPLUS what dependencies it should install is to write a Makefile which lists those dependencies. To solve this dilemma, we first check if those modules are already installed. If not, we write a fake Makefile which doesn't really do anything but which lists the mentioned modules as fatal dependencies. In the past, this has caused CPAN/CPANPLUS to ask the user whether he wants to install the pre-requisites. This doesn't seem to happen anymore. Maybe that's due to the PREREQ_FATAL flag? Anyway, even if CPAN/CPANPLUS still prompted the user, this approach wouldn't really work either: After happily installing all the required modules, CPAN/CPANPLUS would go back to the original module (Gtk2, say) to try to install it. But since there already is a Makefile whose mtime is newer than Makefile.PL's, the Makefile wouldn't get regenerated. The fake Makefile already present doesn't do anything useful though, and definitely doesn't build and install the module. Over the last few years, a couple of possible solutions have been suggested. The ones I remember are bundling and using ExtUtils::AutoInstall[1] and using CPAN.pm manually[2] to prompt the user and install needed modules on demand. [1] http://search.cpan.org/~autrijus/ExtUtils-AutoInstall-0.63/lib/ExtUtils/AutoInstall.pm [2] https://rt.cpan.org/Ticket/Display.html?id=14369
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #18676] Gtk2 not installable from CPAN
Date: Sun, 16 Apr 2006 19:17:33 +0200
To: Torsten Schönfeld via RT <bug-Gtk2 [...] rt.cpan.org>
From: Marc Lehmann <schmorp [...] schmorp.de>
On Sun, Apr 16, 2006 at 10:45:14AM -0400, Torsten Schönfeld via RT <bug-Gtk2@rt.cpan.org> wrote: Show quoted text
> wants to install the pre-requisites. This doesn't seem to happen > anymore. Maybe that's due to the PREREQ_FATAL flag?
Probably (so something did change, after all, and if this is the only thing this would explain why it worked but does no longer). Show quoted text
> Anyway, even if CPAN/CPANPLUS still prompted the user, this approach > wouldn't really work either: After happily installing all the required > modules, CPAN/CPANPLUS would go back to the original module (Gtk2, say) > to try to install it. But since there already is a Makefile whose mtime
Current versions of CPAN are supposed to regenerate the makefile (mine does). Even then, running install Gtk2 twice is much much easier than having to install all dependencies manually. Another solution which works with all CPAN versions is to create a Bundle file (which is basically an empty module with just the required dependencies). Show quoted text
> Over the last few years, a couple of possible solutions have been > suggested. The ones I remember are bundling and using > ExtUtils::AutoInstall[1] and using CPAN.pm manually[2] to prompt the > user and install needed modules on demand.
The agreement, AFAICR, was that cpan is buggy in this respect and should just regenerate the makefile. I am not sure how common the fix is, though. Still, running install twice is an improvement over having to install dependencies manually, as users simply don't know which moduels to install and its atedious process to gobble up all dependencies yourself if you just want Gtk2 to make some othe rprogram run. -- The choice of a -----==- _GNU_ ----==-- _ generation Marc Lehmann ---==---(_)__ __ ____ __ pcg@goof.com --==---/ / _ \/ // /\ \/ / http://schmorp.de/ -=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE
On Sun Apr 16 13:18:24 2006, schmorp@schmorp.de wrote: Show quoted text
> > Maybe that's due to the PREREQ_FATAL flag?
> > Probably (so something did change, after all, and if this is the only > thing this would explain why it worked but does no longer).
This flag's been there for over a year as well. If anything changed, it's CPAN's and/or CPANPLUS' interpretation of it. The docs for EU::MM have this to say about PREREQ_FATAL: If this parameter is true, failing to have the required modules (or the right versions thereof) will be fatal. perl Makefile.PL will die with the proper message. [...] Do not use this parameter for simple requirements, which could be resolved at a later time, e.g. after an unsuccessful make test of your module. This sounds like a pretty good match for our situation. Show quoted text
> Current versions of CPAN are supposed to regenerate the makefile (mine > does). > Even then, running install Gtk2 twice is much much easier than having > to > install all dependencies manually.
Ah, interesting. So should we just remove PREREQ_FATAL and hope that CPAN/CPANPLUS do the right thing? That is, do they install the dependencies *and* regenerate the Makefile afterwards if we simply remove that flag? Show quoted text
> Another solution which works with all CPAN versions is to create a > Bundle file (which is basically an empty module with just the required > dependencies).
We have Gavin's Bundle::Gnome2, but that includes a lot more than just Gtk2 and its dependencies.
RT-Send-CC: scott [...] asofyet.org
In http://rt.cpan.org//Ticket/Display.html?id=18869 Steffen suggests using Module::Install to solve this issue. That looks doable, but I don't really like the idea of having to bundle Module::Install with each and every of our modules.
From: muppet <scott [...] asofyet.org>
On Sat Apr 22 14:14:23 2006, TSCH wrote: Show quoted text
> In > > http://rt.cpan.org//Ticket/Display.html?id=18869 > > Steffen suggests using Module::Install to solve this issue. That looks > doable, but I don't really like the idea of having to bundle > Module::Install with each and every of our modules.
We've also considered AutoInstall, but balked at the same caveat about having to bundle the extra modules. (We would have to bundle it with every module because you can start installing from any point in the dependency tree.) The real problem was that CPAN and CPANPLUS wouldn't re-run Makefile.PL after the dependencies have been satisfied, and the dependencies must be satisfied because they are used inside Makefile.PL. If this behavior has been fixed, then we should be able to make some trivial changes to the Makefile.PLs...
The solution to this problem has come through the development of META.yml and the new key configure_requires in there. So you need to add something like configure_requires: {Glib => 1.16} # pseudo code! to you META.yml (if I get the YAML right) and CPAN.pm 1.92 and higher will install Glib *before* running your Makefile.PL CPANPLUS does not yet support configure_requires but is expected to follow. How you get the thing into META.yml? I haven't tried but I seem to recall there is a meta_add or meta_extra or some such in MakeMaker. Or with Module::Build you get direct support with recent versions.
On Thu Oct 04 02:52:35 2007, ANDK wrote: Show quoted text
> configure_requires: {Glib => 1.16} # pseudo code!
Thanks for the reminder! This is now implemented in HEAD of CVS for Glib and Gtk2. Our other modules will follow over time.
Subject: Cairo dependency not resolved by installer
The dependency on Cairo appears to just crash the Makefile.PL rather than reporting it in a way that would allow CPAN.pm to automatically install it.
On Sat Feb 16 03:27:07 2008, EWILHELM wrote: Show quoted text
> The dependency on Cairo appears to just crash the Makefile.PL rather > than reporting it in a way that would allow CPAN.pm to automatically > install it.
I assume by crashing you mean that Makefile.PL reports that you lack the Cairo module. If so, then this is a known "bug": <http://rt.cpan.org/Ticket/Display.html?id=18676>. We largely blame it on CPAN.pm/CPANPLUS.pm. Recently, a solution surfaced (configure_requires in META.yml) and we're using it in the unstable series of our modules already. This will soon hit CPAN.