[Gimp-developer] compile error with 1.2.2

2001-08-01 Thread ben soo

i get the following errors when i try to compile Gimp 1.2.2 .
It's been happening since 1.2.2-pre1, when i sent more or
less this same report into the mailing list.

Not being a Gimp or perl guru, i've no idea what's going on;
could someone give me some clues abt this so i can fix it?

i'm using

glibc 2.2.3
make  3.79.1
gcc   2.95.3
perl  5.6.1
Gtk-Perl  0.7007
PDL   2.2.1

error from make:
-
make[3]: Entering directory `/var/src/gimp-1.2.2/plug-ins/perl'
make[4]: Entering directory `/var/src/gimp-1.2.2/plug-ins/perl/Gimp'
gcc -c -I/var/src/gimp-1.2.2/plug-ins/perl -I../../.. 
-I/var/src/gimp-1.2.2/plug-ins/perl/../.. -I/usr/include/glib-1.2 
-I/usr/lib/glib/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 
-I/usr/lib/glib/include -I/usr/X11R6/include  -DGTK_DISABLE_COMPAT_H 
-I/usr/lib/perl5/site_perl/5.6.1/i586-linux-thread/PDL/Core -O2 -mcpu=i686 
-fomit-frame-pointer  -pipe  -D_REENTRANT -fno-strict-aliasing -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -mcpu=i686 -O2 -pipe   -DVERSION=\"1.201\" 
-DXS_VERSION=\"1.201\" -fpic -I/usr/lib/perl5/5.6.1/i586-linux-thread/CORE 
-Ddatadir="\"/usr/local/share\"" -DHAVE_PDL=1  Lib.c
Lib.xs: In function `need_pdl':
Lib.xs:97: warning: passing arg 1 of `Perl_croak' from incompatible pointer type
Lib.xs:97: too few arguments to function `Perl_croak'
Lib.xs: In function `old_pdl':
Lib.xs:126: warning: passing arg 1 of `Perl_croak' from incompatible pointer type
Lib.xs:126: warning: passing arg 2 of `Perl_croak' makes pointer from integer without 
a cast
Lib.xs:129: warning: passing arg 1 of `Perl_croak' from incompatible pointer type
Lib.xs:129: warning: passing arg 2 of `Perl_croak' makes pointer from integer without 
a cast
Lib.xs:132: warning: passing arg 1 of `Perl_croak' from incompatible pointer type
Lib.xs:132: warning: passing arg 2 of `Perl_croak' makes pointer from integer without 
a cast
Lib.xs: In function `new_gdrawable':
Lib.xs:224: warning: passing arg 1 of `Perl_croak' from incompatible pointer type
Lib.xs:224: warning: passing arg 2 of `Perl_croak' makes pointer from integer without 
a cast
Lib.xs: In function `old_gdrawable':
Lib.xs:242: warning: passing arg 1 of `Perl_croak' from incompatible pointer type
Lib.xs: In function `old_tile':
Lib.xs:265: warning: passing arg 1 of `Perl_croak' from incompatible pointer type
Lib.xs: In function `force_gdrawable':
Lib.xs:294: warning: passing arg 1 of `Perl_croak' from incompatible pointer type
Lib.xs: In function `old_pixelrgn':
Lib.xs:321: warning: passing arg 1 of `Perl_croak' from incompatible pointer type
Lib.xs: In function `convert_array2paramdef':
Lib.xs:591: warning: passing arg 1 of `Perl_croak' from incompatible pointer type
Lib.xs:591: too few arguments to function `Perl_croak'
Lib.xs: In function `autobless':
Lib.xs:659: warning: passing arg 1 of `Perl_croak' from incompatible pointer type
Lib.xs:659: too few arguments to function `Perl_croak'
Lib.xs: In function `unbless_croak':
Lib.xs:698: warning: passing arg 1 of `Perl_croak' from incompatible pointer type
Lib.xs:698: too few arguments to function `Perl_croak'
Lib.xs: In function `canonicalize_colour':
Lib.xs:716: warning: passing arg 1 of `Perl_croak' from incompatible pointer type
Lib.xs:716: too few arguments to function `Perl_croak'
Lib.xs: In function `push_gimp_sv':
Lib.xs:889: warning: passing arg 1 of `Perl_croak' from incompatible pointer type
Lib.xs:889: incompatible type for argument 2 of `Perl_croak'
Lib.xs: In function `pii_run':
Lib.xs:1196: `thr' undeclared (first use in this function)
Lib.xs:1196: (Each undeclared identifier is reported only once
Lib.xs:1196: for each function it appears in.)

[...]

make[4]: *** [Lib.o] Error 1
make[4]: Leaving directory `/var/src/gimp-1.2.2/plug-ins/perl/Gimp'
make[3]: *** [subdirs] Error 2
make[3]: Leaving directory `/var/src/gimp-1.2.2/plug-ins/perl'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/src/gimp-1.2.2/plug-ins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/src/gimp-1.2.2'
make: *** [all-recursive-am] Error 2


