Nowe posty

Autor Wątek: OTRS problem z instalacją GD  (Przeczytany 5014 razy)

Offline Maciej Szczypiński

  • Users
  • Stały bywalec
  • ***
  • Wiadomości: 161
    • Zobacz profil
OTRS problem z instalacją GD
« dnia: 2015-03-23, 08:42:50 »
Witajcie. Przy instalacji potrzebnych modułów do uruchomienia OTRS napotkałem "ścianę". Walę głową w mur z braku pomysłów. Poproszę o wsparcie :)

Slackware 13.37.

root@slack1:/home/disc/otrs-4.0.6# perl bin/otrs.CheckModules.pl
  o Apache2::Reload..................ok (v0.12)
  o Archive::Tar.....................ok (v1.54)
  o Archive::Zip.....................ok (v1.45)
  o Crypt::Eksblowfish::Bcrypt.......ok (v0.009)
  o Crypt::SSLeay....................ok (v0.72)
  o Date::Format.....................ok (v2.24)
  o DBI..............................ok (v1.616)
  o DBD::mysql.......................ok (v4.018)
  o DBD::ODBC........................Not installed! Use: 'cpan DBD::ODBC' (optional - Required to connect to a MS-SQL database.)
  o DBD::Oracle......................Not installed! Use: 'cpan DBD::Oracle' (optional - Required to connect to a Oracle database.)
  o DBD::Pg..........................Not installed! Use: 'cpan DBD::Pg' (optional - Required to connect to a PostgreSQL database.)
  o Encode::HanExtra.................ok (v0.23)
  o GD...............................Not installed! Use: 'cpan GD' (optional - Required for stats.)
    o GD::Text.......................Not installed! Use: 'cpan GD::Text' (optional - Required for stats.)
    o GD::Graph......................Not installed! Use: 'cpan GD::Graph' (optional - Required for stats.)
  o IO::Socket::SSL..................ok (v2.012)
  o JSON::XS.........................ok (v3.01)
  o List::Util::XS...................ok (v1.22)
  o LWP::UserAgent...................ok (v6.06)
  o Mail::IMAPClient.................ok (v3.35)
    o IO::Socket::SSL................ok (v2.012)
  o ModPerl::Util....................ok (v2.000008)
  o Net::DNS.........................ok (v0.83)
  o Net::LDAP........................ok (v0.64)
  o PDF::API2........................ok (v2.023)
  o Template.........................ok (v2.26)
  o Template::Stash::XS..............ok (undef)
  o Text::CSV_XS.....................ok (v1.16)
  o Time::HiRes......................ok (v1.9719)
  o Time::Piece......................ok (v1.15_01)
  o XML::Parser......................ok (v2.40)
  o YAML::XS.........................ok (v0.59)
MySQL działa, więc ODBC, Oracle, PostgreSQL nie będą potrzebne (przynajmniej tak zakładam) :)
Problem dotyczy GD.

root@slack1:/home/disc/otrs-4.0.6# cpan GD
Going to read '/root/.cpan/Metadata'
  Database was generated on Mon, 23 Mar 2015 05:41:02 GMT
Running install for module 'GD'
Running make for L/LD/LDS/GD-2.56.tar.gz
Checksum for /root/.cpan/sources/authors/id/L/LD/LDS/GD-2.56.tar.gz ok

  CPAN.pm: Going to build L/LD/LDS/GD-2.56.tar.gz

Configuring for libgd version 2.0.35.
Checking for stray libgd header files...

** WARNING: found gd.h header file in /usr/X11R6/include/gd.h, but it is expected at /usr/include/gd.h. This may cause compile errors! **
** Possible problems found **

