Skip Menu |

This queue is for tickets about the GraphViz CPAN distribution.

Report information
The Basics
Id: 73077
Status: resolved
Worked: 5 min
Priority: 0/
Queue: GraphViz

People
Owner: Nobody in particular
Requestors: polettix [...] cpan.org
Cc:
AdminCc:

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



Subject: Missing dependency for File::Which
As seen on cpanm: cpanm (App::cpanminus) 1.4004 on perl 5.012003 built for i686-linux Work directory is /home/ec2-user/.cpanm/work/1323279319.10127 You have make /usr/bin/make You have LWP 6.02 You have /bin/tar: tar (GNU tar) 1.23 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. You have /usr/bin/unzip Searching GraphViz on cpanmetadb ... --> Working on GraphViz Fetching http://search.cpan.org/CPAN/authors/id/R/RS/RSAVAGE/GraphViz- 2.08.tgz -> OK Unpacking GraphViz-2.08.tgz Entering GraphViz-2.08 Checking configure dependencies from META.yml Checking if you have Module::Build 0.38 ... Yes (0.3800) Configuring GraphViz-2.08 Running Build.PL Error: GraphViz requires File::Which to run Build.PL and Makefile.PL. Running Makefile.PL Error: GraphViz requires File::Which to run Build.PL and Makefile.PL. -> N/A -> FAIL Configure failed for GraphViz-2.08. See /home/ec2- user/.cpanm/build.log for details.
Hi Flavio See this comment in the CHANGES file: <---8---> 2.07 Sun Oct 30 16:08:00 2011 - Rewrite Build.PL and Makefile.PL to try loading File::Which rather than assuming it is installed. This avoids the chicken-and-egg problem whereby these 2 programs need File::Which::which to find 'dot'. Many thanx to Richard Clamp for the error report: https://rt.cpan.org/Public/Bug/Display.html?id=71971. <---8---> So, we do appreciate that this is a problem, but the error msg has been designed to tell you that File::Which is missing, and must be installed before trying to install GraphViz. Note also that you /really/ should switch to GraphViz2.
CC: polettix [...] cpan.org
Subject: Re: [rt.cpan.org #73077] Missing dependency for File::Which
Date: Fri, 9 Dec 2011 10:36:29 +0100
To: bug-GraphViz [...] rt.cpan.org
From: Flavio Poletti <polettix [...] gmail.com>
Hi, Show quoted text
> So, we do appreciate that this is a problem, but the error msg has been > designed to tell you that File::Which is missing, and must be installed > before trying to install GraphViz.
I'm a bit shocked by this. The whole point of the cpan[pm]? toolchain is to avoid these kind of requirements on the user, but still we're saying that there's a requisite that must be fulfilled manually. Show quoted text
> Note also that you /really/ should switch to GraphViz2.
The whole thing happened while trying to install RT... so it does not seem to be an option. Cheers, Flavio.
Subject: Re: [rt.cpan.org #73077] Missing dependency for File::Which
Date: Sat, 10 Dec 2011 07:41:11 +1100
To: bug-GraphViz [...] rt.cpan.org
From: Ron Savage <ron [...] savage.net.au>
Hi Flavio On Fri, 2011-12-09 at 04:36 -0500, Flavio Poletti via RT wrote: Show quoted text
> Queue: GraphViz > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=73077 > > > Hi, >
> > So, we do appreciate that this is a problem, but the error msg has been > > designed to tell you that File::Which is missing, and must be installed > > before trying to install GraphViz.
> > I'm a bit shocked by this. The whole point of the cpan[pm]? toolchain > is to avoid these kind of requirements on the user, but still we're > saying that there's a requisite that must be fulfilled manually.
Fair enough. I have some time this morning (Saturday here in Oz) so I'll look at this again. I dislike what's been arranged. Don't forget - I didn't write GraphViz :-). I will release a new version if I can't see too many problems. I'm not sure right now why File::Which wasn't just made a pre-req. Moments later: Ahhhhh - But I can see a big problem - File::Which is needed /before/ running Build.PL or Makefile.PL. I'll have a look at changing that code so the package installs even if dot is not available... Nope - keep reading. It gets worse: Of course that means if dot is not available, the tests won't pass, so the package won't install anyway. Got any suggestions as to how to deal with that scenario? I guess this is what the Alien::* suite is designed to deal with. I'll see if there's an Alien for Graphviz. Do you use Module::Build (i.e. Build.PL) in preference to make (Makefile.PL). It might be possible to change Build.PL but not Makefile.PL to handle a missing dot at test time in a more convenient way. All this tells me that the real problem is the external code's unknown presence or absence. Also: I assume similar code exists in GraphViz2 :-( which I wrote. Show quoted text
> > Note also that you /really/ should switch to GraphViz2.
> > The whole thing happened while trying to install RT... so it does not > seem to be an option.
Ahh. Thanx for the extra info. -- Ron Savage http://savage.net.au/ Ph: 0421 920 622
Subject: Re: [rt.cpan.org #73077] Missing dependency for File::Which
Date: Sat, 10 Dec 2011 09:41:16 +1100
To: bug-GraphViz [...] rt.cpan.org
From: Ron Savage <ron [...] savage.net.au>
Hi Flavio On Fri, 2011-12-09 at 15:40 -0500, ron@savage.net.au via RT wrote: Show quoted text
> Queue: GraphViz > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=73077 >
Also, which OS are you using? If Linux-like, it might make life easier. -- Ron Savage http://savage.net.au/ Ph: 0421 920 622
Subject: Re: [rt.cpan.org #73077] Missing dependency for File::Which
Date: Mon, 12 Dec 2011 11:11:40 +0100
To: bug-GraphViz [...] rt.cpan.org
From: Flavio Poletti <polettix [...] gmail.com>
On Fri, Dec 9, 2011 at 9:40 PM, ron@savage.net.au via RT <bug-GraphViz@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=73077 >
>> > So, we do appreciate that this is a problem, but the error msg has been >> > designed to tell you that File::Which is missing, and must be installed >> > before trying to install GraphViz.
>> >> I'm a bit shocked by this. The whole point of the cpan[pm]? toolchain >> is to avoid these kind of requirements on the user, but still we're >> saying that there's a requisite that must be fulfilled manually.
> > Fair enough. > > I have some time this morning (Saturday here in Oz) so I'll look at this > again. > > I dislike what's been arranged. Don't forget - I didn't write > GraphViz :-).
Well, I reported a problem when I found it - no blame on anyone! Open Source is (mostly) about volunteer, so I was not trying to bash you in any way. Show quoted text
> I will release a new version if I can't see too many problems. I'm not > sure right now why File::Which wasn't just made a pre-req. > > Moments later: > > Ahhhhh - But I can see a big problem - File::Which is needed /before/ > running Build.PL or Makefile.PL. I'll have a look at changing that code > so the package installs even if dot is not available... Nope - keep > reading.
Yes, I suspected that the problem was in the tool, not in the distribution! Show quoted text
> It gets worse: Of course that means if dot is not available, the tests > won't pass, so the package won't install anyway. > > Got any suggestions as to how to deal with that scenario?
I'll try to look at this, it's the first time I see something like this. But... Show quoted text
> I guess this is what the Alien::* suite is designed to deal with. I'll > see if there's an Alien for Graphviz.
... I guess you're right. Show quoted text
> Do you use Module::Build (i.e. Build.PL) in preference to make > (Makefile.PL). It might be possible to change Build.PL but not > Makefile.PL to handle a missing dot at test time in a more convenient > way.
From what I know, the two should be alternative, so you might keep Build.PL and throw Makefile.PL away. Anyway, I see that cpanm tries them both. Show quoted text
> > All this tells me that the real problem is the external code's unknown > presence or absence. > > Also: I assume similar code exists in GraphViz2 :-( which I wrote.
I haven't seen it yet, but is the actual problem test-related? Regarding the question in the other message, yes I'm using Linux but I guess you're aiming for universal support? :-) Cheers, Flavio.
Subject: Re: [rt.cpan.org #73077] Missing dependency for File::Which
Date: Tue, 13 Dec 2011 08:23:55 +1100
To: bug-GraphViz [...] rt.cpan.org
From: Ron Savage <ron [...] savage.net.au>
Hi Flavio On 12/12/11 21:12, Flavio Poletti via RT wrote: Show quoted text
> Queue: GraphViz > Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=73077> > > On Fri, Dec 9, 2011 at 9:40 PM, ron@savage.net.au via RT > <bug-GraphViz@rt.cpan.org> wrote:
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=73077>
>>>> So, we do appreciate that this is a problem, but the error msg has been >>>> designed to tell you that File::Which is missing, and must be installed >>>> before trying to install GraphViz.
>>> >>> I'm a bit shocked by this. The whole point of the cpan[pm]? toolchain >>> is to avoid these kind of requirements on the user, but still we're >>> saying that there's a requisite that must be fulfilled manually.
>> >> Fair enough. >> >> I have some time this morning (Saturday here in Oz) so I'll look at this >> again. >> >> I dislike what's been arranged. Don't forget - I didn't write >> GraphViz :-).
> > Well, I reported a problem when I found it - no blame on anyone! Open > Source is (mostly) about volunteer, so I was not trying to bash you in > any way.
No offence taken. Show quoted text
>> I will release a new version if I can't see too many problems. I'm not >> sure right now why File::Which wasn't just made a pre-req. >> >> Moments later: >> >> Ahhhhh - But I can see a big problem - File::Which is needed /before/ >> running Build.PL or Makefile.PL. I'll have a look at changing that code >> so the package installs even if dot is not available... Nope - keep >> reading.
> > Yes, I suspected that the problem was in the tool, not in the distribution! >
>> It gets worse: Of course that means if dot is not available, the tests >> won't pass, so the package won't install anyway. >> >> Got any suggestions as to how to deal with that scenario?
> > I'll try to look at this, it's the first time I see something like this. But... >
>> I guess this is what the Alien::* suite is designed to deal with. I'll >> see if there's an Alien for Graphviz.
> > ... I guess you're right.
I had a look at a couple of Alien::* distros, and various questions arise, which I have not seen discussed, such as: o How hard is it to download /and build/ Graphviz on any OS? o What permissions to I need? o Is a C/C++ compiler available? o Where do I install executables on each OS? o What permissions do I need to install executables? So, I decided to not go down that route. I strongly suggest you log a ticket on RT about RT using GraphViz, and tell them to switch to GraphViz2. That is the long-term solution. Show quoted text
>> Do you use Module::Build (i.e. Build.PL) in preference to make >> (Makefile.PL). It might be possible to change Build.PL but not >> Makefile.PL to handle a missing dot at test time in a more convenient >> way.
>
>> From what I know, the two should be alternative, so you might keep
> Build.PL and throw Makefile.PL away. Anyway, I see that cpanm tries > them both.
Can't do that. Some people only use Makefile.PL. I prefer Build.PL myself, but it's impossible and unacceptable to force people to do that. Show quoted text
>> >> All this tells me that the real problem is the external code's unknown >> presence or absence. >> >> Also: I assume similar code exists in GraphViz2 :-( which I wrote.
> > I haven't seen it yet, but is the actual problem test-related?
The question was redundant :-). I wrote GraphViz2, and it just assumes File::Which is installed. Show quoted text
> Regarding the question in the other message, yes I'm using Linux but I > guess you're aiming for universal support? :-)
Yes. Much as I loathe Windows, I do try to write OS-independent code in all cases. -- Ron Savage http://savage.net.au/ Ph: 0421 920 622
CC: polettix [...] cpan.org
Subject: Re: [rt.cpan.org #73077] Missing dependency for File::Which
Date: Tue, 13 Dec 2011 13:55:30 +0100
To: bug-GraphViz [...] rt.cpan.org
From: Flavio Poletti <polettix [...] gmail.com>
Show quoted text
> I strongly suggest you log a ticket on RT about RT using GraphViz, and > tell them to switch to GraphViz2. That is the long-term solution.
OK, I'll try to do that. Show quoted text
>>> Do you use Module::Build (i.e. Build.PL) in preference to make >>> (Makefile.PL). It might be possible to change Build.PL but not >>> Makefile.PL to handle a missing dot at test time in a more convenient >>> way.
>>
>>> From what I know, the two should be alternative, so you might keep
>> Build.PL and throw Makefile.PL away. Anyway, I see that cpanm tries >> them both.
> > Can't do that. Some people only use Makefile.PL. > > I prefer Build.PL myself, but it's impossible and unacceptable to force > people to do that.
Isn't there a bottom line in which you have a Makefile.PL that installs the Module::Build stuff, then calls the Build.PL stack? Just brainstorming...
On Tue Dec 13 07:55:59 2011, polettix@gmail.com wrote: Show quoted text
> > I strongly suggest you log a ticket on RT about RT using GraphViz, and > > tell them to switch to GraphViz2. That is the long-term solution.
> > OK, I'll try to do that.
Opened it: http://issues.bestpractical.com/Ticket/Display.html?id=19083
Subject: Re: [rt.cpan.org #73077] Missing dependency for File::Which
Date: Wed, 14 Dec 2011 10:00:48 +1100
To: bug-GraphViz [...] rt.cpan.org
From: Ron Savage <ron [...] savage.net.au>
Hi Flavio On 13/12/11 23:56, Flavio Poletti via RT wrote: Show quoted text
> Queue: GraphViz > Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=73077> >
>> I strongly suggest you log a ticket on RT about RT using GraphViz, and >> tell them to switch to GraphViz2. That is the long-term solution.
> > OK, I'll try to do that.
Great! Show quoted text
>>>> Do you use Module::Build (i.e. Build.PL) in preference to make >>>> (Makefile.PL). It might be possible to change Build.PL but not >>>> Makefile.PL to handle a missing dot at test time in a more convenient >>>> way.
>>>
>>>> From what I know, the two should be alternative, so you might keep
>>> Build.PL and throw Makefile.PL away. Anyway, I see that cpanm tries >>> them both.
>> >> Can't do that. Some people only use Makefile.PL. >> >> I prefer Build.PL myself, but it's impossible and unacceptable to force >> people to do that.
> > Isn't there a bottom line in which you have a Makefile.PL that > installs the Module::Build stuff, then calls the Build.PL stack? Just > brainstorming...
Understand. Still, this doesn't deal with the chicken-and-egg situation of Build.PL/Makefile.PL needing File::Which /before/ they run and yet it's only /after/ they run that they tell the user that File::Which is needed :-(. -- Ron Savage http://savage.net.au/ Ph: 0421 920 622
CC: polettix [...] cpan.org
Subject: Re: [rt.cpan.org #73077] Missing dependency for File::Which
Date: Wed, 14 Dec 2011 10:10:49 +0100
To: bug-GraphViz [...] rt.cpan.org
From: Flavio Poletti <polettix [...] gmail.com>
Show quoted text
> Understand. Still, this doesn't deal with the chicken-and-egg situation > of Build.PL/Makefile.PL needing File::Which /before/ they run and yet > it's only /after/ they run that they tell the user that File::Which is > needed :-(.
Yesterday I took a look at it and probably File::Which is not needed at all. Well, I hope :-) File::Which::which is used to check whether the "dot" program is somehow "reachable" or not in the particular system. A quick test in Linux took me to an equivalent test based on open(): open my $fh, '-|', 'dot' or die "Error: Did not find 'dot'. Please install graphviz from http://www.graphviz.org/"; close $fh; Of course the above code should be tested under other OSs, but I expect it to be pretty consistent across different platforms. Even though there's the following warning in perlport (http://perldoc.perl.org/perlport.html): "In general, don't directly access the system in code meant to be portable. That means, no system, exec, fork, pipe, `` , qx//, open with a |, nor any of the other things that makes being a perl hacker worth being." I assume that a module whose way of work is actually based on forking should just work with the above test. Cheers, Flavio.
Subject: Re: [rt.cpan.org #73077] Missing dependency for File::Which
Date: Thu, 15 Dec 2011 11:25:32 +1100
To: bug-GraphViz [...] rt.cpan.org
From: Ron Savage <ron [...] savage.net.au>
Hi Flavio On 14/12/11 20:11, Flavio Poletti via RT wrote: Show quoted text
> > open my $fh, '-|', 'dot' > or die "Error: Did not find 'dot'. Please install graphviz from > http://www.graphviz.org/"; > close $fh;
$many x $thanx; I've put this into Build.PL and Makefile.PL: if (open my $fh, '|dot', ) { close $fh; } else { die "Please install Graphviz from http://www.graphviz.org/.\n"; } I'm releasing GraphViz V 2.09 and GraphViz2 1.12 with this patch. Show quoted text
> Of course the above code should be tested under other OSs, but I > expect it to be pretty consistent across different platforms. Even > though there's the following warning in perlport > (http://perldoc.perl.org/perlport.html): > > "In general, don't directly access the system in code meant to be > portable. That means, no system, exec, fork, pipe, `` , qx//, open > with a |, nor any of the other things that makes being a perl hacker > worth being." > > I assume that a module whose way of work is actually based on forking > should just work with the above test.
I expect it to work because it's not passing any data to dot, just seeing if dot is available or not. -- Ron Savage http://savage.net.au/ Ph: 0421 920 622
Subject: Re: [rt.cpan.org #73077] Missing dependency for File::Which
Date: Thu, 15 Dec 2011 11:28:41 +0100
To: bug-GraphViz [...] rt.cpan.org
From: Flavio Poletti <polettix [...] gmail.com>
On Thu, Dec 15, 2011 at 1:24 AM, ron@savage.net.au via RT <bug-GraphViz@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=73077 > > I'm releasing GraphViz V 2.09 and GraphViz2 1.12 with this patch. >
Let's hope for the best from cpantesters! Cheers, Flavio.
I've released patched versions of GraphViz and GraphViz2 which should solve this problem. See: o GraphViz V 2.09 o GraphViz2 V 1.12.