---
b
<[EMAIL PROTECTED]>

___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



Re: [Gimp-developer] errors in the TGA plugin

2001-08-01 Thread Mattias EngdegÄrd

>However the Gimp is definitely writing valid RLE streams to TGA files
>these days, so Petr please try again with e.g. Gimp 1.2.2

Gimp 1.2.2 still has the bug when saving/loading indexed (8bpp) TGA
images with transparency, which I reported to Nick some while back.
Sorry, I should have fixed it, but if I get some real-life work done
I promise I will give it a go.

I do agree that Gimp should read even line-wrapping RLE streams; a
cursory scan on my disk reveals a lot images which are made that way.
I did the same when I wrote the TGA reader for SDL (accepting rule-breaking
files but writing files according to the spec)

___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



Re: [Gimp-developer] errors in the TGA plugin

2001-08-01 Thread Nick Lamb


(Petr CC'd in case he is not in fact on the list)

On Wed, Aug 01, 2001 at 04:41:57PM +0200, Petr Mejzlik wrote:
> I tested it by generating a 5x5 grayscale image with the following 
> pattern:

Interestingly I found a new bug in the Gimp 1.2.x TGA loader while testing
these 5x5 grey images. This bug is now fixed in the 1.2 CVS branch

However the Gimp is definitely writing valid RLE streams to TGA files
these days, so Petr please try again with e.g. Gimp 1.2.2

Nick.
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



[Gimp-developer] Re: errors in the TGA plugin

2001-08-01 Thread Guillermo S. Romero / Familia Romero

[EMAIL PROTECTED] (2001-08-01 at 1641.57 +0200):
> prohibited by the standard.

Just a small note, that appears in many lists about graphics: TGA does
not seem one of those hyperclear standards like PNG. From now and then
you see people asking about rare TGAs, save / load problems and other
complains. If it is clear, I guess that problems will never appear.

About reading: "be permissive with what you receive and cautious with
what you send" is a Internet good rule. So please do not talk about
removing the feature in the read process.

GSR
 
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



Re: [Gimp-developer] errors in the TGA plugin

2001-08-01 Thread Nick Lamb

On Wed, Aug 01, 2001 at 04:41:57PM +0200, Petr Mejzlik wrote:
> Hello,
> I think that I found some mistakes in the code that reads and writes
> RLE-compressed TGA files (in tga.c). Gimp can generate a RLE-compressed 
> file containing RLE packets, which go through the end of a scan line
> (that is encode pixels from more that one pixel line), which is 
> prohibited by the standard.

Which version of Gimp are you seeing this problem in Petr? I thought this
was fixed long ago.
In any case I'm investigating (in the 1.2 branch) since IIRC I'm the
last person to mess with the TGA code.

> Another problem is in the rle_read() function: variables repeat and direct
> are not correctly initialized on every call of rle_read(), as they are
> static. This is, by a chance (IMO) the reason, why Gimp can read its
> own RLE-compressed files: these two variables keep their values from the

No chance at work, this is deliberate. Gimp is not alone in having
created illegal TGA files in the past, and it seems crazy to refuse to
load them when it's perfectly clear how to do so without rejecting any
valid file.

Nick.
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



[Gimp-developer] errors in the TGA plugin

2001-08-01 Thread Petr Mejzlik

Hello,
I think that I found some mistakes in the code that reads and writes
RLE-compressed TGA files (in tga.c). Gimp can generate a RLE-compressed 
file containing RLE packets, which go through the end of a scan line
(that is encode pixels from more that one pixel line), which is 
prohibited by the standard.

I tested it by generating a 5x5 grayscale image with the following 
pattern:

OXXOO
OXXOO
OXXOO
OXXOO
O
(O = white, X = black)

Gimp compressed the white pixels with one packet containing the first pixel,
3 packets containing the last two pixels on i-th line a the first
pixel on (i-1)-th line (i=1,2,3), and one packet containing the last 7 pixels.
I think that the reason is in setting the width variable in save_image():
here the width should be equal to the width of the image.

Another problem is in the rle_read() function: variables repeat and direct
are not correctly initialized on every call of rle_read(), as they are
static. This is, by a chance (IMO) the reason, why Gimp can read its
own RLE-compressed files: these two variables keep their values from the
last call.

I apologize that I can't try to fix the errors myself at the moment, as I'm
late with some urgent SW project.

Best regards,

Petr 

-- 
Petr Mejzlik
Dept. of Information Technology, Faculty of Informatics  
Masaryk UniversityInternet: [EMAIL PROTECTED]
Botanicka 68a FAX : +42-05-4121 2568
CZ-602 00 Brno, Czech RepublicTel.: +42-05-4151 2338
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer