Closed achadwick closed 8 years ago
/mingw64/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
:
# GdkPixbuf Image Loader Modules file
# Automatically generated file, do not edit
# Created by gdk-pixbuf-query-loaders.exe from gdk-pixbuf-2.32.1
#
# LoaderDir = C:\msys64\mingw64/lib/gdk-pixbuf-2.0/2.10.0/loaders
#
"C:/msys64/mingw64/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.dll"
"svg" 6 "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
$ ls -l 'C:/msys64/mingw64/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.dll'
-rwxr-xr-x 1 Test User None 20608 Aug 17 17:29 C:/msys64/mingw64/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.dll
$ file 'C:/msys64/mingw64/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.dll'
C:/msys64/mingw64/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.dll: PE32+ executable (DLL) (console) x86-64 (stripped to external PDB), for MS Windows
I don't know anything about these libraries. But it sounds like you want gdk-pixbuf2 to use rsvg to parse an SVG icon. The PKGBUILD does not mention SVG support or a dependency on rsvg though:
https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-gdk-pixbuf2/PKGBUILD
Is it possible that SVG support needs to be enabled at build time?
@DavidEGrayson It loads it via a module, and loaders.cache
is supposed to tell gdk-pixbuf2 what .so or .dll to link at runtime to provide support for the identified image type.
Think of librsvg support as an add-on to gdk-pixbuf2 for this use - an add-on that's required by GTK/GNOME stuff due to the heavy reliance on symbolic icons.
Rewinding to gtk-pixbuf2 2.32.0-1 via http://repo.msys2.org/mingw/x86_64/ (thank you again to whoever keeps old versions there!) alone demonstrates that this is introduced by mingw-w64-x86_64-gdk-pixbuf2-2.32.1-1-any.pkg.tar.xz
, and the corresponding commit is 696b84d68a0717b48131504262843d2e921158e2.
That commit isn't too surprising, so this looks like an upstream issue. Paging @KrullKorg all the same... :grinning:
I don't know what the commit that causes this is between 2.32.0 and 2.32.1 upstream yet, but the problem doubtless lies in there!
Could you try with this?
http://saetta.ns0.it/video/mingw-w64-x86_64-gdk-pixbuf2-2.32.1-2-any.pkg.tar.xz http://saetta.ns0.it/video/PKGBUILD
it worked for me
Suggested patch looks like
--- PKGBUILD.orig 2015-10-06 19:58:46.587709400 +0100
+++ PKGBUILD.saetta 2015-10-11 10:38:46.000000000 +0100
@@ -6,5 +6,5 @@
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2.32.1
-pkgrel=1
+pkgrel=2
pkgdesc="An image loading library (mingw-w64)"
arch=('any')
@@ -52,5 +52,6 @@
--enable-shared \
--enable-introspection \
- --with-included-loaders
+ --with-included-loaders \
+ --enable-relocations
make
}
I can confirm that:
all make the problem go away for me when I build/install from the /usr/src tree. This doesn't confirm that --enable-relocations
will fix this bug, but it does confirm that the current build is broken, and that --enable-relocations
isn't harmful.
(Sorry for the slightly inconclusive test!)
(It's probably a good idea to make a PR for it - it looks like the sort of thing that might fix this issue.)
i think it's not a bug; simply before relocation wasn't optional but based on architecture
see https://git.gnome.org/browse/gdk-pixbuf/commit/?id=847f707477753876a0700b1decb2465b3c82506f
I'm confused by this thread. To test relocatability, build in a temporary MSYS2 tree and install to your normal tree.
The behaviour in the report is a regression of the binary package from 2.32.0-1 to 2.32.1-1, which is a bug to my mind.
(I'm surely not alone here, right? Are other people just not reproducing this one?)
Okay, better test:
pacman -Sy mingw-w64-x86_64-gdk-pixbuf2
--enable-relocations
in the temporary tree, then install under the usual tree
#!python
import gi
gi.require_version('GdkPixbuf', '2.0')
from gi.repository import GdkPixbuf
import sys
import os
def _attempt_load(filename):
print " stat() result: %r" % (os.stat(filename),)
pixbuf = GdkPixbuf.Pixbuf.new_from_file(filename)
print " loaded %r OK :)" % (pixbuf,)
if __name__ == "__main__":
for filename in sys.argv[1:]:
print "+++ Attempting to load %r with GdkPixbuf" % (filename,)
_attempt_load(filename)
diff --git a/mingw-w64-gdk-pixbuf2/PKGBUILD b/mingw-w64-gdk-pixbuf2/PKGBUILD
index 1b9d456..37d8582 100644
--- a/mingw-w64-gdk-pixbuf2/PKGBUILD
+++ b/mingw-w64-gdk-pixbuf2/PKGBUILD
@@ -51,6 +51,7 @@ build() {
--enable-static \
--enable-shared \
--enable-introspection \
+ --enable-relocations \
--with-included-loaders
make
}
@achadwick can you make a pull request please?
@mingwandroid Will do.
(I've set @KrullKorg as author, as they had the insight and made the initial build)
Thanks @Alexpux.
Of course that may just break anyone running a Python executable that lives outside the mingwXX tree as described in https://bugzilla.gnome.org/show_bug.cgi?id=755526 (for OSX Homebrew and Framework Python), but I imagine that's less common for anyone using MSYS2 to build apps for native Windows - I assume they'll ship their own python2w.exe like we do for MyPaint. Hopefully.
(Future me and anyone else: sorry if this breaks things later.)
When MyPaint tries to load an icon for its initial runtime test, I get:
which is not normal: the
desktop/icons
icon search path in particular is correct and accessible. Investigating further, I see that it's the gdkpixbuf/librsvg interface breaking again:I have everything installed that should be needed:
and I've tried reinstalling librsvg and gdk-pixbuf2 several times.