Included Features:          GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON GD_UNCLOSEDPOLY GD_ANIMGIF GD_FTCIRCLE VERSION_33
GD library used from:       /usr
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'GD' version '2.56'
Building GD
Extracting Image.pm (with variable substitutions)
cc -I/usr/include -I/usr/lib64/perl5/5.12.3/x86_64-linux-thread-multi/CORE -DXS_VERSION="2.56" -DVERSION="2.56" -fPIC -DHAVE_JPEG -DHAVE_FT -DHAVE_XPM -DHAVE_GIF -DHAVE_PNG -DHAVE_ANIMGIF -DVERSION_33 -DHAVE_UNCLOSEDPOLY -DHAVE_FONTCONFIG -DHAVE_FTCIRCLE -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -fPIC -o lib/GD.o lib/GD.c
ExtUtils::Mkbootstrap::Mkbootstrap('blib/arch/auto/GD/GD.bs')
cc -shared -O2 -fPIC -fstack-protector -o blib/arch/auto/GD/GD.so lib/GD.o -L/usr/lib64 -L/usr/lib64 -L/usr/lib64 -L/usr/lib64 -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng14 -lz -lm -lgd
/usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../x86_64-slackware-linux/bin/ld: cannot find -lfontconfig
collect2: ld returned 1 exit status
error building blib/arch/auto/GD/GD.so from lib/GD.o at /usr/lib64/perl5/site_perl/5.12.3/ExtUtils/CBuilder/Base.pm line 320.
  LDS/GD-2.56.tar.gz
  ./Build -- NOT OK
Running Build test
  Can't test without successful make
Running Build install
  Make had returned bad status, install seems impossible
Skrypt zwraca informację, że plik nagłówkowy gd.h jest w nieodpowiednim katalogu - faktycznie znajduje się jednak w obu przypadkach. Natomiast zupełnie nie wiem jak rozgryźć fragment dotyczący -lfontconfig

Natomiast phpinfo() zwraca informację, że GD działa poprawnie:
GD Support	enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.4.4
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPEG Support enabled
libJPEG Version 8
PNG Support enabled
libPNG Version 1.4.5
WBMP Support enabled
XPM Support enabled
XBM Support enabled
JIS-mapped Japanese Font Support enabled
Także brak problemów przy php -v:
root@slack1:/usr/include# php -v
PHP 5.3.6 (cli) (built: Apr 14 2011 14:44:02)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies

Offline Paweł Kraszewski

  • Administrator
  • Guru
  • *****
  • Wiadomości: 2508
  • Lenistwo jest matką potrzeby = babcią wynalazku
    • Zobacz profil
    • Linuxpedia.PL
OTRS problem z instalacją GD
« Odpowiedź #1 dnia: 2015-03-23, 11:32:48 »
Cytuj
Natomiast zupełnie nie wiem jak rozgryźć fragment dotyczący -lfontconfig
No nie wiem... Zainstalować pakiet fontconfig?

PACKAGE NAME:  fontconfig-2.8.0-i486-1.txz
PACKAGE LOCATION:  ./slackware/x
PACKAGE SIZE (compressed):  288 K
PACKAGE SIZE (uncompressed):  920 K
PACKAGE DESCRIPTION:
fontconfig: fontconfig (Font library and tools)
fontconfig:
fontconfig: Fontconfig is a library and tools designed to provide system-wide
fontconfig: font configuration, customization, and application access.
fontconfig:
fontconfig: Fontconfig is written and maintained by Keith Packard.
fontconfig:
Paweł Kraszewski
~Gentoo/FreeBSD/OpenBSD/Specjalizowane customy

Offline Maciej Szczypiński

  • Users
  • Stały bywalec
  • ***
  • Wiadomości: 161
    • Zobacz profil
OTRS problem z instalacją GD
« Odpowiedź #2 dnia: 2015-03-23, 13:26:47 »
Zainstalowałem paczkę.

root@slack1:/home/disc# slackpkg install fontconfig

Looking for fontconfig in package list. Please wait... DONE
Package: fontconfig-2.8.0-x86_64-1.txz
                        Downloading ftp://ftp.man.szczecin.pl/pub/Linux/slackware/slackware64-13.37/./slackware64/x/fontconfig-2.8.0-x86_64-1.txz...
