After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 637742 - gtk+-2.22.0 and librsvg binary packages incompatible on ms windows?
gtk+-2.22.0 and librsvg binary packages incompatible on ms windows?
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.22.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-12-21 13:24 UTC by Dieter Verfaillie
Modified: 2011-01-17 11:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dieter Verfaillie 2010-12-21 13:24:50 UTC
I seem to have hit a snag with gtk+-2.22.0 on ms windows with the
librsvg pixbuf loader. I'm currently testing the following packages
from ftp.gnome.org/pub/GNOME/binaries/win32/:

    gtk+-bundle_2.22.0-20101016
    librsvg_2.26.2-1
    svg-gdk-pixbuf-loader_2.26.2-1
    libxml2_2.7.7-1
    libcroco_0.6.2-1
    libgsf_1.14.17-1

It would seem the latest package for the svg pixbuf loader is no
longer compatible with gtk+-2.22.0 (maybe due to the gdk-pixbuf
split?), or am I missing something else?

I've run the following tests:

========================================
cd D:\bin\Python27\Lib\site-packages\gtk-2.0\runtime\bin\
gdk-pixbuf-query-loaders.exe > ..\etc\gtk-2.0\gdk-pixbuf.loaders

Contents of etc\gtk-2.0\gdk-pixbuf.loaders:
    # GdkPixbuf Image Loader Modules file
    # Automatically generated file, do not edit
    # Created by gdk-pixbuf-query-loaders.exe from gdk-pixbuf-2.22.0
    #
    # LoaderDir = D:\bin\Python27\Lib\site-packages\gtk-2.0\runtime/lib/gdk-pixbuf-2.0/2.10.0/loaders
    #
========================================

That doesn't seem right. Where's svg_loader.dll? Maybe with the
gdk-pixbuf split gdk-pixbuf-query-loaders.exe no longer searches
the old lib\gtk-2.0\2.10.0\loaders\ directory? Let's try and force
it to search there:

========================================
gdk-pixbuf-query-loaders.exe ..\lib\gtk-2.0\2.10.0\loaders\*.dll > ..\etc\gtk-2.0\gdk-pixbuf.loaders
contents of etc/gdk-pixbuf.loaders:
    # GdkPixbuf Image Loader Modules file
    # Automatically generated file, do not edit
    # Created by gdk-pixbuf-query-loaders.exe from gdk-pixbuf-2.22.0
    #
    "D:/bin/Python27/Lib/site-packages/gtk-2.0/runtime/bin/../lib/gtk-2.0/2.10.0/loaders/svg_loader.dll"
    "svg" 2 "gdk-pixbuf" "Scalable Vector Graphics" "LGPL"
    "image/svg+xml" "image/svg" "image/svg-xml" "image/vnd.adobe.svg+xml" "text/xml-svg" "image/svg+xml-compressed" ""
    "svg" "svgz" "svg.gz" ""
    " <svg" "*    " 100
    " <!DOCTYPE svg" "*             " 100
========================================

Ah, much better! But does it work? Let's give it a try:
    import gtk
    for format in gtk.gdk.pixbuf_get_formats():
        print '%s,' % format['name'],

    ani, png, wbmp, pnm, ras, xpm, xbm, tga, pcx, icns, qtif, ico, wmf, emf, bmp, gif, jpeg, tiff

Hmmm, no svg format name there. Maybe if we update
lib\gdk-pixbuf-2.0\2.10.0\loaders\loaders.cache instead of
etc\gtk-2.0\gdk-pixbuf.loaders:

========================================
del ..\etc\gtk-2.0\gdk-pixbuf.loaders
gdk-pixbuf-query-loaders.exe ..\lib\gtk-2.0\2.10.0\loaders\*.dll > ..\lib\gdk-pixbuf-2.0\2.10.0\loaders\loaders.cache
contents of lib\gdk-pixbuf-2.0\2.10.0\loaders\loaders.cache:
    # GdkPixbuf Image Loader Modules file
    # Automatically generated file, do not edit
    # Created by gdk-pixbuf-query-loaders.exe from gdk-pixbuf-2.22.0
    #
    "D:/bin/Python27/Lib/site-packages/gtk-2.0/runtime/bin/../lib/gtk-2.0/2.10.0/loaders/svg_loader.dll"
    "svg" 2 "gdk-pixbuf" "Scalable Vector Graphics" "LGPL"
    "image/svg+xml" "image/svg" "image/svg-xml" "image/vnd.adobe.svg+xml" "text/xml-svg" "image/svg+xml-compressed" ""
    "svg" "svgz" "svg.gz" ""
    " <svg" "*    " 100
    " <!DOCTYPE svg" "*             " 100
========================================

Again, let's give it a try:
    import gtk
    for format in gtk.gdk.pixbuf_get_formats():
        print '%s,' % format['name'],

    ani, png, wbmp, pnm, ras, xpm, xbm, tga, pcx, icns, qtif, ico, wmf, emf, bmp, gif, jpeg, tiff

No joy, there's still no svg format there...
Comment 1 Tor Lillqvist 2010-12-29 12:46:39 UTC
There was some mixups and confusion in my Windows build of gdk-pixbuf 2.22.0, and also some deficiencies and regressions in the Windows-specific behaviour of the gdk-pixbuf code. They should now hopefully be corrected in the 2.22.1 build. Try it...

The correct location of the loaders.cache file is lib/gdk-pixbuf-2.0/2.10.0/loaders.cache.
Comment 2 Dieter Verfaillie 2010-12-29 13:38:42 UTC
I'd love to test, except pixman packages seem to be no longer available
on http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/.
pixman-dev packages are still there though.
Comment 3 Dieter Verfaillie 2010-12-29 14:20:39 UTC
Tested (from PyGTK) with gtk+-bundle_2.22.1-20101227_win32 (instead of
reconstructing it myself), svg-gdk-pixbuf-loader_2.32.1-1_win32.zip
and it's dependencies and:

cd gtk+-bundle_2.22.1-20101227_win32\bin
gdk-pixbuf-query-loaders.exe > ..\lib\gdk-pixbuf-2.0\2.10.0\loaders.cache

It works. svg is now listed in gtk.gdk.pixbuf_get_formats() again and
gtk.gdk.pixbuf_new_from_file(r'D:\test.svg') creates a pixbuf that
holds the expected image.

Thanks,
Dieter

ps Do I need to create a new bug report for the missing pixman archives?
Comment 4 Tor Lillqvist 2010-12-29 16:32:22 UTC
My pixman packages were empty anyway, as I build the pixman library as a static library and it thus gets linked into the cairo DLL. I have been doing this all the time pixman has been a separate package, as far as I recall. The pixman-dev packages contain the pixman headers (and the static library).
Comment 5 Tor Lillqvist 2010-12-29 16:32:47 UTC
So presumably this can be resolved now then.
Comment 6 Dieter Verfaillie 2010-12-29 17:47:37 UTC
Yes, I know they where empty, but I added them to the pygtk aio installer
anyway for completeness to prevent the type of question I just asked
myself (and generating a working gtk+ environment with it's build_installer
script is way faster than extracting a bunch of files by hand)...

Anyway, I can simply refer to this bug report now, if any questions
about pixman should arise.

Thanks,
Dieter

Note: the pixman archive is still listed in gtk+-bundle_2.22.1-20101227_win32.zip\share\doc\gtk+-bundle_2.22.1-20101227_win32\components.lst