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

Well, I've fallen into CPAN dependency hell. Here is a rundown of my travails -- I was trying to beat GraphViz into submission on my Windows laptop (see Problems with GraphViz module), the combination of GraphViz, Apache, and Perl on Windows doesn't seem very fecund. Mobility of my laptop apart, I also need to make it work on my Mac, so I started installing everything there. Well, after a couple of hours, I haven't gotten anywhere at all.

cpan> install GraphViz .. Can't exec "gpg": No such file or directory at .. .. Cannot use GnuPG or Crypt::OpenPGP, please install either one first! .. CPAN.pm: Going to build L/LB/LBROCARD/GraphViz-2.02.tar.gz Looking for dot... found it at /usr/local/bin/dot Checking if your kit is complete... Looks good Warning: prerequisite IPC::Run 0.6 not found. .. ---- Unsatisfied dependencies detected during [L/LB/LBROCARD/GraphViz- +2.02.tar.gz] ----- IPC::Run Shall I follow them and prepend them to the queue of modules we are processing right now? [yes] yes ..

Off we went chasing IPC::Run. About 20 mins later, I got

.. Checking if your kit is complete... Looks good Writing Makefile for IPC::Run .. Installing /usr/local/ActivePerl-5.8/man/man3/IPC::Run::Win32IO.3 Installing /usr/local/ActivePerl-5.8/man/man3/IPC::Run::Win32Pump.3 Appending installation info to /usr/local/ActivePerl-5.8/lib/5.8.7/dar +win-thread-multi-2level/perllocal.pod make: *** No rule to make target `1'. Stop.

Ok, then we continue without breaking our stride...

/usr/bin/make install 1 -- NOT OK Running make for L/LB/LBROCARD/GraphViz-2.02.tar.gz Is already unwrapped into directory /Users/pkishor/.cpanAS/build/Gra +phViz-2.02 CPAN.pm: Going to build L/LB/LBROCARD/GraphViz-2.02.tar.gz .. Running make test Prepending /Users/pkishor/.cpanAS/build/IPC-Run-0.80/blib/arch /Users/ +pkishor/.cpanAS/build/IPC-Run-0.80/blib/lib to PERL5LIB. PERL_DL_NONLAZY=1 /Users/pkishor/bin/perl "-MExtUtils::Command::MM" "- +e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/dumper....ok + t/foo.......dyld: /usr/local/bin/dot can't open library: @executable_p +ath/../Frameworks/graphviz.framework/Versions/A/graphviz (No such fi +le or directory, errno = 2) Use of uninitialized value in pattern match (m//) at t/foo.t line 91. t/foo.......NOK 1 + # Failed test in t/foo.t at line 91. # undef # doesn't match '(?-xism:^digraph test {)' Use of uninitialized value in pattern match (m//) at t/foo.t line 92. ,, Test returned status 30 (wstat 7680, 0x1e00) DIED. FAILED tests 1-30 Failed 30/30 tests, 0.00% okay t/pod.......skipped all skipped: Test::Pod 1.14 required for testing POD t/simple....ok + Failed Test Stat Wstat Total Fail Failed List of Failed ---------------------------------------------------------------------- +--------- t/foo.t 30 7680 30 30 100.00% 1-30 1 test skipped. Failed 1/4 test scripts, 75.00% okay. 30/61 subtests failed, 50.82% ok +ay. make: *** [test_dynamic] Error 255 /usr/bin/make test -- NOT OK Running make install make test had returned bad status, won't install without force Failed during this command: LBROCARD/GraphViz-2.02.tar.gz : make_test NO RSOD/IPC-Run-0.80.tar.gz : install NO

Now, because I got admonished several times that I didn't have Crypt::OpenPGP, off I go...

+ cpan> install Crypt::OpenPGP Running install for module Crypt::OpenPGP Running make for B/BT/BTROTT/Crypt-OpenPGP-1.03.tar.gz Fetching with LWP: .. about 50 more dependencies later... CPAN.pm: Going to build B/BT/BTROTT/Convert-PEM-0.07.tar.gz *** ExtUtils::AutoInstall version 0.56 *** Checking for dependencies... [Core Features] - Class::ErrorHandler ...missing. - MIME::Base64 ...loaded. (3.05) - Convert::ASN1 ...missing. (would need 0.10) - Digest::MD5 ...loaded. (2.33) - Crypt::DES_EDE3 ...missing.

And, there I still remain. None the wiser. Monks, please guide.

--

when small people start casting long shadows, it is time to go to bed

Replies are listed 'Best First'.
Re: GraphViz.pm on Mac -- CPAN dependency hell
by jasonk (Parson) on Sep 18, 2006 at 01:14 UTC

    I didn't have any problems installing GraphViz on OS X when I started with perl that I installed myself using the CPAN sources. On the other hand I've very seldom had success installing additional modules when starting with the ActiveState perl stuff, which is why I avoid it whenever possible.


    We're not surrounded, we're in a target-rich environment!
Re: GraphViz.pm on Mac -- CPAN dependency hell
by syphilis (Archbishop) on Sep 18, 2006 at 01:30 UTC
    Are you running an ActiveState build of perl ? According to http://ppm.activestate.com/BuildStatus/5.8-C.html they have ppm packages (for Darwin) for Convert::ASN1 and Crypt::DES_EDE3. The build of Class::ErrorHandler is reported as failing for Darwin, but if you click on the "FAIL" link you'll see that the report claims that the build was successful. So, maybe it's there as a ppm after all. If not, download the source from CPAN, extract, and build manually ... or use CPAN to do it if you want. Of course, I doubt that Crypt::OpenPGP is needed for GraphViz - it's more'n'likely something that CPAN.pm wants you to install for its own verification procedures. (CPAN.pm is excellent but I hate it, don't use it, and know little about it.)

    It seems to me that you've nearly got GraphViz installed. It has built ok, but one of the test scripts fails - because "@executable_path/../Frameworks/graphviz.framework/Versions/A/graphviz" can't be found. That's a pretty weird looking name for a directory. It looks to me that "@executable_path" might have been taken literally rather than interpolated. In any case it would be a good idea to learn something more about why that failure occurs. You can run that script separately as 'perl -Mblib t/foo.t'. Have a hack at it - see what you come up with. Perhaps it's only a bug in t/foo.t that's standing between you and success.

    You could also simply force the install of GraphViz if you want - and see if it behaves properly for you. If it doesn't, then that bad installation will be overwritten next time you do a 'make install' of GraphViz.

    Cheers,
    Rob
      You pointed me in the right direction. The funky graphviz directory is being sought by the dot program that was compiled as part of the GraphViz binary created by pixelglow folks http://www.pixelglow.com/graphviz. Both you and jasonk further pointed me in the right direction by prodding me to ditch ActiveState, and roll my own. Its gonna be painful, but trial by fire and all that... so, I am doing that as we speak, and the compiler is chugging away in the background.

      Its just all those dependencies... looking at Graphviz (the program, not the perl module), that dang package has sixty zillion packages it depends on, and one or more are bound to make me want to reach for Zantac.

      --

      when small people start casting long shadows, it is time to go to bed
Re: GraphViz.pm on Mac -- CPAN dependency hell
by aquarium (Curate) on Sep 17, 2006 at 23:28 UTC
    on windows you should be trying to get a ppm package instead...if you can find a ppm package for graphviz.
    the hardest line to type correctly is: stty erase ^H
      Did I say Windows? I am sorry for not being clear. My Windows experience was not very satisfying (Problems with GraphViz module). The GraphViz.pm module installed fine, but I can't make it work as a cgi. But now I am trying to make it work on my Mac. That too is less filling.
      --

      when small people start casting long shadows, it is time to go to bed
        not sure about packages being available for Mac.
        you could create the graphviz file in plain perl and then just call the required (and installed) graphviz executable from within perl, to produce what you want.
        btw...what (interesting) stuff are you trying to do in graphviz?...i've dabbled in it a little recently
        the hardest line to type correctly is: stty erase ^H