looks like a gcc provblem (cast error).

I'm used to downgrade to gcc-2.95 when I see such errors.



Frederic MARTIN wrote:

Hi,

I'm trying to use a perl script which need GD, GDGraph, GDGraph3d and
GDTextUtil.
I found already some messages in the archives of this mailing list ans
especially the msg 09105. The guy had the same problem as me so I
followed the answer msg 09107 but it didn't succeed with me ...

When I checked the rpms in my machine (Linux Redhat8.0), I got the
following:
[EMAIL PROTECTED] /]# rpm -qa | grep gd
gdbm-1.8.0-18
gdm-2.4.0.7-13
gd-devel-1.8.4-9
gd-1.8.4-9
gdk-pixbuf-gnome-0.18.0-4
gdk-pixbuf-devel-0.18.0-4
gd-progs-1.8.4-9
sysklogd-1.4.1-10
gdk-pixbuf-0.18.0-4
gdbm-devel-1.8.0-18
gdb-5.2.1-4
libgd-2.0.20-2

So it seems that my RPMs are ok or ?
When I run my perl script, this is what I got:

------------------------------------------------------------------------------- --#perl mrtg_total.pl /test.cfg

Can't locate GD.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at
/usr/lib/perl5/site_perl/5.8.0/GD/Graph.pm line 38.
BEGIN failed--compilation aborted at
/usr/lib/perl5/site_perl/5.8.0/GD/Graph.pm line 38.
Compilation failed in require at
/usr/lib/perl5/site_perl/5.8.0/GD/Graph/axestype.pm line 18.
BEGIN failed--compilation aborted at
/usr/lib/perl5/site_perl/5.8.0/GD/Graph/axestype.pm line 18.
Compilation failed in require at
/usr/lib/perl5/site_perl/5.8.0/GD/Graph/bars.pm line 18.
BEGIN failed--compilation aborted at
/usr/lib/perl5/site_perl/5.8.0/GD/Graph/bars.pm line 18.
Compilation failed in require at /usr/local/bin/mrtg_total.pl line 154.
BEGIN failed--compilation aborted at /usr/local/bin/mrtg_total.pl line
154.
---------------------------------------------------------------------------------

So I try the solution given in the msg 09107 and I did that:
[EMAIL PROTECTED] download]#perl -MCPAN -e shell
then cpan> install GD

I got this (sorry for the length):

---------------------------------------------------------------------------------
cpan> install GD
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
 Database was generated on Tue, 10 Feb 2004 04:49:55 GMT
Running install for module GD
Running make for L/LD/LDS/GD-2.12.tar.gz
CPAN: Digest::MD5 loaded ok
CPAN: Compress::Zlib loaded ok
Checksum for /root/.cpan/sources/authors/id/L/LD/LDS/GD-2.12.tar.gz ok
Scanning cache /root/.cpan/build for sizes
GD-2.12/
GD-2.12/t/
GD-2.12/t/GD.t
GD-2.12/t/Polyline.t
GD-2.12/t/test.out.10.png-1
GD-2.12/t/test.out.10.png-2
GD-2.12/t/test.out.1.png
GD-2.12/t/test.out.2.png
GD-2.12/t/test.out.3.png
GD-2.12/t/test.out.4.png
GD-2.12/t/test.out.5.png
GD-2.12/t/test.out.6.png
GD-2.12/t/test.out.7.png
GD-2.12/t/test.out.8.png
GD-2.12/t/test.out.9.png
GD-2.12/t/Generic.ttf
GD-2.12/t/frog.jpg
GD-2.12/t/frog.xpm
GD-2.12/t/test.out.8.png-1
GD-2.12/t/test.out.8.png-2
GD-2.12/t/test.out.8.png-3
GD-2.12/t/test.out.8.png-4
GD-2.12/t/test.out.8.png-5
GD-2.12/t/tile.png
GD-2.12/t/palettemap.png
GD-2.12/GD/
GD-2.12/GD/Polyline.pm
GD-2.12/GD.pm
GD-2.12/GD.xs
GD-2.12/demos/
GD-2.12/demos/brushes.pl
GD-2.12/demos/font_list.png
GD-2.12/demos/fonttest
GD-2.12/demos/polys.pl
GD-2.12/demos/fills.pl
GD-2.12/demos/truetype_test
GD-2.12/demos/shapes.pl
GD-2.12/demos/copies.pl
GD-2.12/demos/ttf.pl
GD-2.12/demos/gd_example.cgi
GD-2.12/demos/tile.png
GD-2.12/demos/polyline.pl
GD-2.12/demos/transform.pl
GD-2.12/qd.pl
GD-2.12/README
GD-2.12/Makefile.PL
GD-2.12/README.QUICKDRAW
GD-2.12/typemap
GD-2.12/bdf_scripts/
GD-2.12/bdf_scripts/README
GD-2.12/bdf_scripts/cvtbdf.pl
GD-2.12/bdf_scripts/bdftogd
GD-2.12/README.unix
GD-2.12/ChangeLog
GD-2.12/MANIFEST
Removing previously used /root/.cpan/build/GD-2.12

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


NOTICE: This module requires libgd 2.0.12 or higher. it will NOT work with earlier versions. See www.cpan.org for versions of GD that are compatible with earlier versions of libgd.

       If you are using Math::Trig 1.01 or lower, it has a bug that
       causes a "prerequisite not found" warning to be issued.  You may
       safely ignore this warning.

Type perl Makefile.PL -h for command-line option summary

Where is libgd installed? [/usr/lib]

Please choose the features that match how libgd was built:
Build JPEG support? [y] y
Build FreeType support? [y] y
Build XPM support? [y] y

If you experience compile problems, please check the @INC, @LIBPATH and
@LIBS
arrays defined in Makefile.PL and manually adjust, if necessary.

Checking if your kit is complete...
Looks good
Writing Makefile for GD
cp GD/Polyline.pm blib/lib/GD/Polyline.pm
cp qd.pl blib/lib/qd.pl
cp GD.pm blib/lib/GD.pm
AutoSplitting blib/lib/GD.pm (blib/lib/auto/GD)
/usr/bin/perl /usr/lib/perl5/5.8.0/ExtUtils/xsubpp -typemap
/usr/lib/perl5/5.8.0/ExtUtils/typemap -typemap typemap GD.xs > GD.xsc
&& mv GD.xsc GD.c
gcc -c -I/usr/local/include -I/usr/local/include/gd -D_REENTRANT
-D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/include/gdbm -O2 -g -pipe -march=i386 -mcpu=i686 -DVERSION=\"2.12\" -DXS_VERSION=\"2.12\" -fPIC
"-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE" -DHAVE_JPEG
-DHAVE_FT -DHAVE_XPM GD.c
cc1: warning: changing search order for system directory
"/usr/local/include"
cc1: warning: as it has already been specified as a non-system
directory
GD.xs: In function `newDynamicCtx':
GD.xs:430: structure has no member named `gd_free'
GD.xs: In function `gd_cloneDim':
GD.xs:450: structure has no member named `alpha'
GD.xs:450: structure has no member named `alpha'
GD.xs:456: structure has no member named `thick'
GD.xs:456: structure has no member named `thick'
GD.xs: In function `XS_GD__Image_newFromPngData':
GD.xs:584: structure has no member named `gd_free'
GD.xs: In function `XS_GD__Image_newFromGdData':
GD.xs:603: structure has no member named `gd_free'
GD.xs: In function `XS_GD__Image_newFromGd2Data':
GD.xs:620: structure has no member named `gd_free'
GD.xs: In function `XS_GD__Image_newFromJpegData':
GD.xs:640: structure has no member named `gd_free'
GD.xs: In function `XS_GD__Image_newFromWBMPData':
GD.xs:665: structure has no member named `gd_free'
GD.xs: In function `XS_GD__Image_copyRotate90':
GD.xs:1026: invalid lvalue in assignment
GD.xs:1026: invalid lvalue in assignment
GD.xs: In function `XS_GD__Image_copyRotate180':
GD.xs:1047: invalid lvalue in assignment
GD.xs:1047: invalid lvalue in assignment
GD.xs: In function `XS_GD__Image_copyRotate270':
GD.xs:1068: invalid lvalue in assignment
GD.xs:1068: invalid lvalue in assignment
GD.xs: In function `XS_GD__Image_copyFlipHorizontal':
GD.xs:1089: invalid lvalue in assignment
GD.xs:1089: invalid lvalue in assignment
GD.xs: In function `XS_GD__Image_copyFlipVertical':
GD.xs:1110: invalid lvalue in assignment
GD.xs:1110: invalid lvalue in assignment
GD.xs: In function `XS_GD__Image_copyTranspose':
GD.xs:1131: invalid lvalue in assignment
GD.xs:1131: invalid lvalue in assignment
GD.xs: In function `XS_GD__Image_copyReverseTranspose':
GD.xs:1152: invalid lvalue in assignment
GD.xs:1152: invalid lvalue in assignment
GD.xs: In function `XS_GD__Image_rotate180':
GD.xs:1172: invalid lvalue in assignment
GD.xs:1172: invalid lvalue in assignment
GD.xs:1173: invalid lvalue in assignment
GD.xs:1173: invalid lvalue in assignment
GD.xs: In function `XS_GD__Image_flipHorizontal':
GD.xs:1190: invalid lvalue in assignment
GD.xs:1190: invalid lvalue in assignment
GD.xs:1191: invalid lvalue in assignment
GD.xs:1191: invalid lvalue in assignment
GD.xs: In function `XS_GD__Image_flipVertical':
GD.xs:1208: invalid lvalue in assignment
GD.xs:1208: invalid lvalue in assignment
GD.xs:1209: invalid lvalue in assignment
GD.xs:1209: invalid lvalue in assignment
GD.xs: In function `XS_GD__Image_stringFT':
GD.xs:1858: `gdFTStringExtra' undeclared (first use in this function)
GD.xs:1858: (Each undeclared identifier is reported only once
GD.xs:1858: for each function it appears in.)
GD.xs:1858: parse error before "strex"
GD.xs:1877: `strex' undeclared (first use in this function)
GD.xs:1881: `gdFTEX_LINESPACE' undeclared (first use in this function)
GD.xs:1885: `gdFTEX_CHARMAP' undeclared (first use in this function)
GD.xs:1887: `gdFTEX_Unicode' undeclared (first use in this function)
GD.xs:1889: `gdFTEX_Shift_JIS' undeclared (first use in this function)
GD.xs:1891: `gdFTEX_Big5' undeclared (first use in this function)
GD.xs:1895: warning: assignment makes pointer from integer without a
cast
make: *** [GD.o] Error 1
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
--------------------------------------------------------------------------------




So it seems that something is missing "gd_free" but I've one of the last
libgd so I don't really know how to fix that ...

Any ideas for a beginner like me?

Thanks in advance !

fred

PS: Again: sorry for the length of this email ...
















-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to