--2015-03-23 12:35:51--  ftp://ftp.man.szczecin.pl/pub/Linux/slackware/slackware64-13.37/slackware64/x/fontconfig-2.8.0-x86_64-1.txz
           => `/var/cache/packages/./slackware64/x/fontconfig-2.8.0-x86_64-1.txz'
Resolving ftp.man.szczecin.pl (ftp.man.szczecin.pl)... 212.14.1.71, 2001:4c58:1:1::f1
Connecting to ftp.man.szczecin.pl (ftp.man.szczecin.pl)|212.14.1.71|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/Linux/slackware/slackware64-13.37/slackware64/x ... done.
==> SIZE fontconfig-2.8.0-x86_64-1.txz ... 272112
==> PASV ... done.    ==> RETR fontconfig-2.8.0-x86_64-1.txz ... done.
Length: 272112 (266K) (unauthoritative)

100%[====================================================================================================================================================>] 272,112     1.61M/s   in 0.2s

2015-03-23 12:35:51 (1.61 MB/s) - `/var/cache/packages/./slackware64/x/fontconfig-2.8.0-x86_64-1.txz' saved [272112]

                        Downloading ftp://ftp.man.szczecin.pl/pub/Linux/slackware/slackware64-13.37/./slackware64/x/fontconfig-2.8.0-x86_64-1.txz.asc...
--2015-03-23 12:35:51--  ftp://ftp.man.szczecin.pl/pub/Linux/slackware/slackware64-13.37/slackware64/x/fontconfig-2.8.0-x86_64-1.txz.asc
           => `/var/cache/packages/./slackware64/x/fontconfig-2.8.0-x86_64-1.txz.asc'
Resolving ftp.man.szczecin.pl (ftp.man.szczecin.pl)... 212.14.1.71, 2001:4c58:1:1::f1
Connecting to ftp.man.szczecin.pl (ftp.man.szczecin.pl)|212.14.1.71|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/Linux/slackware/slackware64-13.37/slackware64/x ... done.
==> SIZE fontconfig-2.8.0-x86_64-1.txz.asc ... 197
==> PASV ... done.    ==> RETR fontconfig-2.8.0-x86_64-1.txz.asc ... done.
Length: 197 (unauthoritative)

100%[====================================================================================================================================================>] 197         --.-K/s   in 0s

2015-03-23 12:35:51 (782 KB/s) - `/var/cache/packages/./slackware64/x/fontconfig-2.8.0-x86_64-1.txz.asc' saved [197]

        Installing fontconfig-2.8.0-x86_64-1...
Verifying package fontconfig-2.8.0-x86_64-1.txz.
Installing package fontconfig-2.8.0-x86_64-1.txz:
PACKAGE DESCRIPTION:
# fontconfig (Font library and tools)
#
# Fontconfig is a library and tools designed to provide system-wide
# font configuration, customization, and application access.
#
# Fontconfig is written and maintained by Keith Packard.
#
Executing install script for fontconfig-2.8.0-x86_64-1.txz.
Package fontconfig-2.8.0-x86_64-1.txz installed.


Searching for NEW configuration files
                No .new files found.
Po zainstalowaniu zabieram się za GD:

root@slack1:/home/disc# cpan GD
Going to read '/root/.cpan/Metadata'
  Database was generated on Mon, 23 Mar 2015 05:41:02 GMT
Running install for module 'GD'
Running make for L/LD/LDS/GD-2.56.tar.gz
Checksum for /root/.cpan/sources/authors/id/L/LD/LDS/GD-2.56.tar.gz ok

  CPAN.pm: Going to build L/LD/LDS/GD-2.56.tar.gz

Configuring for libgd version 2.0.35.
Checking for stray libgd header files...

** WARNING: found gd.h header file in /usr/X11R6/include/gd.h, but it is expected at /usr/include/gd.h. This may cause compile errors! **
** Possible problems found **

Included Features:          GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON GD_UNCLOSEDPOLY GD_ANIMGIF GD_FTCIRCLE VERSION_33
GD library used from:       /usr
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'GD' version '2.56'
Building GD
Extracting Image.pm (with variable substitutions)
cc -I/usr/include -I/usr/lib64/perl5/5.12.3/x86_64-linux-thread-multi/CORE -DXS_VERSION="2.56" -DVERSION="2.56" -fPIC -DHAVE_JPEG -DHAVE_FT -DHAVE_XPM -DHAVE_GIF -DHAVE_PNG -DHAVE_ANIMGIF -DVERSION_33 -DHAVE_UNCLOSEDPOLY -DHAVE_FONTCONFIG -DHAVE_FTCIRCLE -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -fPIC -o lib/GD.o lib/GD.c
ExtUtils::Mkbootstrap::Mkbootstrap('blib/arch/auto/GD/GD.bs')
cc -shared -O2 -fPIC -fstack-protector -o blib/arch/auto/GD/GD.so lib/GD.o -L/usr/lib64 -L/usr/lib64 -L/usr/lib64 -L/usr/lib64 -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng14 -lz -lm -lgd
  LDS/GD-2.56.tar.gz
  ./Build -- OK
