Hi ppl. this is the error i get compiling gtk+2.2.2-r1

make[3]: Leaving directory 
`/var/tmp/portage/gtk+-2.2.2-r1/work/gtk+-2.2.2/demos/gtk-demo'
make[3]: Entering directory `/var/tmp/portage/gtk+-2.2.2-r1/work/gtk+-2.2.2/demos'
(topdir=`cd .. && pwd` ; curdir=`pwd` ; \
  cd . &&                                    \
      GDK_PIXBUF_MODULE_FILE=$topdir/gdk-pixbuf/gdk-pixbuf.loaders 
$topdir/gdk-pixbuf/gdk-pixbuf-csource --build-list \
        apple_red apple-red.png gnome_foot gnome-foot.png 
>$curdir/test-inline-pixbufs.h || (rm -f $curdir/test-inline-pixbufs.h && false))
failed to load "apple-red.png": Failed to load image 'apple-red.png': Unsupported TGA 
image type
make[3]: *** [test-inline-pixbufs.h] Error 1
make[3]: Leaving directory `/var/tmp/portage/gtk+-2.2.2-r1/work/gtk+-2.2.2/demos'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/gtk+-2.2.2-r1/work/gtk+-2.2.2/demos'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/gtk+-2.2.2-r1/work/gtk+-2.2.2'
make: *** [all-recursive-am] Error 2

!!! ERROR: x11-libs/gtk+-2.2.2-r1 failed.
!!! Function src_compile, Line 76, Exitcode 2
!!! (no error message)

As I searched and debugged,  I've found the fix, but not the reason:
there is a config file in /etc/gtk-2.0 named "gdk-pixbuf.loaders", and this file 
contains the "header" and "magic" data to "recognize" a image file type. When 
compiling, this file is obviously not used, but a "sample" of it is used during 
compilation.
So the fix is, if I change this file before this "test" reaches during the 
compilation, the compilation goes on, and all work fine, but what I've did, I'm not 
proud of it :+)

I changed the "magic/header" data between png and tga:
from:
"/usr/lib/gtk-2.0/2.2.0/loaders/libpixbufloader-png.so"
"png" 1 "gtk20" "The PNG image format"
"image/png" ""
"png" ""
"\211PNG\r\n\032\n" "" 100

to:
"/usr/lib/gtk-2.0/2.2.0/loaders/libpixbufloader-png.so"
"tga" 0 "gtk20" "The Targa image format"
"image/x-tga" ""
"tga" "targa" ""
" \001\001" "x  " 100
" \001\t" "x  " 100
"  \002" "xz " 99
"  \003" "xz " 100
"  \n" "xz " 100
"  \013" "xz " 100

After doing that in both the /etc config file, and the sample during the compilation, 
the build goes on, and work, but as you can see, the png format is recognized as a TGA 
header, and if you look into a .png file and a .tga image, you will see the BIG 
difference between headers.
I also had this same problem in debian, but I didn't discovered it, just an upgrade (I 
was using unstable) fixed it.

Somebody else with the same error and a good "reason" for that????

--
[EMAIL PROTECTED] mailing list

Reply via email to