(none) imager-devel
/ help / lists / applications / search /
 

Re: Problems with Imager Imager::Plot on Solaris 8

From: Arnar Mar Hrafnkelsson (
05807@xyz.molar.is)
Date: Mon 14 Oct 2002 - 18:08:23 GMT

  • Next message: Slaven Rezic: "Re: Problems with Imager Imager::Plot on Solaris 8"

    The problem is that solaris stores its color file rgb.txt in a different
    location than many other operating systems. The problem is really in
    Imager and not in Imager::Plot. It just so turns out that the tests for
    Imager don't tickle this particular bug. (Which is a bug too of course).
    If I'm remembering correctly the fix for this is to change the definition
    of @x_search in lib/Imager/Color.pm in the imager distribution (and then
    reinstall).

    The correct definition is:

    my @x_search =
      (
       '/usr/lib/X11/rgb.txt', # seems fairly standard
       '/usr/local/lib/X11/rgb.txt', # seems possible
       '/usr/X11R6/lib/X11/rgb.txt', # probably the same as the first
       '/usr/openwin/lib/rgb.txt',
       '/usr/openwin/lib/X11/rgb.txt',
      );

    -- Arnar

    On Mon, 14 Oct 2002, Super-User wrote:

    > Hi!
    >
    > I want to use Imager on solaris 8 and at first it seemed to work:
    >
    > All tests successful, 109 subtests skipped.
    > Files=42, Tests=957, 66 wallclock secs (49.24 cusr + 7.32 csys = 56.56
    > CPU)
    > \/bin/sh -c true
    > No tests defined for Imager::plugins extension.
    >
    > but when I had compiled Imager::Plot and made the tests I got the
    > following error:
    >
    > bash-2.05# make test
    > PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl
    > 1..3
    > ok 1
    > ok 2
    > val is not of type Imager::Color at blib/lib/Imager/Plot/DataSet.pm line
    > 171.
    > *** Error code 2
    > make: Fatal error: Command failed for target `test_dynamic'
    >
    > Anyone got any ideas? Since it fails on the examples I cant just ignore
    > it..
    >
    > bash-2.05# ./test2.pl
    > val is not of type Imager::Color at
    > /usr/local/lib/perl5/site_perl/5.8.0/Imager/Plot/DataSet.pm line 171.
    > bash-2.05# more test2.pl
    > #!/usr/local/bin/perl
    >
    > use Imager;
    > use Imager::Plot;
    >
    > $plot = Imager::Plot->new(Width => 550,
    > Height => 350,
    > GlobalFont =>
    > '/usr/openwin/lib/X11/fonts/TrueType/Arial.ttf');
    >
    > my @X = 0..100;
    > my @Y = map { sin($_/10) } @X;
    > my @Z = map { 1+cos($_/10) } @X;
    >
    > $plot->AddDataSet(X => \@X, Y => \@Z);
    > $plot->AddDataSet(X => \@X, Y => \@Y,
    > style=>{marker=>{size => 2,
    > symbol => 'circle',
    > color =>
    > Imager::Color->new('red'),
    > },
    > });
    >
    > $img = Imager->new(xsize=>600, ysize => 400);
    > $img->box(filled=>1, color=>'white');
    >
    > $plot->{'Ylabel'} = 'angst';
    > $plot->{'Xlabel'} = 'time';
    > $plot->{'Title'} = 'Quality time';
    >
    > $plot->Render(Image => $img, Xoff => 40, Yoff => 370);
    > $img->write(file => "testout.png");
    >
    >
    >
    >
    >



  •