Running Build test
t/GD.t ........ 1/11 # Testing using gd2 support.

#   Failed test 'image comparison test 7'
#   at t/GD.t line 249.
# Looks like you failed 1 test of 11.
t/GD.t ........ Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/11 subtests
t/Polyline.t .. ok

Test Summary Report
-------------------
t/GD.t      (Wstat: 256 Tests: 11 Failed: 1)
  Failed test:  9
  Non-zero exit status: 1
Files=2, Tests=12,  0 wallclock secs ( 0.05 usr  0.01 sys +  0.25 cusr  0.04 csys =  0.35 CPU)
Result: FAIL
Failed 1/2 test programs. 1/12 subtests failed.
  LDS/GD-2.56.tar.gz
  ./Build test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports LDS/GD-2.56.tar.gz
Running Build install
  make test had returned bad status, won't install without force
Niestety znów porażka...

Offline Paweł Kraszewski

  • Administrator
  • Guru
  • *****
  • Wiadomości: 2508
  • Lenistwo jest matką potrzeby = babcią wynalazku
    • Zobacz profil
    • Linuxpedia.PL
OTRS problem z instalacją GD
« Odpowiedź #3 dnia: 2015-03-24, 00:58:47 »
Posypał się jeden z 12 testów jednostkowych. Sprawdź, co jest sprawdzane w linii 249 pliku GD.t i oceń, czy możesz bez tego żyć :)
Paweł Kraszewski
~Gentoo/FreeBSD/OpenBSD/Specjalizowane customy

Offline Maciej Szczypiński

  • Users
  • Stały bywalec
  • ***
  • Wiadomości: 161
    • Zobacz profil
OTRS problem z instalacją GD
« Odpowiedź #4 dnia: 2015-03-25, 13:09:20 »
Kompletna zawartość pliku GD.t (linia 249 jest pogrubiona):

#!/usr/bin/perl

use strict;
use warnings;

use FileHandle;
use FindBin qw($Bin);
use lib "$Bin/../blib/lib","$Bin/../blib/arch","$Bin/../lib";
use constant FONT=>"$Bin/test_data/Generic.ttf";
use constant IMAGE_TESTS => 7;
use Test::More tests => 11;
use IO::Dir;

use_ok('GD',':DEFAULT',':cmp');
use_ok('GD::Simple');

chdir $Bin || die "Couldn't change to 't' directory: $!";
my $images = './test_data/images';

my $arg = shift;
write_regression_tests() if (defined $arg && $arg eq '--write');
run_image_regression_tests();
run_round_trip_test();

exit 0;

sub write_regression_tests {
    warn "Writing regression files...";
    for my $suffix ('gd2','gd','png','gif','jpeg') {
my $op = ucfirst $suffix;
unless (GD::Image->can("newFrom$op")) {
   print "# not writing $op regression test: not supported\\n";
   next;
}
for my $t (1..IMAGE_TESTS) {
   my $data = eval "test${t}('$suffix')" or die $@;
   write_regression_test($data,$t,$suffix);
}
    }
}

sub write_regression_test {
    my ($data,$test,$suffix) = @_;
    my $base = "$images/t${test}";
    mkdir $base unless -d $base;
    my $count = 0;
    my $filename = sprintf ("$base/$test-%02d.$suffix",$count);
    while (-e $filename) {
$count++;
$filename = sprintf ("$base/$test-%02d.$suffix",$count);
    }
    open my $fh,'>',$filename or die "$filename: $!";
    binmode($fh);
    print $fh $data->$suffix;
    close $fh or die "$filename: $!";
}

sub compare {
    my ($data,$test,$suffix) = @_;
    my @files_to_match = glob("$images/t${test}/*.$suffix");

    my $matched;
    for my $file (@files_to_match) {
$matched ||= compare_image($data,$file,$suffix);
    }
    return $matched;
}

sub compare_image {
    my ($data1,$file,$suffix) = @_;
    my $op    = ucfirst($suffix);
    my $method = "newFrom${op}";
    my $data2 = eval {GD::Image->$method($file)} or die $@;
    return ! $data1->compare($data2) & GD_CMP_IMAGE();
}

sub test1 {
    my $suffix = shift;
    my $im     = new GD::Image(300,300);
    my($white) = $im->colorAllocate(255, 255, 255);
    my($black) = $im->colorAllocate(0, 0, 0);
    my($red) = $im->colorAllocate(255, 0, 0);
    my($green) = $im->colorAllocate(0,255,0);
    my($yellow) = $im->colorAllocate(255,250,205);
    my $fn = "./test_data/tile.$suffix";
    my $op    = ucfirst($suffix);
    my $tile = eval "GD::Image->newFrom${op}('$fn')" or die $@;
    return unless $tile;
    $im->setBrush($tile);
    $im->arc(100,100,100,150,0,360,gdBrushed());
    $im->setTile($tile);
    $im->filledRectangle(150,150,250,250,gdTiled());
    $im->rectangle(150,150,250,250,$black);
    $im->setStyle($green,$green,$green,gdTransparent(),$red,$red,$red,gdTransparent());
    $im->line(0,280,300,280,gdStyled());
    return $im;
}

sub test2 {
    my($im) = new GD::Image(300,300);
    my($white,$black,$red,$blue,$yellow) = (
   $im->colorAllocate(255, 255, 255),
   $im->colorAllocate(0, 0, 0),
   $im->colorAllocate(255, 0, 0),
   $im->colorAllocate(0,0,255),
   $im->colorAllocate(255,250,205)
   );
    my($brush) = new GD::Image(10,10);
    $brush->colorAllocate(255,255,255); # white
    $brush->colorAllocate(0,0,0); # black
    $brush->transparent($white); # white is transparent
    $brush->filledRectangle(0,0,5,2,$black); # a black rectangle
    $im->setBrush($brush);
    $im->arc(100,100,100,150,0,360,gdBrushed());
    my($poly) = new GD::Polygon;
    $poly->addPt(30,30);
    $poly->addPt(100,10);
    $poly->addPt(190,290);
    $poly->addPt(30,290);
    $im->polygon($poly,gdBrushed());
    $im->fill(132,62,$blue);
    $im->fill(100,70,$red);
    $im->fill(40,40,$yellow);
    $im->copy($im,150,150,20,20,50,50);
    $im->copyResized($im,10,200,20,20,100,100,50,50);
    return $im;
}

sub test3 {
    my($im) = new GD::Image(100,50);
    my($black,$white,$red,$blue) =
(
$im->colorAllocate(0, 0, 0),
$im->colorAllocate(255, 255, 255),
$im->colorAllocate(255, 0, 0),
$im->colorAllocate(0,0,255)
);
    $im->arc(50, 25, 98, 48, 0, 360, $white);
    $im->fill(50, 21, $red);
    return $im;
}

sub test4 {
    my($im) = new GD::Image(225,180);
    my($black,$white,$red,$blue,$yellow) =
       ($im->colorAllocate(0, 0, 0),
$im->colorAllocate(255, 255, 255),
$im->colorAllocate(255, 0, 0),
$im->colorAllocate(0,0,255),
$im->colorAllocate(255,250,205)
);
    my($poly) = new GD::Polygon;
    $poly->addPt(0,50);
    $poly->addPt(25,25);
    $poly->addPt(50,50);
    $im->filledPolygon($poly,$blue);
    $poly->offset(100,100);
    $im->filledPolygon($poly,$red);
    $poly->map(50,50,100,100,10,10,110,60);
    $im->filledPolygon($poly,$yellow);
    $poly->map($poly->bounds,50,20,80,160);
    $im->filledPolygon($poly,$white);
    return $im;
}

sub test5 {
    my($im) = new GD::Image(300,300);
    my($white,$black,$red,$blue,$yellow) =
(
$im->colorAllocate(255, 255, 255),
$im->colorAllocate(0, 0, 0),
$im->colorAllocate(255, 0, 0),
$im->colorAllocate(0,0,255),
$im->colorAllocate(255,250,205)
);
    $im->transparent($white);
    my($brush) = new GD::Image(10,10);
    $brush->colorAllocate(255,255,255);
    $brush->colorAllocate(0,0,0);
    $brush->transparent($white);
    $brush->filledRectangle(0,0,5,2,$black);
    $im->string(gdLargeFont(),150,10,"Hello world!",$red);
    $im->string(gdSmallFont(),150,28,"Goodbye cruel world!",$blue);
    $im->stringUp(gdTinyFont(),280,250,"I'm climbing the wall!",$black);
    $im->charUp(gdMediumBoldFont(),280,280,"Q",$black);
    $im->setBrush($brush);
    $im->arc(100,100,100,150,0,360,gdBrushed());
    my $poly = new GD::Polygon;
    $poly->addPt(30,30);
    $poly->addPt(100,10);
    $poly->addPt(190,290);
    $poly->addPt(30,290);
    $im->polygon($poly,gdBrushed());
    $im->fill(132,62,$blue);
    $im->fill(100,70,$red);
    $im->fill(40,40,$yellow);
    return $im;
}

sub test6 {
    my $dtor = 0.0174533;
    my $pi = 3.141592654;
    my $xsize = 500;   my $ysize = 500;   my $scale = 1;
    my $x_offset = $xsize/2;   my $y_offset = $ysize/2;
    my $im = new GD::Image($xsize,$ysize);
    my $poly = new GD::Polygon;
    my $col_bg = $im->colorAllocate(0,0,0);
    my $col_fg = $im->colorAllocate(255,255,0);
    my $col_fill = $im->colorAllocate(255,0,0);
    my $r_0 = 100;     my $theta_0 = 20;      my $spring_factor = 30;
    for(my $theta=0;$theta<=360;$theta++) {
my $r = $r_0 + $spring_factor*sin(2*$pi*$theta/$theta_0);
my $x = int($r * cos($theta*$dtor))*$scale+$x_offset;
my $y = int($r * sin($theta*$dtor))*$scale+$y_offset;
$poly->addPt($x,$y);
    }

    $im->filledPolygon($poly,$col_fill);            # Call gdImageFilledPolygon()
    return $im;
}

sub test7 {
  my $im = GD::Image->new(400,250);
  if (!$im) { printf("Test7: no image");};
  my($white,$black,$red,$blue,$yellow) =
    (
     $im->colorAllocate(255, 255, 255),
     $im->colorAllocate(0, 0, 0),
     $im->colorAllocate(255, 0, 0),
     $im->colorAllocate(0,0,255),
     $im->colorAllocate(255,250,205)
    );

  # Some TTFs
  $im->stringFT($black,FONT,12.0,0.0,20,20,"Hello world!") || warn $@;
  $im->stringFT($red,FONT,14.0,0.0,20,80,"Hello world!") || warn $@;
  $im->stringFT($blue,FONT,30.0,-0.5,60,100,"Goodbye cruel world!") || warn $@;
  return $im;
}

sub run_image_regression_tests {
    my $suffix = $ENV{GDIMAGETYPE} || 'gd2';
    print STDERR "# Testing using $suffix support.\\n";
    for my $t (1..IMAGE_TESTS) {
my $gd   = eval "test${t}('$suffix')";
if (!$gd) {
   fail("unable to generate comparison image for test $t: $@");
} else {
[b]    ok(compare($gd,$t,$suffix),"image comparison test $t"); [/b]
}
    }
}

sub run_round_trip_test {
    my $image  = GD::Image->new(300,300);
    $image->colorAllocate(255,255,255);
    $image->colorAllocate(0,0,0);
    $image->colorAllocate(255,0,0);
    $image->rectangle(0,0,300,300,0);
    $image->filledRectangle(10,10,50,50,2);
    my $gd = $image->gd;
    my $image2 = GD::Image->newFromGdData($gd);
    ok(!$image->compare($image2) & GD_CMP_IMAGE(),'round trip gd');
    my $gd2 = $image->gd2;
    $image2 = GD::Image->newFromGd2Data($gd2);
    ok(!$image->compare($image2) & GD_CMP_IMAGE(),'round trip gd2');
}
Czy mogę bez tego żyć? Raczej nie. Przy sprawdzaniu modułów OTRS jest informacja, że jest on wymagany do statystyk. Na tych dość mocno mi zależy.

Offline Paweł Kraszewski

  • Administrator
  • Guru
  • *****
  • Wiadomości: 2508
  • Lenistwo jest matką potrzeby = babcią wynalazku
    • Zobacz profil
    • Linuxpedia.PL
OTRS problem z instalacją GD
« Odpowiedź #5 dnia: 2015-03-25, 13:44:44 »
Miałem na myśli to, czy możesz żyć z tym, że wyłączycz krzaczący się test.

Test 7 sprawdza zabawy z czcionkami. Może brakuje czcionki, może brakuje bibliotek do czcionek.

Popraw w pliku .t linijkę (na początku pliku)
use constant IMAGE_TESTS => 7;
na
use constant IMAGE_TESTS => 6;
i wtedy spróbuj zainstalować.
Paweł Kraszewski
~Gentoo/FreeBSD/OpenBSD/Specjalizowane customy

Offline Maciej Szczypiński

  • Users
  • Stały bywalec
  • ***
  • Wiadomości: 161
    • Zobacz profil
OTRS problem z instalacją GD
« Odpowiedź #6 dnia: 2015-03-31, 11:15:09 »
I to o czym piszesz jak najbardziej zadziałało. Potrzebne moduły zostały zainstalowane.

W następnym kroku znów muszę odwołać się do pomocy bardziej doświadczonych.

Skoro mam już wszystkie potrzebne moduły:
root@slack1:/opt/otrs# perl bin/otrs.CheckModules.pl
  o Apache2::Reload..................ok (v0.12)
  o Archive::Tar.....................ok (v1.54)
  o Archive::Zip.....................ok (v1.45)
  o Crypt::Eksblowfish::Bcrypt.......ok (v0.009)
  o Crypt::SSLeay....................ok (v0.72)
  o Date::Format.....................ok (v2.24)
  o DBI..............................ok (v1.616)
  o DBD::mysql.......................ok (v4.018)
  o DBD::ODBC........................Not installed! Use: 'cpan DBD::ODBC' (optional - Required to connect to a MS-SQL database.)
  o DBD::Oracle......................Not installed! Use: 'cpan DBD::Oracle' (optional - Required to connect to a Oracle database.)
  o DBD::Pg..........................Not installed! Use: 'cpan DBD::Pg' (optional - Required to connect to a PostgreSQL database.)
  o Encode::HanExtra.................ok (v0.23)
  o GD...............................ok (v2.56)
    o GD::Text.......................ok (v0.86)
    o GD::Graph......................ok (v1.49)
  o IO::Socket::SSL..................ok (v2.012)
  o JSON::XS.........................ok (v3.01)
  o List::Util::XS...................ok (v1.22)
  o LWP::UserAgent...................ok (v6.06)
  o Mail::IMAPClient.................ok (v3.35)
    o IO::Socket::SSL................ok (v2.012)
  o ModPerl::Util....................ok (v2.000008)
  o Net::DNS.........................ok (v0.83)
  o Net::LDAP........................ok (v0.64)
  o PDF::API2........................ok (v2.023)
  o Template.........................ok (v2.26)
  o Template::Stash::XS..............ok (undef)
  o Text::CSV_XS.....................ok (v1.16)
  o Time::HiRes......................ok (v1.9719)
  o Time::Piece......................ok (v1.15_01)
  o XML::Parser......................ok (v2.40)
  o YAML::XS.........................ok (v0.59)
to chciałbym wykonać następny krok zgodnie z tą instrukcją.

Doszedłem do etapu konfigurowania bazy SQL i chciałem użyć rekomendowanego web-installera. Niestety próba otwarcia strony instalatora kończy się fiaskiem - otwiera się pusta strona. Brakuje mi już pomysłów...

Offline Maciej Szczypiński

  • Users
  • Stały bywalec
  • ***
  • Wiadomości: 161
    • Zobacz profil
OTRS problem z instalacją GD
« Odpowiedź #7 dnia: 2015-03-31, 13:07:49 »
Eeeech mea kulpa  - dałem ciała z uprawnieniami. Działa. Można zamknąć temat.